]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - dts/Makefile
axs10x: Get rid of both I2C and EEPROM who used to use I2C
[people/ms/u-boot.git] / dts / Makefile
index 3fca5f5c2f5df968b9b924c97d873a478ca222a7..3a93dafb5164ed6e8e4318071cd6612350b09b27 100644 (file)
@@ -12,14 +12,25 @@ ifeq ($(DEVICE_TREE),)
 DEVICE_TREE := unset
 endif
 
-DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb
+ARCH_PATH := arch/$(ARCH)/dts
+dtb_depends := arch-dtbs
+
+ifneq ($(EXT_DTB),)
+DTB := $(EXT_DTB)
+else
+DTB := $(ARCH_PATH)/$(DEVICE_TREE).dtb
+dtb_depends += $(DTB:.dtb=.dts)
+endif
 
 $(obj)/dt.dtb: $(DTB) FORCE
        $(call if_changed,shipped)
 
 targets += dt.dtb
 
-$(DTB): arch-dtbs
+$(DTB): $(dtb_depends)
+ifeq ($(EXT_DTB),)
+       $(Q)$(MAKE) $(build)=$(ARCH_PATH) $@
+endif
        $(Q)test -e $@ || (                                             \
        echo >&2;                                                       \
        echo >&2 "Device Tree Source is not correctly specified.";      \
@@ -29,7 +40,7 @@ $(DTB): arch-dtbs
        /bin/false)
 
 arch-dtbs:
-       $(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs
+       $(Q)$(MAKE) $(build)=$(ARCH_PATH) dtbs
 
 .SECONDARY: $(obj)/dt.dtb.S
 
@@ -41,4 +52,4 @@ dtbs: $(obj)/dt.dtb
 clean-files := dt.dtb.S
 
 # Let clean descend into dts directories
-subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/sandbox/dts ../arch/x86/dts
+subdir- += ../arch/arm/dts ../arch/microblaze/dts ../arch/mips/dts ../arch/sandbox/dts ../arch/x86/dts