board/freescale/common/imx: add i.MX8 genimage template
authorErik Larsson <karl.erik.larsson@gmail.com>
Thu, 12 Apr 2018 20:39:07 +0000 (22:39 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 12 Apr 2018 20:39:43 +0000 (22:39 +0200)
This commit adds a genimage template file that is used for i.MX8
platforms in the common i.MX post-image script.

Signed-off-by: Erik Larsson <karl.erik.larsson@gmail.com>
Signed-off-by: Christopher Dahlberg <crille.dahlberg@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
board/freescale/common/imx/genimage.cfg.template_imx8 [new file with mode: 0644]
board/freescale/common/imx/post-image.sh

diff --git a/board/freescale/common/imx/genimage.cfg.template_imx8 b/board/freescale/common/imx/genimage.cfg.template_imx8
new file mode 100644 (file)
index 0000000..fdb6450
--- /dev/null
@@ -0,0 +1,40 @@
+# Minimal SD card image for the Freescale iMX8 boards
+#
+# We mimic the .sdcard Freescale's image format:
+# * the SD card must have 33 kB free space at the beginning,
+# * U-Boot is integrated into imx8-boot-sd.bin and is dumped as is,
+# * a FAT partition at offset 32MB is containing Image and DTB files
+# * a single root filesystem partition is required (ext2, ext3 or ext4)
+#
+
+image boot.vfat {
+  vfat {
+    files = {
+      %FILES%
+    }
+  }
+  size = 32M
+}
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition imx-boot {
+    in-partition-table = "no"
+    image = "imx8-boot-sd.bin"
+    offset = 33K
+  }
+
+  partition boot {
+    partition-type = 0xC
+    bootable = "true"
+    image = "boot.vfat"
+    offset = 8M
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}
index 70d2c9c600d8f9caeac2f866128a483939120164..264c8a4bcb258136ada3bba75ab98167408855b7 100755 (executable)
@@ -32,7 +32,9 @@ linux_image()
 
 genimage_type()
 {
-       if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
+       if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then
+               echo "genimage.cfg.template_imx8"
+       elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
                echo "genimage.cfg.template_spl"
        else
                echo "genimage.cfg.template"