summaryrefslogtreecommitdiff
path: root/dts
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-23 05:30:15 +0300
committerSimon Glass <sjg@chromium.org>2021-01-05 22:24:40 +0300
commitc7674fcb0748a9a15853be7728c3ae887feb75c8 (patch)
treec50b42698dfe54bbe3324d0fb99851030686331d /dts
parentde3e372abdb553ff3a79f12830bb90252059f662 (diff)
downloadu-boot-c7674fcb0748a9a15853be7728c3ae887feb75c8.tar.xz
Makefile: Tidy up SPL dtb production
Use the SPL_NAME variable to simplify the rules. Drop the SPL targets clean-files since the SPL and TPL dts/ directories are removed by existing rules. Move the SPL rules into a new spl_dtbs to avoid the complicated $(if) construct. Also drop unused pieces from the 'targets' variable. With this, SPL and TPL have separate dtbs which respect the various u-boot,dm-spl / u-boot,dm-tpl tags. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'dts')
-rw-r--r--dts/Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/dts/Makefile b/dts/Makefile
index c0a953ffac..94967cf656 100644
--- a/dts/Makefile
+++ b/dts/Makefile
@@ -16,13 +16,10 @@ else
DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
endif
-spl/$(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
+$(obj)/dt-$(SPL_NAME).dtb: dts/dt.dtb $(objtree)/tools/fdtgrep FORCE
mkdir -p $(dir $@)
$(call if_changed,fdtgrep)
-tpl/$(obj)/dt-tpl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
- $(call if_changed,fdtgrep)
-
ifeq ($(CONFIG_OF_DTB_PROPS_REMOVE),y)
$(obj)/dt.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE
$(call if_changed,fdt_rm_props)
@@ -31,7 +28,7 @@ $(obj)/dt.dtb: $(DTB) FORCE
$(call if_changed,shipped)
endif
-targets += dt.dtb dt-spl.dtb dt-tpl.dtb
+targets += dt.dtb
$(DTB): arch-dtbs
$(Q)test -e $@ || ( \
@@ -55,12 +52,15 @@ else
obj-$(CONFIG_OF_EMBED) := dt.dtb.o
endif
-dtbs: $(obj)/dt.dtb \
- $(if $(CONFIG_SPL),spl/$(obj)/dt-spl.dtb) \
- $(if $(CONFIG_TPL),tpl/$(obj)/dt-tpl.dtb)
+# Target for U-Boot proper
+dtbs: $(obj)/dt.dtb
+ @:
+
+# Target for SPL/TPL
+spl_dtbs: $(obj)/dt-$(SPL_NAME).dtb
@:
-clean-files := dt.dtb.S dt-spl.dtb.S dt-tpl.dtb.S
+clean-files := dt.dtb.S
# Let clean descend into dts directories
subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts ../arch/powerpc/dts ../arch/riscv/dts