diff options
author | Richard Leitner <richard.leitner@skidata.com> | 2018-06-04 17:58:10 +0200 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2018-06-06 10:56:47 -0300 |
commit | 6681e152f34196e8e8997f6558be695cb5353ff3 (patch) | |
tree | 7a9d8b8c960cd3116c70060855cfeeb3e6c204ff | |
parent | c9e91752a97d25be33911c37a1dee9773d51312d (diff) | |
download | meta-freescale-6681e152f34196e8e8997f6558be695cb5353ff3.tar.gz |
kernel-itbimage: set dtb load line only if DTB_LOAD is set
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>
-rw-r--r-- | classes/kernel-itbimage.bbclass | 6 |
1 files changed, 5 insertions, 1 deletions
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() { | |||
136 | 136 | ||
137 | dtb_csum="sha1" | 137 | dtb_csum="sha1" |
138 | 138 | ||
139 | if [ -n "${DTB_LOAD}" ]; then | ||
140 | dtb_loadline="load = <${DTB_LOAD}>;" | ||
141 | fi | ||
142 | |||
139 | cat << EOF >> ${1} | 143 | cat << EOF >> ${1} |
140 | fdt@${2} { | 144 | fdt@${2} { |
141 | description = "Flattened Device Tree blob"; | 145 | description = "Flattened Device Tree blob"; |
@@ -143,7 +147,7 @@ fitimage_emit_section_dtb() { | |||
143 | type = "flat_dt"; | 147 | type = "flat_dt"; |
144 | arch = "${UBOOT_ARCH}"; | 148 | arch = "${UBOOT_ARCH}"; |
145 | compression = "none"; | 149 | compression = "none"; |
146 | load = <${DTB_LOAD}>; | 150 | ${dtb_loadline} |
147 | hash@1 { | 151 | hash@1 { |
148 | algo = "${dtb_csum}"; | 152 | algo = "${dtb_csum}"; |
149 | }; | 153 | }; |