Skip to content

Commit

Permalink
Added a sha256 integrity check to the downloaded tool binaries. See #100
Browse files Browse the repository at this point in the history
  • Loading branch information
dkohlbre authored and dayeol committed Jul 17, 2019
1 parent 8f1e951 commit 1d76cee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .prebuilt_tools_shasums
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
05211edea5a47ebaf906ef4bed2c9609a93e8c6ad5e45f8c87678eabbfd424e7 1.0.tar.gz
bdc9e3ec47ac461ecc7865609fda6b820439c36130e9da9275af010d9f4fe4bc 2.0.tar.gz
10 changes: 10 additions & 0 deletions fast-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ else
export RISCV=$(pwd)/riscv
export PATH=$PATH:$RISCV/bin
wget https://github.com/keystone-enclave/firesim-riscv-tools-prebuilt/archive/${TOOL_VER}.tar.gz

# Check tool integrity
echo "Verifying prebuilt toolchain integrity..."
sha256sum -c .prebuilt_tools_shasums --status --ignore-missing
if [[ $? != 0 ]]
then
echo "Toolchain binary download incomplete or corrupted. You can build the toolchain locally or try again."
exit 1
fi

tar -xzvf ${TOOL_VER}.tar.gz
cd firesim-riscv-tools-prebuilt-${TOOL_VER}
./installrelease.sh > riscv-tools-install.log
Expand Down

0 comments on commit 1d76cee

Please sign in to comment.