All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kernel-itbimage: set dtb load line only if DTB_LOAD is set
@ 2018-06-04 15:58 Richard Leitner
  0 siblings, 0 replies; only message in thread
From: Richard Leitner @ 2018-06-04 15:58 UTC (permalink / raw)
  To: meta-freescale; +Cc: dev

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>
---
 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@1 {
                                 algo = "${dtb_csum}";
                         };
-- 
2.11.0



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-06-04 15:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-04 15:58 [PATCH] kernel-itbimage: set dtb load line only if DTB_LOAD is set Richard Leitner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.