From 70482a2f21fb83943c31622bc3abe02ff4964c6c Mon Sep 17 00:00:00 2001 From: Guillaume Endignoux Date: Tue, 29 Sep 2020 12:42:48 +0200 Subject: [PATCH] Install elf2tab in its own directory. --- .gitignore | 12 +++++++----- deploy.py | 8 ++++---- reset.sh | 2 +- setup.sh | 3 ++- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 85ef7c9..1b32046 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,13 @@ -bin/ target/ Cargo.lock +# Local installation of elf2tab. +/elf2tab/ + # Prevent people from commiting sensitive files. -crypto_data/ +/crypto_data/ # Temporary files. -reproducible/binaries.sha256sum -reproducible/elf2tab.txt -reproducible/reproduced.tar +/reproducible/binaries.sha256sum +/reproducible/elf2tab.txt +/reproducible/reproduced.tar diff --git a/deploy.py b/deploy.py index 57c183c..5598797 100755 --- a/deploy.py +++ b/deploy.py @@ -404,9 +404,9 @@ class OpenSKInstaller: assert self.args.application info("Generating Tock TAB file for application/example {}".format( self.args.application)) - elf2tab_ver = self.checked_command_output(["bin/elf2tab", - "--version"]).split( - "\n", maxsplit=1)[0] + elf2tab_ver = self.checked_command_output( + ["elf2tab/bin/elf2tab", "--version"]).split( + "\n", maxsplit=1)[0] if elf2tab_ver != "elf2tab 0.6.0": error( ("Detected unsupported elf2tab version {!a}. The following " @@ -415,7 +415,7 @@ class OpenSKInstaller: tab_filename = os.path.join(self.tab_folder, "{}.tab".format(self.args.application)) elf2tab_args = [ - "bin/elf2tab", "--deterministic", "--package-name", + "elf2tab/bin/elf2tab", "--deterministic", "--package-name", self.args.application, "-o", tab_filename ] if self.args.verbose_build: diff --git a/reset.sh b/reset.sh index 8067c4a..f72c1a8 100755 --- a/reset.sh +++ b/reset.sh @@ -26,7 +26,7 @@ while # Reset the submodules git submodule foreach 'git reset --hard && git clean -fxd' # Reset also the main repository - git reset --hard && git clean -fxd + git reset --hard && git clean -fxd --exclude elf2tab set +x echo "DONE." diff --git a/setup.sh b/setup.sh index b024784..903e0e3 100755 --- a/setup.sh +++ b/setup.sh @@ -42,4 +42,5 @@ pip3 install --user --upgrade 'tockloader==1.5' six intelhex rustup target add thumbv7em-none-eabi # Install dependency to create applications. -cargo install elf2tab --version 0.6.0 --root . +mkdir -p elf2tab +cargo install elf2tab --version 0.6.0 --root elf2tab/