diff --git a/Makefile b/Makefile index 3a77384600..2f134ccbf3 100644 --- a/Makefile +++ b/Makefile @@ -875,16 +875,11 @@ endif $(call cmd,cfgcheck,u-boot.cfg) PHONY += dtbs -dtbs: dts/dt.dtb dts/dt-spl.dtb +dtbs: dts/dt.dtb @: dts/dt.dtb: u-boot $(Q)$(MAKE) $(build)=dts dtbs -ifeq ($(CONFIG_USING_KERNEL_DTB),y) -dts/dt-spl.dtb: dts/dt.dtb - @: -endif - quiet_cmd_copy = COPY $@ cmd_copy = cp $< $@ @@ -906,8 +901,8 @@ u-boot-fit-dtb.bin: u-boot-nodtb.bin fit-dtb.blob u-boot.bin: u-boot-fit-dtb.bin FORCE $(call if_changed,copy) else ifeq ($(CONFIG_OF_SEPARATE),y) -ifeq ($(CONFIG_USING_KERNEL_DTB),y) -u-boot-dtb.bin: u-boot-nodtb.bin dts/dt-spl.dtb FORCE + +u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE $(call if_changed,cat) ifneq ($(wildcard dts/kern.dtb),) @@ -921,13 +916,7 @@ u-boot.bin: u-boot-dtb.bin FORCE $(call if_changed,copy) $(call if_changed,truncate) endif -else -u-boot-dtb.bin: u-boot-nodtb.bin dts/dt.dtb FORCE - $(call if_changed,cat) -u-boot.bin: u-boot-dtb.bin FORCE - $(call if_changed,copy) -endif else u-boot.bin: u-boot-nodtb.bin FORCE $(call if_changed,copy) @@ -942,11 +931,7 @@ endif quiet_cmd_copy = COPY $@ cmd_copy = cp $< $@ -ifeq ($(CONFIG_USING_KERNEL_DTB),y) -u-boot.dtb: dts/dt-spl.dtb FORCE -else u-boot.dtb: dts/dt.dtb FORCE -endif $(call cmd,copy) OBJCOPYFLAGS_u-boot.hex := -O ihex @@ -1054,11 +1039,7 @@ u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \ $(if $(CONFIG_SPL_LOAD_FIT),u-boot-nodtb.bin dts/dt.dtb,u-boot.bin) FORCE $(call if_changed,mkimage) -ifeq ($(CONFIG_USING_KERNEL_DTB),y) -u-boot.itb: u-boot-nodtb.bin dts/dt-spl.dtb $(U_BOOT_ITS) FORCE -else u-boot.itb: u-boot-nodtb.bin dts/dt.dtb $(U_BOOT_ITS) FORCE -endif $(call if_changed,mkfitimage) u-boot-spl.kwb: u-boot.img spl/u-boot-spl.bin FORCE diff --git a/dts/Makefile b/dts/Makefile index 0e77a283ce..341e982157 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -51,8 +51,13 @@ $(obj)/dt-tpl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE $(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE $(call if_changed,fdtgrep) +ifeq ($(CONFIG_USING_KERNEL_DTB),y) +$(obj)/dt.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE + $(call if_changed,fdtgrep) +else $(obj)/dt.dtb: $(DTB) FORCE $(call if_changed,shipped) +endif targets += dt.dtb dt-spl.dtb dt-tpl.dtb