summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2023-07-07 13:30:20 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2023-07-10 19:35:00 +0200
commiteb73b3fc20f152a25b9a804102c3003a76d55b08 (patch)
treeb7a5a03c78bdd0e1d87fe47104b9ce2dced149af /recipes-bsp
parentf01450947849b002a994545e73928ade491b7b0a (diff)
u-boot-distro-boot: make use of the machine.conf provided var
With the kernel moving 32 bit device trees in subdirectories starting with kernel 6.5 the toradex machine configuration files provide the variable KERNEL_DTB_PREFIX. The fit image configuration name is constructed from KERNEL_DTB_PREFIX plus the dtb file name. Make use of the KERNEL_DTB_PREFIX variable to construct the configuration used for booting. As we now also set KERNEL_DTB_PREFIX for the 64 bit machines the inline python works for all machines, thus drop the DTB_PREFIX overrides. Related-to: ELB-5262 Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot-distro-boot.bb6
1 files changed, 2 insertions, 4 deletions
diff --git a/recipes-bsp/u-boot/u-boot-distro-boot.bb b/recipes-bsp/u-boot/u-boot-distro-boot.bb
index 61bfa03..4aa80fa 100644
--- a/recipes-bsp/u-boot/u-boot-distro-boot.bb
+++ b/recipes-bsp/u-boot/u-boot-distro-boot.bb
@@ -12,14 +12,12 @@ SRC_URI = " \
KERNEL_BOOTCMD ??= "bootz"
KERNEL_BOOTCMD:aarch64 ?= "booti"
-KERNEL_DTB_PREFIX ??= ""
-KERNEL_DTB_PREFIX:mx8-generic-bsp ?= "freescale_"
-KERNEL_DTB_PREFIX:k3 ?= "ti_"
+DTB_PREFIX ??= "${@d.getVar('KERNEL_DTB_PREFIX').replace("/", "_") if d.getVar('KERNEL_DTB_PREFIX') else ''}"
inherit deploy
do_deploy() {
- sed -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/;s/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/;s/@@KERNEL_DTB_PREFIX@@/${KERNEL_DTB_PREFIX}/' \
+ sed -e 's/@@KERNEL_BOOTCMD@@/${KERNEL_BOOTCMD}/;s/@@KERNEL_IMAGETYPE@@/${KERNEL_IMAGETYPE}/;s/@@KERNEL_DTB_PREFIX@@/${DTB_PREFIX}/' \
"${WORKDIR}/boot.cmd.in" > boot.cmd
mkimage -T script -C none -n "Distro boot script" -d boot.cmd boot.scr