From 0e91013fc72b208463234cc56602b15a14a984ef Mon Sep 17 00:00:00 2001 From: Ilia Sergachev Date: Thu, 20 Jan 2022 18:43:59 +0100 Subject: [PATCH] quickfeather: fix path to libeos library when board script called not from its directory; fix wget redownloads; add libeos to gitignore --- .gitignore | 5 ++++- litex_boards/targets/quicklogic_quickfeather.py | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 963297e..cf301cb 100644 --- a/.gitignore +++ b/.gitignore @@ -93,4 +93,7 @@ ENV/ .ropeproject # VS Code project setting -.vscode \ No newline at end of file +.vscode + +# support library for EOS-S3 (downloaded when needed) +litex_boards/targets/libeos/ diff --git a/litex_boards/targets/quicklogic_quickfeather.py b/litex_boards/targets/quicklogic_quickfeather.py index 6ac5c8d..0ccf73d 100755 --- a/litex_boards/targets/quicklogic_quickfeather.py +++ b/litex_boards/targets/quicklogic_quickfeather.py @@ -99,10 +99,11 @@ def main(): soc = BaseSoC(**soc_core_argdict(args)) builder = Builder(soc) if args.cpu_type == "eos_s3": - if not os.path.exists("libeos"): - os.system("wget https://github.com/litex-hub/litex-boards/files/7880350/libeos.zip") - os.system("unzip libeos.zip -d libeos") - builder.add_software_package("libeos", src_dir="libeos") + libeos_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "libeos") + if not os.path.exists(libeos_path): + os.system("wget -nc https://github.com/litex-hub/litex-boards/files/7880350/libeos.zip") + os.system(f"unzip libeos.zip -d {libeos_path}") + builder.add_software_package("libeos", src_dir=libeos_path) builder.add_software_library("libeos") builder.build(run=args.build)