This creates an empty flash image and places u-boot at the start of it.
It will be used by the ASPEED Qemu tests which boot u-boot from an
emaulated flash device.

Signed-off-by: Joel Stanley <j...@jms.id.au>
---
 bin/flash.create_image_32mb | 9 +++++++++
 1 file changed, 9 insertions(+)
 create mode 100755 bin/flash.create_image_32mb

diff --git a/bin/flash.create_image_32mb b/bin/flash.create_image_32mb
new file mode 100755
index 000000000000..8c2770d50e2b
--- /dev/null
+++ b/bin/flash.create_image_32mb
@@ -0,0 +1,9 @@
+# Copyright 2019 IBM Corp.
+# Joel Stanley <j...@jms.id.au>
+# SPDX-License-Identifier: GPL-2.0+
+
+# TODO: Work out a better temp directory
+FLASH_IMG="${U_BOOT_BUILD_DIR}"/flash.img
+
+dd if=/dev/zero of="${FLASH_IMG}" count=32 bs=1M
+dd if="${U_BOOT_BUILD_DIR}"/u-boot.bin of="${FLASH_IMG}" conv=notrunc
-- 
2.20.1

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to