[meta-freescale] [PATCH] kernel-itbimage: set dtb load line only if DTB_LOAD is set

Richard Leitner richard.leitner at skidata.com
Mon Jun 4 08:58:10 PDT 2018


The load address line for the dtb should only be given if DTB_LOAD was
set accordingly before. Therefore add this check.

Without this patch the dtb was loaded to 0x0 if no DTB_LOAD was set and
the boot therefore failed. Now when no DTB_LOAD is set the bootloader
uses the device tree in place.

Signed-off-by: Richard Leitner <richard.leitner at skidata.com>
---
 classes/kernel-itbimage.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/classes/kernel-itbimage.bbclass b/classes/kernel-itbimage.bbclass
index 448e2a6c..703fa616 100644
--- a/classes/kernel-itbimage.bbclass
+++ b/classes/kernel-itbimage.bbclass
@@ -136,6 +136,10 @@ fitimage_emit_section_dtb() {
 
 	dtb_csum="sha1"
 
+        if [ -n "${DTB_LOAD}" ]; then
+            dtb_loadline="load = <${DTB_LOAD}>;"
+        fi
+
 	cat << EOF >> ${1}
                 fdt@${2} {
                         description = "Flattened Device Tree blob";
@@ -143,7 +147,7 @@ fitimage_emit_section_dtb() {
                         type = "flat_dt";
                         arch = "${UBOOT_ARCH}";
                         compression = "none";
-                        load = <${DTB_LOAD}>;
+                        ${dtb_loadline}
                         hash at 1 {
                                 algo = "${dtb_csum}";
                         };
-- 
2.11.0



More information about the meta-freescale mailing list