]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - dts/Makefile
dts/Makefile: Check for empty $(LDSCRIPT)
[karo-tx-uboot.git] / dts / Makefile
index 402dfe1dced33d2c3087791947420626557aba34..50f9066115d34b66a07dcd615ab4e33816b40289 100644 (file)
@@ -36,7 +36,8 @@ $(error Your architecture does not have device tree support enabled. \
 Please define CONFIG_ARCH_DEVICE_TREE))
 
 # We preprocess the device tree file provide a useful define
-DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\"
+DTS_CPPFLAGS := -DARCH_CPU_DTS=\"$(SRCTREE)/arch/$(ARCH)/dts/$(CONFIG_ARCH_DEVICE_TREE).dtsi\" \
+               -DBOARD_DTS=\"$(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts/$(DEVICE_TREE).dts\"
 
 all:   $(obj).depend $(LIB)
 
@@ -66,8 +67,9 @@ $(obj)dt.o: $(DT_BIN)
        # We look in the LDSCRIPT first.
        # Then try the linker which should give us the answer.
        # Then check it worked.
-       oformat=`$(call process_lds,cat $(LDSCRIPT),FORMAT)` ;\
-       oarch=`$(call process_lds,cat $(LDSCRIPT),ARCH)` ;\
+       [ -n "$(LDSCRIPT)" ] && \
+               oformat=`$(call process_lds,cat $(LDSCRIPT),FORMAT)` && \
+               oarch=`$(call process_lds,cat $(LDSCRIPT),ARCH)` ;\
        \
        [ -z $${oformat} ] && \
                oformat=`$(call process_lds,$(GET_LDS),FORMAT)` ;\