Use UBOOT_DTB_LOADADDRESS variable to instruct U-Boot where to place the
selected DTB file when booting the system.
Without this settings U-Boot uses the relative offset where DTB resides
inside the loading address of the FIT image.

Signed-off-by: Mihai Serban <mihai.ser...@gmail.com>
---

Changes since v1 (thanks to Alex Kiernan):
- remove entry line and UBOOT_DTB_ENTRYADDRESS since it is not used for DTBs

 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 50a91e199069..b8ade9c38c73 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@1 {
                                 algo = "${dtb_csum}";
                         };
-- 
2.17.1

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to