summaryrefslogtreecommitdiffstats
path: root/resources/scripts/helpers/download
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-07-12 12:22:00 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-07-12 12:23:39 (EDT)
commit5234c4dab37639f05bc5820e0b767b6fa8513137 (patch)
treea3f1e5ff9ec5810942701385ef947223cd37e6b1 /resources/scripts/helpers/download
parentef5d5bf15910fc5bfe02df2afe9861691a9e4e32 (diff)
downloadlibreboot-5234c4dab37639f05bc5820e0b767b6fa8513137.zip
libreboot-5234c4dab37639f05bc5820e0b767b6fa8513137.tar.gz
libreboot-5234c4dab37639f05bc5820e0b767b6fa8513137.tar.bz2
download/flashrom: Verify checksums of downloaded files
Diffstat (limited to 'resources/scripts/helpers/download')
-rwxr-xr-xresources/scripts/helpers/download/flashrom12
1 files changed, 10 insertions, 2 deletions
diff --git a/resources/scripts/helpers/download/flashrom b/resources/scripts/helpers/download/flashrom
index a44dd45..2262f63 100755
--- a/resources/scripts/helpers/download/flashrom
+++ b/resources/scripts/helpers/download/flashrom
@@ -39,10 +39,18 @@ rm -Rf "flashrom/"
# download it using subversion
svn co -r 1889 svn://flashrom.org/flashrom/trunk flashrom
-# apply patches
-
cd "flashrom/"
+# Verify checksums of the downloaded files
+# ------------------------------------------------------------------------------
+
+sha512sum -c "../resources/scripts/helpers/sha512sums/flashrom" || (cd "../" && rm -Rf "flashrom/" && printf "Invalid checksums for flashrom\n" && exit 1)
+
+printf "Valid checksums for flashrom\n"
+
+# Apply patches
+# ------------------------------------------------------------------------------
+
printf "Enabling whitelist for X200S, X200 Tablet, T400, T500 and R400\n"
patch "board_enable.c" < "../resources/flashrom/patch/x200s_x200t_t400_t500_r400_whitelist.diff"