From 3fad9ac160f1ce9ff0148f9f7f89184bf943ccc1 Mon Sep 17 00:00:00 2001 From: Francis Rowe Date: Sun, 09 Nov 2014 05:18:03 -0500 Subject: lenovobios_firstflash: Fail if BUCTS fails. Attempt to protect against bricking the machine. --- (limited to 'lenovobios_firstflash') 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 -- cgit v0.9.1