cros_bundle_firmware: Don't update U-Boot size parameter
This feature does not work at present - updating the parameter just
causes the SPL to fail to boot.
BUG=chromium-os:28394
TEST=cros_bundle_firmware -w usb
See that it downloads to USB and runs
Change-Id: I67f2fe62e7f995a2fd76bd067f4b0ba4afee1016
Reviewed-on: https://gerrit.chromium.org/gerrit/19038
Commit-Ready: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
diff --git a/host/lib/bundle_firmware.py b/host/lib/bundle_firmware.py
index a138f57..9dfc52d 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -494,6 +494,7 @@
new_data = ''
upto = 0
for param in param_list:
+ value = struct.unpack('<1L', data[pos + upto:pos + upto + 4])[0]
if param == 'm' :
mem_type = fdt.GetString('/dmc', 'mem-type')
mem_types = ['ddr2', 'ddr3', 'lpddr2', 'lpddr3']
@@ -505,16 +506,15 @@
value = 31
self._out.Info(' Memory interleave: %#0x' % value)
elif param == 'u':
- value = os.stat(pack.GetProperty('boot+dtb')).st_size
- value = (value + 0xfff) & ~0xfff
-
- # Seems to not work if this is another value
- #value += 0x3000
- value = 0x40000
+ # TODO(sjg): Seems to not work unless set to the same value as in the
+ # existing image. Need to find root cause.
+ #value = os.stat(pack.GetProperty('boot+dtb')).st_size
+ #value = (value + 0xfff) & ~0xfff
+ self._out.Warning("Leaving U-Boot size unchanged")
self._out.Info(' U-Boot size: %#0x' % value)
else:
self._out.Warning("Unknown machine parameter type '%s'" % param)
- value = struct.unpack('<1L', data[pos + upto:pos + upto + 4])[0]
+ self._out.Info(' Unknown value: %#0x' % value)
new_data += struct.pack('<L', value)
upto += 4