image.mk: fix append-dtb race when multiple devices use the same .dts
authorFelix Fietkau <nbd@nbd.name>
Thu, 14 Jul 2016 11:51:49 +0000 (13:51 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 15 Jul 2016 12:18:14 +0000 (14:18 +0200)
Call Image/BuildDTB unconditionally to keep things consistent

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

index 17ab46d..1128aea 100644 (file)
@@ -39,8 +39,8 @@ define Build/tplink-safeloader
 endef
 
 define Build/append-dtb
-    $(if $(DEVICE_DTS_DIR),$(call Image/BuildDTB,$(DEVICE_DTS_DIR)/$(DEVICE_DTS).dts,$(DTS_DIR)/$(DEVICE_DTS).dtb))
-    cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@
+       $(call Image/BuildDTB,$(if $(DEVICE_DTS_DIR),$(DEVICE_DTS_DIR),$(DTS_DIR))/$(DEVICE_DTS).dts,$@.dtb)
+       cat $@.dtb >> $@
 endef
 
 define Build/fit