From cfb9e844939965574d06ebda0b02c4b87788a991 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 24 Apr 2021 04:57:52 +0300 Subject: kbuild: FIT: Support custom load address for DTB This is required to merge overlays, as the base DTB needs to be relocated. Only the base address needs to be specified by platforms, addresses for all DTBs are calculated automatically. Signed-off-by: Laurent Pinchart --- images/FIT.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/images/FIT.sh b/images/FIT.sh index 4655a65..006baaf 100644 --- a/images/FIT.sh +++ b/images/FIT.sh @@ -46,12 +46,20 @@ make_FIT_image() { EOF local dtb + local addr=$fdtaddr for dtb in ${dtbs[@]} ${dt_overlays[@]} ; do local src=${dtb/:*/} local dst=${dtb/*:/} dst=${dst/*\//} + local load= + + if [ ! -z $fdtaddr ] ; then + load="load = <$(printf 0x%08x $addr)>;" + addr=$(($addr+0x40000)) + fi + cat <> $kernel_its fdt-$dst { description = "Flattened Device Tree blob $dst"; @@ -59,6 +67,7 @@ EOF type = "flat_dt"; arch = "$arch"; compression = "none"; + $load hash-1 { algo = "crc32"; }; -- cgit v1.2.3