imx: create sdcard image recipe with raw U-Boot
authorLech Perczak <lech.perczak@gmail.com>
Thu, 28 Apr 2022 21:31:58 +0000 (23:31 +0200)
committerPiotr Dymacz <pepe2k@gmail.com>
Mon, 11 Jul 2022 12:18:40 +0000 (14:18 +0200)
Most i.MX boards booting off eMMC or SD cards use raw U-Boot located at
69 kB offset from beginning of the device - create a recipe for such
image.

Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
target/linux/imx/image/common.mk

index 8a9b2605842f7103f56e42ac8435d088511f0dab..3b528a02b147715170c5871cffeab15ee3ac7353 100644 (file)
@@ -49,3 +49,13 @@ define Build/imx-sdcard
 
        $(Build/imx-combined-image-clean)
 endef
+
+define Build/imx-sdcard-raw-uboot
+       $(Build/imx-combined-image-prepare)
+
+       $(Build/imx-combined-image)
+       dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-SPL of=$@ bs=1024 seek=1 conv=notrunc
+       dd if=$(STAGING_DIR_IMAGE)/$(UBOOT)-u-boot-dtb.img of=$@ bs=1024 seek=69 conv=notrunc
+
+       $(Build/imx-combined-image-clean)
+endef