From fec8bbe42cd2dbf2275d783e614dae3817ffac42 Mon Sep 17 00:00:00 2001 From: awyxx Date: Tue, 10 Jan 2023 21:41:35 +0000 Subject: [PATCH 1/3] added arch linux support for riscv and openrisc toolchains --- litex_setup.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/litex_setup.py b/litex_setup.py index 0923d475d..a5d4725e5 100755 --- a/litex_setup.py +++ b/litex_setup.py @@ -341,9 +341,13 @@ def riscv_gcc_install(): # ------ if sys.platform.startswith("linux"): os_release = (open("/etc/os-release").read()).lower() + print(os_release) # Fedora. if "fedora" in os_release: os.system("dnf install gcc-riscv64-linux-gnu") + # Arch. + elif "arch" in os_release: + os.system("pacman -S riscv64-linux-gnu-gcc") # Ubuntu. else: os.system("apt install gcc-riscv64-linux-gnu") @@ -389,6 +393,9 @@ def openrisc_gcc_install(): # Fedora. if "fedora" in os_release: os.system("dnf install gcc-or1k-elf") + # Arch. + elif "arch" in os_release: + os.system("pacman -S or1k-elf-gcc") # Ubuntu. else: os.system("apt install gcc-or1k-elf") @@ -467,4 +474,4 @@ def main(): openrisc_gcc_install() if __name__ == "__main__": - main() + main() \ No newline at end of file From 2f2a1e894774597feb57fbe48ff9c1d87075d46f Mon Sep 17 00:00:00 2001 From: awyxx Date: Tue, 10 Jan 2023 21:42:49 +0000 Subject: [PATCH 2/3] Removed debug print --- litex_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litex_setup.py b/litex_setup.py index a5d4725e5..3adaba47f 100755 --- a/litex_setup.py +++ b/litex_setup.py @@ -341,7 +341,6 @@ def riscv_gcc_install(): # ------ if sys.platform.startswith("linux"): os_release = (open("/etc/os-release").read()).lower() - print(os_release) # Fedora. if "fedora" in os_release: os.system("dnf install gcc-riscv64-linux-gnu") @@ -474,4 +473,5 @@ def main(): openrisc_gcc_install() if __name__ == "__main__": - main() \ No newline at end of file + main() + \ No newline at end of file From fa28d70e621bab0a3438c9268cba4ac315d300da Mon Sep 17 00:00:00 2001 From: awyxx Date: Wed, 11 Jan 2023 23:48:17 +0000 Subject: [PATCH 3/3] added powerpc via AUR repository --- litex_setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litex_setup.py b/litex_setup.py index 3adaba47f..af5a82297 100755 --- a/litex_setup.py +++ b/litex_setup.py @@ -372,6 +372,9 @@ def powerpc_gcc_install(): # Fedora. if "fedora" in os_release: os.system("dnf install gcc-powerpc64le-linux-gnu") # FIXME: binutils-multiarch? + # Arch (AUR repository). + elif "arch" in os_release: + os.system("yay -S powerpc64le-linux-gnu-gcc") # Ubuntu. else: os.system("apt install gcc-powerpc64le-linux-gnu binutils-multiarch")