summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-04-24 04:57:52 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-04-24 05:30:47 +0300
commitcfb9e844939965574d06ebda0b02c4b87788a991 (patch)
tree59b12952367584bec672631e30266a7550bb11d5
parenta5ae32015259200047a1105f05608c80c2e1696c (diff)
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 <laurent.pinchart@ideasonboard.com>
-rw-r--r--images/FIT.sh9
1 files changed, 9 insertions, 0 deletions
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 <<EOF >> $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";
};