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>
dtb_csum="sha1"
+ if [ -n "${DTB_LOAD}" ]; then
+ dtb_loadline="load = <${DTB_LOAD}>;"
+ fi
+
cat << EOF >> ${1}
fdt@${2} {
description = "Flattened Device Tree blob";
type = "flat_dt";
arch = "${UBOOT_ARCH}";
compression = "none";
- load = <${DTB_LOAD}>;
+ ${dtb_loadline}
hash@1 {
algo = "${dtb_csum}";
};