]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernel-fitimage: Allow setting of DTB/DTBO relocation address
authorAlex Kiernan <alex.kiernan@gmail.com>
Sat, 16 Jun 2018 09:28:52 +0000 (09:28 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 18 Jun 2018 09:59:33 +0000 (10:59 +0100)
Introduce UBOOT_DTB_LOADADDRESS and UBOOT_DTBO_LOADADDRESS so that you
can set where U-Boot loads full and overlay DTBs. This is required when
using bootm's overlay support to construct the final DTB.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/kernel-fitimage.bbclass

index 50a91e199069acbfca98b18146b305a0b9c1522e..f3c2ff0a300492f003f9256de36e7e6a86815bed 100644 (file)
@@ -135,6 +135,15 @@ fitimage_emit_section_dtb() {
 
        dtb_csum="sha1"
 
+       dtb_loadline=""
+       dtb_ext=${DTB##*.}
+       if [ "${dtb_ext}" = "dtbo" ]; then
+               if [ -n "${UBOOT_DTBO_LOADADDRESS}" ]; then
+                       dtb_loadline="load = <${UBOOT_DTBO_LOADADDRESS}>;"
+               fi
+       elif [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then
+               dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
+       fi
        cat << EOF >> ${1}
                 fdt@${2} {
                         description = "Flattened Device Tree blob";
@@ -142,6 +151,7 @@ fitimage_emit_section_dtb() {
                         type = "flat_dt";
                         arch = "${UBOOT_ARCH}";
                         compression = "none";
+                        ${dtb_loadline}
                         hash@1 {
                                 algo = "${dtb_csum}";
                         };