From 6681e152f34196e8e8997f6558be695cb5353ff3 Mon Sep 17 00:00:00 2001 From: Richard Leitner Date: Mon, 4 Jun 2018 17:58:10 +0200 Subject: [PATCH] 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 Signed-off-by: Otavio Salvador --- 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.40.1