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 17ab46d859e38954350afb031eaab317e513b56b..1128aeab6d8b1a0a40652fe170ed2f4d73373306 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