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/bundle_firmware.py b/host/lib/bundle_firmware.py
index db93cd5..064546b 100644
--- a/host/lib/bundle_firmware.py
+++ b/host/lib/bundle_firmware.py
@@ -426,6 +426,8 @@
data = self._tools.ReadFile(fname)
fdt_text_base = fdt.GetInt('/chromeos-config', 'textbase')
text_base = self.DecodeTextBase(data)
+ self._out.Info('TEXT_BASE: fdt says %#x, %s says %#x' % (fdt_text_base,
+ fname, text_base))
# If they are different, issue a warning and switch over.
if text_base and text_base != fdt_text_base: