From 0503188661d7f6c04fba99b478ed2447cbe5db3c Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 26 Nov 2021 14:20:55 +0100 Subject: [PATCH] litex_setup/riscv_gcc_toolchain_download: Add Fedora support (get linux-centos6). --- litex_setup.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/litex_setup.py b/litex_setup.py index 2071db8e6..f00400108 100755 --- a/litex_setup.py +++ b/litex_setup.py @@ -171,7 +171,12 @@ def riscv_gcc_toolchain_download(): end_file = "w64-mingw32.zip" # Linux elif sys.platform.startswith("linux"): - end_file = "linux-ubuntu14.tar.gz" + os_release = (open("/etc/os-release").read()).lower() + if "fedora" in os_release: + end_file = "linux-centos6.tar.gz" + else: + end_file = "linux-ubuntu14.tar.gz" + # Mac OS elif sys.platform.startswith("darwin"): end_file = "apple-darwin.tar.gz"