arm64: enable dtb overlay merging support based on configs provided
authorTero Kristo <t-kristo@ti.com>
Sun, 17 Jun 2018 19:30:40 +0000 (22:30 +0300)
committerTero Kristo <t-kristo@ti.com>
Fri, 23 Nov 2018 08:14:54 +0000 (10:14 +0200)
Add dtb-merger tool support to arm64 TI build. The merged configs are
defined by providing proper .its files.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
arch/arm64/boot/dts/ti/Makefile

index 439c74e141d3c304fad4f039324dc0b6af6f0931..21a8b0109d93353cd5011b1fa3ade706742bb686 100644 (file)
@@ -10,5 +10,12 @@ DTC_FLAGS += -@
 
 dtb-$(CONFIG_ARCH_K3_AM6_SOC) += k3-am654-base-board.dtb
 
+dtb-$(CONFIG_ARCH_K3_AM6_SOC) += $(shell grep -s incbin $(srctree)/$(src)/*.its | grep dtb | cut -d "\"" -f 2)
+
 $(obj)/%.dtbo: $(src)/%.dtso FORCE
        $(call if_changed_dep,dtc)
+
+$(addprefix $(obj)/,$(dtb-merge-y)): $(addprefix $(obj)/,$(dtb-y))
+       @$(srctree)/scripts/dtb-merge $(srctree) $(objtree) $@ $(objtree)/scripts/dtc/fdtoverlay $(src)
+
+always         := $(dtb-merge-y)