From: Erik Larsson Date: Thu, 12 Apr 2018 20:39:07 +0000 (+0200) Subject: board/freescale/common/imx: add i.MX8 genimage template X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7f50b000e741a135293aef642e680987cf516b3a;p=buildroot.git board/freescale/common/imx: add i.MX8 genimage template 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 Signed-off-by: Christopher Dahlberg Signed-off-by: Thomas Petazzoni --- diff --git a/board/freescale/common/imx/genimage.cfg.template_imx8 b/board/freescale/common/imx/genimage.cfg.template_imx8 new file mode 100644 index 0000000000..fdb645014a --- /dev/null +++ b/board/freescale/common/imx/genimage.cfg.template_imx8 @@ -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" + } +} diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index 70d2c9c600..264c8a4bcb 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -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"