X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=dts%2FMakefile;h=c4ac153ef3602bf6f2a66128d3bb63a3ffbcb416;hb=3974b7f6e020bd2d2399acdc96a56d6e55ae804f;hp=c47fba787ccb593f11260b33d4c77b7bb135148c;hpb=6ab6b2afa091dbceb37719b8a81637a00834be19;p=u-boot diff --git a/dts/Makefile b/dts/Makefile index c47fba787c..c4ac153ef3 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -9,24 +9,31 @@ DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) ifeq ($(DEVICE_TREE),) -DEVICE_TREE := notfound +DEVICE_TREE := unset endif -DTS := $(srctree)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts - -DTC_FLAGS += -i $(srctree)/arch/$(ARCH)/dts -R 4 -p 0x1000 +ifneq ($(EXT_DTB),) +DTB := $(EXT_DTB) +else +DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb +endif -$(obj)/dt.dtb: $(DTS) FORCE - $(call if_changed_dep,dtc) +$(obj)/dt.dtb: $(DTB) FORCE + $(call if_changed,shipped) targets += dt.dtb -$(DTS): - @echo >&2 - @echo >&2 "Device Tree Source is not specified." - @echo >&2 "Please define 'CONFIG_DEFAULT_DEVICE_TREE'" - @echo >&2 "or build with 'DEVICE_TREE=' argument" - @/bin/false +$(DTB): arch-dtbs + $(Q)test -e $@ || ( \ + echo >&2; \ + echo >&2 "Device Tree Source is not correctly specified."; \ + echo >&2 "Please define 'CONFIG_DEFAULT_DEVICE_TREE'"; \ + echo >&2 "or build with 'DEVICE_TREE=' argument"; \ + echo >&2; \ + /bin/false) + +arch-dtbs: + $(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs .SECONDARY: $(obj)/dt.dtb.S @@ -36,3 +43,6 @@ dtbs: $(obj)/dt.dtb @: 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