FAFT: Modify the GBB flags directly on the image
Don't call the set_gbb_flags script which may not exists on all
boards. Modify the GBB flags directly on the raw firmware image.
BUG=chromium:527484
TEST=Ran a FAFT test to verify the GBB flags changed.
Change-Id: Ibf6aef9ce19e17b2d132c75c0bb5ea5b762d87bb
Reviewed-on: https://chromium-review.googlesource.com/295770
Commit-Ready: Wai-Hong Tam <waihong@chromium.org>
Tested-by: Wai-Hong Tam <waihong@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
diff --git a/server/cros/faft/firmware_test.py b/server/cros/faft/firmware_test.py
index 29dbe4b..79d9d86 100644
--- a/server/cros/faft/firmware_test.py
+++ b/server/cros/faft/firmware_test.py
@@ -451,9 +451,7 @@
return
logging.info('Changing GBB flags from 0x%x to 0x%x.',
gbb_flags, new_flags)
- self.faft_client.system.run_shell_command(
- '/usr/share/vboot/bin/set_gbb_flags.sh 0x%x' % new_flags)
- self.faft_client.bios.reload()
+ self.faft_client.bios.set_gbb_flags(new_flags)
# If changing FORCE_DEV_SWITCH_ON flag, reboot to get a clear state
if ((gbb_flags ^ new_flags) & vboot.GBB_FLAG_FORCE_DEV_SWITCH_ON):
self.switcher.mode_aware_reboot()