[Buildroot] [PATCH 1/3] boards/freescale/common: Introduce template_no_boot_part_spl

Joris Offouga offougajoris at gmail.com
Mon Jun 10 19:35:34 UTC 2019


This includes the no_boot_part_spl templates which use a /boot
included in rootfs.

Signed-off-by: Joris Offouga <offougajoris at gmail.com>
Signed-off-by: Pierre-Jean Texier <pjtexier at koncepto.io>
Tested-by: Pierre-Jean Texier <pjtexier at koncepto.io>
---
 .../genimage.cfg.template_no_boot_part_spl    | 30 +++++++++++++++++++
 board/freescale/common/imx/post-image.sh      |  4 +++
 2 files changed, 34 insertions(+)
 create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl

diff --git a/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
new file mode 100644
index 0000000000..9cdecc6ce0
--- /dev/null
+++ b/board/freescale/common/imx/genimage.cfg.template_no_boot_part_spl
@@ -0,0 +1,30 @@
+# Minimal SD card image for the Freescale boards Template for SPL Boot
+#
+# We mimic the .sdcard Freescale's image format:
+# * the SD card must have 1 kB free space at the beginning,
+# * SPL is at the offset expected by ROM,
+# * U-Boot is at the offset expected by SPL,
+# * The first partition is expected to be an ext2 and have a /boot directory.
+#
+
+image sdcard.img {
+  hdimage {
+  }
+
+  partition spl {
+    in-partition-table = "no"
+    image = "SPL"
+    offset = 1024
+  }
+
+  partition u-boot-img {
+    in-partition-table = "no"
+    image = "u-boot.img"
+    offset = 69K
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}
diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh
index d07ad2ef5d..12756c63d5 100755
--- a/board/freescale/common/imx/post-image.sh
+++ b/board/freescale/common/imx/post-image.sh
@@ -38,6 +38,10 @@ genimage_type()
 		echo "genimage.cfg.template_imx8"
 	elif grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_imx8"
+	elif grep -Eq "^BR2_LINUX_KERNEL_INSTALL_TARGET=y$" ${BR2_CONFIG}; then
+		if grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
+		    echo "genimage.cfg.template_no_boot_part_spl"
+		fi
 	elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_spl"
 	else
-- 
2.17.1



More information about the buildroot mailing list