summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorMing Liu <ming.liu@toradex.com>2023-03-14 12:38:41 +0100
committerMax Krummenacher <max.krummenacher@toradex.com>2023-04-04 18:00:43 +0200
commitbfcb42ac8dbf9beb2f6634751ff6b71dcdd21691 (patch)
tree8191c7a54308fba54ec7f1d05cd407c503549866 /recipes-bsp
parent7dea9786fb9397edf98b723795d549eede09094d (diff)
u-boot-distro-boot: introduce KERNEL_DTB_PREFIX for i.MX8 machines
Not like ARM machines, which the devicetrees locate at arch/arm/boot/dts in kernel source and the devicetree names directly built into fitImage by bitbake. For i.MX8 machines instead, the devicetrees locate at a vendor specific subdirectory, take NXP as a example, they are under arch/arm64/boot/dts/freescale, so bitbake builds them into fitImage also with a "freescale_" prefix to the real devicetree name. We should distinguish these two situations in boot.scr, let's introduce a variable KERNEL_DTB_PREFIX to achieve that, and set it to "freescale_" for i.MX8 machines. Signed-off-by: Ming Liu <ming.liu@toradex.com> (cherry picked from commit f22922827754e40a0cbdbd929826b13e68e0a6c7)
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot-distro-boot.bb6
-rw-r--r--recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in2
2 files changed, 6 insertions, 2 deletions
diff --git a/recipes-bsp/u-boot/u-boot-distro-boot.bb b/recipes-bsp/u-boot/u-boot-distro-boot.bb
index 7830e8e..61bfa03 100644
--- a/recipes-bsp/u-boot/u-boot-distro-boot.bb
+++ b/recipes-bsp/u-boot/u-boot-distro-boot.bb
@@ -12,10 +12,14 @@ SRC_URI = " \
KERNEL_BOOTCMD ??= "bootz"
KERNEL_BOOTCMD:aarch64 ?= "booti"
+KERNEL_DTB_PREFIX ??= ""
+KERNEL_DTB_PREFIX:mx8-generic-bsp ?= "freescale_"
+KERNEL_DTB_PREFIX:k3 ?= "ti_"
+
inherit deploy
do_deploy() {
- sed -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/;s/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/' \
+ sed -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/;s/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/;s/@@KERNEL_DTB_PREFIX@@/${KERNEL_DTB_PREFIX}/' \
"${WORKDIR}/boot.cmd.in" > boot.cmd
mkimage -T script -C none -n "Distro boot script" -d boot.cmd boot.scr
diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
index 8d23984..4b84bdd 100644
--- a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
+++ b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in
@@ -102,7 +102,7 @@ then
env set fdt_resize true
env set set_bootcmd_dtb 'env set bootcmd_dtb "true"'
env set set_apply_overlays 'env set apply_overlays "for overlay_file in \"\\${fdt_overlays}\"; do env set fitconf_fdt_overlays \"\\"\\${fitconf_fdt_overlays}#conf-\\${overlay_file}\\"\"; env set overlay_file; done; true"'
- env set bootcmd_boot 'echo "Bootargs: \${bootargs}" && bootm ${ramdisk_addr_r}#conf-\${fdtfile}\${fitconf_fdt_overlays}'
+ env set bootcmd_boot 'echo "Bootargs: \${bootargs}" && bootm ${ramdisk_addr_r}#conf-@@KERNEL_DTB_PREFIX@@\${fdtfile}\${fitconf_fdt_overlays}'
else
env set fdt_resize 'fdt addr ${fdt_addr_r} && fdt resize 0x20000'
env set set_bootcmd_dtb 'env set bootcmd_dtb "echo Loading DeviceTree: \\${fdtfile}; ${load_cmd} \\${fdt_addr_r} \\${fdtfile}"'