build: fix regression in append-dtb fix
authorFelix Fietkau <nbd@nbd.name>
Fri, 3 Nov 2017 09:46:24 +0000 (10:46 +0100)
committerFelix Fietkau <nbd@nbd.name>
Fri, 3 Nov 2017 10:00:20 +0000 (11:00 +0100)
Strip whitespace from DTS directory
Put the dependency earlier in the chain to avoid make errors

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

index 9ab139c..2d7b1ef 100644 (file)
@@ -438,17 +438,16 @@ endef
 ifndef IB
 define Device/Build/dtb
   $(KDIR)/image-$(1).dtb: FORCE
-       $(call Image/BuildDTB,$(2)/$(1).dts,$$@)
+       $(call Image/BuildDTB,$(strip $(2))/$(1).dts,$$@)
 
-  $(3): $(KDIR)/image-$(1).dtb
+  image_prepare: $(KDIR)/image-$(1).dtb
 endef
 endif
 
 define Device/Build/kernel
   $$(eval $$(foreach dts,$$(DEVICE_DTS), \
        $$(call Device/Build/dtb,$$(dts), \
-               $$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)),\
-               $$(KDIR_KERNEL_IMAGE) $(KDIR)/$$(KERNEL_INITRAMFS_NAME) \
+               $$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)) \
        ) \
   ))