cros_bundle_firmware: Tidy up text_base handling
For tegra the text_base property is required. It is the start address to
which U-Boot is loaded. We can read it from a U-Boot image, and it can be
specified in the fdt.
For other architectures this is not really needed, or at least not
supported (for example, it is sadly hard-coded in multiple places).
Make the text_base property optional and tidy up handling of this.
BUG=chrome-os-partner:10075
TEST=manual
connect Seaboard with A-A cable
$ cros_bundle_firmware -w usb
See that U-Boot boots on the seaboard.
$ emerge-link chromeos-bootimage
See that it completes successfully
Change-Id: Ie8cb827b8086be5ad689fe6f27661c02e4dd9add
Reviewed-on: https://gerrit.chromium.org/gerrit/24764
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
diff --git a/host/lib/write_firmware.py b/host/lib/write_firmware.py
index d106961..6b30b3f 100644
--- a/host/lib/write_firmware.py
+++ b/host/lib/write_firmware.py
@@ -49,7 +49,7 @@
self._fdt = fdt
self._out = output
self._bundle = bundle
- self.text_base = self._fdt.GetInt('/chromeos-config', 'textbase');
+ self.text_base = self._fdt.GetInt('/chromeos-config', 'textbase', -1);
# For speed, use the 'update' algorithm and don't verify
self.update = True
@@ -570,8 +570,8 @@
def DoWriteFirmware(output, tools, fdt, flasher, file_list, image_fname,
- bundle, text_base=None, update=True, verify=False,
- dest=None, flash_dest=None, props=None):
+ bundle, update=True, verify=False, dest=None,
+ flash_dest=None, props=None):
"""A simple function to write firmware to a device.
This creates a WriteFirmware object and uses it to write the firmware image
@@ -585,7 +585,6 @@
file_list: Dictionary containing files that we might need.
image_fname: Filename of image to write.
bundle: The bundle object which created the image.
- text_base: U-Boot text base (base of executable image), None for default.
update: Use faster update algorithm rather then full device erase.
verify: Verify the write by doing a readback and CRC.
dest: Destination device to write firmware to (usb, sd).
@@ -593,8 +592,6 @@
props: A dictionary containing properties from the PackFirmware object
"""
write = WriteFirmware(tools, fdt, output, bundle)
- if text_base:
- write.text_base = text_base
write.update = update
write.verify = verify
if dest == 'usb':