summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2014-11-09 05:18:03 (EST)
committer Francis Rowe <info@gluglug.org.uk>2014-11-09 05:18:03 (EST)
commit3fad9ac160f1ce9ff0148f9f7f89184bf943ccc1 (patch)
tree901be714c3db4a8c852298eb98f0d2bf323958cf
parent1a59ef004801a0ef266b49b078a6f8379351d8cc (diff)
downloadlibreboot-3fad9ac160f1ce9ff0148f9f7f89184bf943ccc1.zip
libreboot-3fad9ac160f1ce9ff0148f9f7f89184bf943ccc1.tar.gz
libreboot-3fad9ac160f1ce9ff0148f9f7f89184bf943ccc1.tar.bz2
lenovobios_firstflash: Fail if BUCTS fails.
Attempt to protect against bricking the machine.
-rwxr-xr-xlenovobios_firstflash8
1 files changed, 7 insertions, 1 deletions
diff --git a/lenovobios_firstflash b/lenovobios_firstflash
index efe377e..4db50b7 100755
--- a/lenovobios_firstflash
+++ b/lenovobios_firstflash
@@ -39,7 +39,13 @@ if [ ! -f $1 ]; then
fi
# needed for first flashing, otherwise machine will be bricked
-./bucts/bucts 1
+{ # try
+ ./bucts/bucts 1
+} || { # catch
+ echo "BUCTS issue (most likely not compiled). Make sure BUC.TS is 1, or else you will brick your machine."
+ echo "ABORTING so as to protect against bricking the machine."
+ exit
+}
# run both. one will fail (and be harmless), the other will succeed.
./flashrom/flashrom_lenovobios_sst -p internal -w $1