Add ability to specify --bootsecure to cros_bundle_firmware.
This is used for selecting secure boot in u-boot. See:
http://gerrit.chromium.org/gerrit/4819
BUG=chromium-os:17940, chromium-os:17582
TEST=Used to test secure-boot in u-boot. Specifically, noted
that the flasher worked (uses FDT boot without secureboot) and
that secure boot worked (saw code path being executed).
Change-Id: Iaa32a797deefe4a7b08993f10d23e7821ab48226
Reviewed-on: http://gerrit.chromium.org/gerrit/4820
Tested-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index 24ba2f0..abb3a63 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -218,14 +218,16 @@
self._tools.OutputSize('Signed image', signed)
return signed
- def SetBootcmd(self, bootcmd):
+ def SetBootcmd(self, bootcmd, bootsecure):
"""Set the boot command for U-Boot.
Args:
bootcmd: Boot command to use, as a string (if None this this is a nop).
+ bootsecure: We'll set '/config/bootsecure' to 1 if True and 0 if False.
"""
if bootcmd:
self.fdt.PutString('/config/bootcmd', bootcmd)
+ self.fdt.PutInteger('/config/bootsecure', int(bootsecure))
self._out.Info('Boot command: %s' % bootcmd)
def AddConfigList(self, config_list, use_int=False):