]> code.ossystems Code Review - openembedded-core.git/commitdiff
recipes-bsp/u-boot: Allow deploying the u-boot DTB
authorAlistair Francis <alistair.francis@wdc.com>
Sun, 6 Jun 2021 17:05:32 +0000 (10:05 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 7 Jun 2021 21:59:00 +0000 (22:59 +0100)
Use ??= assignment for UBOOT_DTB_BINARY because it is set using ?= in
fitImage bbclass as well, using ?= will preempt that

Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/uboot-config.bbclass
meta/recipes-bsp/u-boot/u-boot.inc

index 3bba02828b0b67f14afd9b05d580a870e3b41397..451db0c650c270886236daf01798c5704290ebbf 100644 (file)
@@ -71,6 +71,10 @@ UBOOT_MKIMAGE_SIGN ?= "${UBOOT_MKIMAGE}"
 UBOOT_MKIMAGE_SIGN_ARGS ?= ""
 SPL_MKIMAGE_SIGN_ARGS ?= ""
 
+# Options to deploy the u-boot device tree
+UBOOT_DTB ?= ""
+UBOOT_DTB_BINARY ??= ""
+
 python () {
     ubootmachine = d.getVar("UBOOT_MACHINE")
     ubootconfigflags = d.getVarFlags('UBOOT_CONFIG')
index 5398c2e6211597170ceca6c62499b1cff7a08bb2..8ccc532f7eb9a77c5ee4d4dbfa9a627cc57b4e4e 100644 (file)
@@ -5,7 +5,7 @@ PACKAGE_ARCH = "${MACHINE_ARCH}"
 
 DEPENDS += "kern-tools-native"
 
-inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native
+inherit uboot-config uboot-extlinux-config uboot-sign deploy cml1 python3native kernel-arch
 
 DEPENDS += "swig-native"
 
@@ -346,6 +346,11 @@ do_deploy () {
         ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}-${MACHINE}
         ln -sf ${UBOOT_EXTLINUX_SYMLINK} ${DEPLOYDIR}/${UBOOT_EXTLINUX_CONF_NAME}
     fi
+
+    if [ -n "${UBOOT_DTB}" ]
+    then
+        install -m 644 ${B}/arch/${UBOOT_ARCH}/dts/${UBOOT_DTB_BINARY} ${DEPLOYDIR}/
+    fi
 }
 
 addtask deploy before do_build after do_compile