[U-Boot] [PATCH v2 1/2] flash: Script to create a flash image from u-boot

Joel Stanley joel at jms.id.au
Mon Jul 15 23:14:20 UTC 2019


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 <joel at 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 <joel at 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



More information about the U-Boot mailing list