cros_bundle_firmware: Add support for multiple file requirements
Currently we support only a BCT file being passed in to the tools. This
is Tegra-specific.
Change the bct parameter into a dictionary, to allow us to pass multiple
files in as required. This is more extensible.
BUG=chromium-os:19724
TEST=manual: run cros_bundle_firmware -m
Change-Id: I7784bcc7ab735699b1d09e58488f5003894748a6
Reviewed-on: https://gerrit.chromium.org/gerrit/18320
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/write_firmware.py b/host/lib/write_firmware.py
index 9e3ceed..e0d8f77 100644
--- a/host/lib/write_firmware.py
+++ b/host/lib/write_firmware.py
@@ -275,7 +275,7 @@
tools: Tools object to use.
fdt: Fdt object to use as our device tree.
flasher: U-Boot binary to use as the flasher.
- bct_fname: Bct file to use for the flasher.
+ file_list: Dictionary containing files that we might need.
image_fname: Filename of image to write.
text_base: U-Boot text base (base of executable image), None for default.
update: Use faster update algorithm rather then full device erase.
@@ -290,7 +290,7 @@
if dest == 'usb':
method = fdt.GetString('/chromeos-config', 'flash-method', 'tegra')
if method == 'tegra':
- ok = write.NvidiaFlashImage(flasher, bct_fname, image_fname)
+ ok = write._NvidiaFlashImage(flasher, file_list['bct'], image_fname)
else:
raise CmdError("Unknown flash method '%s'" % method)
if ok: