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)
$(call if_changed,shipped)
endif
-targets += dt.dtb dt-spl.dtb dt-tpl.dtb
+targets += dt.dtb
$(DTB): arch-dtbs
$(Q)test -e $@ || ( \
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
SPL_NAME := spl
endif
+export SPL_NAME
+
ifdef CONFIG_SPL_BUILD
SPL_ := SPL_
ifeq ($(CONFIG_TPL_BUILD),y)
PHONY += FORCE
FORCE:
-PHONY += dtbs
-dtbs:
- $(Q)$(MAKE) $(build)=dts dtbs
+$(obj)/dts/dt-$(SPL_NAME).dtb: dts/dt.dtb
+ $(Q)$(MAKE) $(build)=$(obj)/dts spl_dtbs
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable so we can use it in if_changed and friends.