]> code.ossystems Code Review - meta-freescale.git/commitdiff
kernel-itbimage: set dtb load line only if DTB_LOAD is set
authorRichard Leitner <richard.leitner@skidata.com>
Mon, 4 Jun 2018 15:58:10 +0000 (17:58 +0200)
committerOtavio Salvador <otavio@ossystems.com.br>
Tue, 26 Jun 2018 17:13:51 +0000 (14:13 -0300)
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@skidata.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
classes/kernel-itbimage.bbclass

index 448e2a6cca32015d175a9f598b06bd5287cd1556..703fa616bc76db45eb44fbeebc31605e1899a169 100644 (file)
@@ -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@1 {
                                 algo = "${dtb_csum}";
                         };