GBB: set bmpfv_size to 0 when --skip-bmpblk
This patch sets bmpfv_size to zero when creating GBB with --skip-bmpblk
flag. Depthcharge checks bmpfv_size == 0 to decide whether vboot screens
should be drawn by VbExDisplayScreen or VbDisplayScreenLegacyFromGBB.
BUG=none
BRANCH=tot
TEST=built chromeos-bootimage and exmained GBB header by hexdump. Booted
Jerry in normal, dev and recovery mode.
Change-Id: Ib19df143a7c845ac1d9c20e97086504b23edf665
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/322309
Reviewed-by: Julius Werner <jwerner@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index d126053..ef3880e 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -419,7 +419,11 @@
self._out.Notice("GBB flags value %#x" % gbb_flags)
self._out.Progress('Creating GBB')
- sizes = [0x100, 0x1000, gbb_size - 0x2180, 0x1000]
+ if self.skip_bmpblk:
+ bmpfv_size = 0
+ else:
+ bmpfv_size = gbb_size - 0x2180
+ sizes = [0x100, 0x1000, bmpfv_size, 0x1000]
sizes = ['%#x' % size for size in sizes]
gbb = 'gbb.bin'
keydir = self._tools.Filename(self._keydir)