X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=dts%2FMakefile;fp=dts%2FMakefile;h=9907463fc6344d524d9ea415db5112573c6e1a8b;hb=3284c8b8cad9452bf0711f52699bc9a5aeb83319;hp=5d2abd9f5c359f95a669e9db5e76cebe3fe745ac;hpb=5ab502cb8900aee483dfba28700640672e0b060e;p=karo-tx-uboot.git diff --git a/dts/Makefile b/dts/Makefile index 5d2abd9f5c..9907463fc6 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -9,24 +9,30 @@ DEVICE_TREE ?= $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) ifeq ($(DEVICE_TREE),) -DEVICE_TREE := notfound +DEVICE_TREE := unset endif -DTS := $(srctree)/arch/$(ARCH)/dts/$(DEVICE_TREE).dts +DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb -DTC_FLAGS += -R 4 -p 0x1000 +quiet_cmd_copy = COPY $@ + cmd_copy = cp $< $@ -$(obj)/dt.dtb: $(DTS) FORCE - $(call if_changed_dep,dtc) +$(obj)/dt.dtb: $(DTB) FORCE + $(call if_changed,copy) 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 +42,6 @@ dtbs: $(obj)/dt.dtb @: clean-files := dt.dtb.S + +# Let clean descend into dts directories +subdir- += ../arch/*/dts