Skip to contentSkip to conversation

imx/post-image.sh: Support BR2_LINUX_KERNEL_INSTALL_TARGET=y for non-SPL

PATCH New Fabio Estevam 2 participants 6 messages Jul 11, 2021 – Jul 12, 2021 Arm i.MX and Layerscape

lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/3 imx/post-image.sh: Support BR2_LINUX_KERNEL_INSTALL_TARGET=y for non-SPL

Currently, only SPL is supported when BR2_LINUX_KERNEL_INSTALL_TARGET=y is selected.

Support non-SPL case too.

This is needed for booting imx7d-sabresd, for example.

---
 .../common/imx/genimage.cfg.template_no_boot_part | 15 +++++++++++++++
 board/freescale/common/imx/post-image.sh          |  2 ++
 2 files changed, 17 insertions(+)
 create mode 100644 board/freescale/common/imx/genimage.cfg.template_no_boot_part
board/freescale/common/imx/genimage.cfg.template_no_boot_part new file +15 -0
new file mode 100644
index 000000000000..edc34d0fcd12
@@ -0,0 +1,15 @@
+image sdcard.img {
+  hdimage {
+  }
+
+  partition u-boot {
+    in-partition-table = "no"
+    image = "%UBOOTBIN%"
+    offset = 1024
+  }
+
+  partition rootfs {
+    partition-type = 0x83
+    image = "rootfs.ext2"
+  }
+}
board/freescale/common/imx/post-image.sh +2 -0
index 0c2ef53dc643..3bb482debda0 100755
@@ -47,6 +47,8 @@ genimage_type()
 	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"
+		else
+		    echo "genimage.cfg.template_no_boot_part"
 		fi
 	elif grep -Eq "^BR2_TARGET_UBOOT_SPL=y$" ${BR2_CONFIG}; then
 		echo "genimage.cfg.template_spl"
Signature · 1 line
2.25.1
author reviewer
#1 lore raw

PATCH 2/3 configs/imx7d-sdb: Add extlinux.conf support

imx7d-sdb has been converted to use disto boot in U-Boot.

Add extlinux.conf support so that the board can boot correctly.

---
 .../imx7dsdb/rootfs_overlay/boot/extlinux/extlinux.conf       | 4 ++++
 configs/imx7d-sdb_defconfig                                   | 2 ++
 2 files changed, 6 insertions(+)
 create mode 100644 board/freescale/imx7dsdb/rootfs_overlay/boot/extlinux/extlinux.conf
board/freescale/imx7dsdb/rootfs_overlay/boot/extlinux/extlinux.conf new file +4 -0
new file mode 100644
index 000000000000..d538b5d6432f
@@ -0,0 +1,4 @@
+Label imx7d-sabresd-buildroot
+  kernel /boot/zImage
+  devicetree /boot/imx7d-sdb.dtb
+  append root=PARTUUID=${uuid} rootwait rw console=${console},${baudrate}
configs/imx7d-sdb_defconfig +2 -0
index 1a3494b4af44..0c34f6e6dfea 100644
@@ -17,6 +17,7 @@ BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-sdb"
 BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
 
 # U-Boot
 BR2_TARGET_UBOOT=y
@@ -26,6 +27,7 @@ BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01"
 BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y
 
 # Filesystem
+BR2_ROOTFS_OVERLAY="board/freescale/imx7dsdb/rootfs_overlay"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh"
 BR2_TARGET_ROOTFS_EXT2=y
 BR2_TARGET_ROOTFS_EXT2_4=y
Signature · 1 line
2.25.1
author reviewer
#3 lore raw

PATCH 3/3 configs/imx7d-sdb: Bump U-Boot and kernel versions

In reply to Fabio Estevam

Bump U-Boot to 2021.07 and kernel to 5.13 version.

---
 configs/imx7d-sdb_defconfig | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
configs/imx7d-sdb_defconfig +4 -4
index 0c34f6e6dfea..8ee5e1fc4015 100644
@@ -3,8 +3,8 @@ BR2_arm=y
 BR2_cortex_a7=y
 BR2_ARM_FPU_NEON_VFPV4=y
 
-# Linux headers same as kernel, a 5.4 series
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+# Linux headers same as kernel, a 5.13 series
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_13=y
 
 # system
 BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
@@ -12,7 +12,7 @@ BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
 # Kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.8"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.13"
 BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
 BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7d-sdb"
@@ -23,7 +23,7 @@ BR2_LINUX_KERNEL_INSTALL_TARGET=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="mx7dsabresd"
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2021.07"
 BR2_TARGET_UBOOT_FORMAT_DTB_IMX=y
 
 # Filesystem
Signature · 1 line
2.25.1
#5 lore raw

PATCH 1/3 imx/post-image.sh: Support BR2_LINUX_KERNEL_INSTALL_TARGET=y for non-SPL

In reply to Fabio Estevam

Hi Fabio,

Le 11/07/2021 ? 22:19, Fabio Estevam a ?crit?:

Quoted 8 lines

Currently, only SPL is supported when BR2_LINUX_KERNEL_INSTALL_TARGET=y is selected.

Support non-SPL case too.

This is needed for booting imx7d-sabresd, for example.

Thanks

Signature · 1 line
Pierre-Jean Texier