cros_bundle_firmware: update mmc flashing syntax
2013.01 upstream u-boot has a different mechanism for selecting boot
partition. Instead of specifying it in the "mmc read" or "mmc write"
command, it is specified during "mmc open". Wrap the read and write
commands with an "mmc open" / "mmc close" to select the boot
partition.
BUG=None
TEST=flashed on puppy with: "cros_bundle_firmware --board=puppy
--flash=mmc --write=usb
--dt=/build/puppy/firmware/dts/tegra114-dalmore.dts --servo=none"
Change-Id: If14f20771d38982cd610df12a4510900cda045fe
Signed-off-by: Allen Martin <amartin@nvidia.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/47504
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
diff --git a/host/lib/write_firmware.py b/host/lib/write_firmware.py
index a0dadd7..e029d0b 100644
--- a/host/lib/write_firmware.py
+++ b/host/lib/write_firmware.py
@@ -134,12 +134,16 @@
])
elif boot_type == 'sdmmc':
cmds.extend([
- 'setenv _init "echo Init EMMC; mmc rescan 0"',
+ 'setenv _init "echo Init EMMC; mmc rescan 0"',
'setenv _erase "echo Erase EMMC; "',
- 'setenv _write "echo Write EMMC; mmc write 0 ${address} 0 ' \
- '${blocks} boot1"',
- 'setenv _read "echo Read EMMC; mmc read 0 ${address} 0 ' \
- '${blocks} boot1"',
+ 'setenv _write "echo Write EMMC; mmc open 0 1;' \
+ ' mmc write ${address} 0 ' \
+ '${blocks};' \
+ ' mmc close 0 1"',
+ 'setenv _read "echo Read EMMC; mmc open 0 1;' \
+ ' mmc read ${address} 0 ' \
+ '${blocks};' \
+ ' mmc close 0 1"',
])
else:
cmds.extend([