cros_bundle_firmware: Correct format of crc32 command
This command now uses the length of the argument to decide if it is a
hex string or an environment variable. Remove the 0x prefix so that the
flasher still works. This prefix is not needed anyway.
BUG=chrome-os-partner:18451
TEST=Manual
Use this to write to SD card:
$ cros_bundle_firmware -b peach_pit -s -M exynos -F spi -w sd:.
Then insert SD card in pit, boot from SD and see that it flashes correctly.
Change-Id: Ie786ada7d2d6114e0859b902c63f986932bf1259
Reviewed-on: https://gerrit.chromium.org/gerrit/46832
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Commit-Queue: 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 629eb2d..a0dadd7 100644
--- a/host/lib/write_firmware.py
+++ b/host/lib/write_firmware.py
@@ -121,7 +121,7 @@
'setenv firmware_size %#x' % payload_size,
'setenv length %#x' % RoundUp(payload_size, page_size),
'setenv blocks %#x' % (RoundUp(payload_size, page_size) / page_size),
- 'setenv _crc "crc32 -v ${address} ${firmware_size} %#08x"' %
+ 'setenv _crc "crc32 -v ${address} ${firmware_size} %08x"' %
checksum,
'setenv _clear "echo Clearing RAM; mw.b ${address} 0 ${length}"',
]