summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2024-04-06 19:29:45 +0200
committerMax Krummenacher <max.krummenacher@toradex.com>2024-04-08 09:37:47 +0200
commitedd51116002c4a52a60485f124e7216fe9342e51 (patch)
tree63f7c5b57173a3bbf5904e8575a5b4a7f64c37eb
parent451c884e85be7b6897eb9d6985c59d5e49c5cf50 (diff)
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 <max.krummenacher@toradex.com>
-rw-r--r--recipes-bsp/u-boot/u-boot-toradex-imx.inc7
1 files changed, 6 insertions, 1 deletions
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