[OE-core] [PATCH] kernel-fitimage: Allow unset load address for device tree binary

Thomas Perrot thomas.perrot at tupi.fr
Wed Jan 17 09:26:22 UTC 2018


Allow the load address to remain unset if the UBOOT_DTB_LOADADDRESS
variable is also unset for dtb entries in the image tree. This
allows for U-Boot to decide dynamically where to load the dtb.

Signed-off-by: Thomas Perrot <thomas.perrot at tupi.fr>
---
 meta/classes/kernel-fitimage.bbclass | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/classes/kernel-fitimage.bbclass b/meta/classes/kernel-fitimage.bbclass
index a50f8a18ee..b9eb2e3b65 100644
--- a/meta/classes/kernel-fitimage.bbclass
+++ b/meta/classes/kernel-fitimage.bbclass
@@ -134,6 +134,11 @@ EOF
 fitimage_emit_section_dtb() {
 
 	dtb_csum="sha1"
+	dtb_loadline=""
+
+	if [ -n "${UBOOT_DTB_LOADADDRESS}" ]; then
+		dtb_loadline="load = <${UBOOT_DTB_LOADADDRESS}>;"
+	fi
 
 	cat << EOF >> ${1}
                 fdt@${2} {
@@ -142,6 +147,7 @@ fitimage_emit_section_dtb() {
                         type = "flat_dt";
                         arch = "${UBOOT_ARCH}";
                         compression = "none";
+                        ${dtb_loadline}
                         hash at 1 {
                                 algo = "${dtb_csum}";
                         };
-- 
2.13.6




More information about the Openembedded-core mailing list