From edd51116002c4a52a60485f124e7216fe9342e51 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Sat, 6 Apr 2024 19:29:45 +0200 Subject: u-boot-toradex-imx: cope with of_upstream CONFIG_OF_UPSTREAM=y uses device sources directly out of the linux source tree. The location of the dtb artefacts change depending on OF_UPSTREAM used or not. Check for OF_UPSTREAM and pick the dtb file from the used location. Signed-off-by: Max Krummenacher --- recipes-bsp/u-boot/u-boot-toradex-imx.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/recipes-bsp/u-boot/u-boot-toradex-imx.inc b/recipes-bsp/u-boot/u-boot-toradex-imx.inc index b872191..a13b9a7 100644 --- a/recipes-bsp/u-boot/u-boot-toradex-imx.inc +++ b/recipes-bsp/u-boot/u-boot-toradex-imx.inc @@ -13,8 +13,13 @@ do_deploy:append:mx8m-generic-bsp() { if [ $j -eq $i ] then install -d ${DEPLOYDIR}/${BOOT_TOOLS} - install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type} + uboot_dtb=$(grep "CONFIG_DEFAULT_DEVICE_TREE=" ${B}/${config}/.config | sed 's/CONFIG_DEFAULT_DEVICE_TREE=\"\(.*\)\"/\1.dtb/') + if echo grep -q "OF_UPSTREAM=y" ${B}/${config}/.config; then + install -m 0777 ${B}/${config}/dts/upstream/src/arm64/${uboot_dtb} ${DEPLOYDIR}/${BOOT_TOOLS} + else + install -m 0777 ${B}/${config}/arch/arm/dts/${uboot_dtb} ${DEPLOYDIR}/${BOOT_TOOLS} + fi fi done unset j -- cgit v1.2.3