gooftool: Refine order of gbb flag clearance
If something goes wrong *AFTER* the gbb flag is cleared, and for
some reasons (maybe manually debugging) the DUT is rebooted, then
things become complicated since the gbb flag is already cleared.
We move the GBB flag clearance to a step as late as possible, to
make sure a reboot will not be a disaster when debugging issues
in finalization. Also, move cr50-board-id-set to an earlier stage.
BUG=none
TEST=make test
Change-Id: I0a57ffc20aca99e8453f4f9a0209916014221e6c
Reviewed-on: https://chromium-review.googlesource.com/660177
Commit-Ready: Shen-En Shih <petershih@chromium.org>
Tested-by: Shen-En Shih <petershih@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
diff --git a/py/gooftool/commands.py b/py/gooftool/commands.py
index e21908c..f51abcc 100755
--- a/py/gooftool/commands.py
+++ b/py/gooftool/commands.py
@@ -710,16 +710,16 @@
- Wipes the testing kernel, rootfs, and stateful partition
"""
Verify(options)
+ Cr50SetBoardId(options)
LogSourceHashes(options)
UntarStatefulFiles(options)
if options.cros_core:
logging.info('SetFirmwareBitmapLocale is skipped for ChromeOS Core device.')
else:
SetFirmwareBitmapLocale(options)
- ClearGBBFlags(options)
ClearFactoryVPDEntries(options)
GenerateStableDeviceSecret(options)
- Cr50SetBoardId(options)
+ ClearGBBFlags(options)
if options.no_write_protect:
logging.warn('WARNING: Firmware Write Protection is SKIPPED.')
event_log.Log('wp', fw='both', status='skipped')