summaryrefslogtreecommitdiffstats
path: root/resources/scripts/helpers/download/flashrom
diff options
context:
space:
mode:
Diffstat (limited to 'resources/scripts/helpers/download/flashrom')
-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"