build: fix generating dtb with / in DEVICE_DTS
authorFelix Fietkau <nbd@nbd.name>
Thu, 9 Nov 2017 13:26:24 +0000 (14:26 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 9 Nov 2017 13:40:32 +0000 (14:40 +0100)
Fixes layerscape build error

Signed-off-by: Felix Fietkau <nbd@nbd.name>
include/image.mk

index 96a8892115d4e399c46fbf2cc419ad9e2208e4f4..f4d0a157cdd045732830a1fc6cfc0921e86622c9 100644 (file)
@@ -440,7 +440,7 @@ define Device/Build/dtb
   ifndef BUILD_DTS_$(1)
   BUILD_DTS_$(1) := 1
   $(KDIR)/image-$(1).dtb: FORCE
-       $(call Image/BuildDTB,$(strip $(2))/$(1).dts,$$@)
+       $(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dts,$$@)
 
   image_prepare: $(KDIR)/image-$(1).dtb
   endif
@@ -450,8 +450,9 @@ endif
 
 define Device/Build/kernel
   $$(eval $$(foreach dts,$$(DEVICE_DTS), \
-       $$(call Device/Build/dtb,$$(dts), \
-               $$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)) \
+       $$(call Device/Build/dtb,$$(notdir $$(dts)), \
+               $$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
+               $$(dts) \
        ) \
   ))