image-commands: fix generating out-of-tree DTO
authorDaniel Golle <daniel@makrotopia.org>
Thu, 14 Jul 2022 03:25:36 +0000 (04:25 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 30 Jul 2022 17:04:36 +0000 (19:04 +0200)
Hack path so DTO generation works also for out-of-tree device tree
sources which currently fail.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
include/image-commands.mk

index 402e3d71edb8d99e8eafdf97d0d730c5c69bc365..6fe2890a1af51c9459acccf0c95843329fa27556 100644 (file)
@@ -279,9 +279,11 @@ endef
 define Build/fit
        $(TOPDIR)/scripts/mkits.sh \
                -D $(DEVICE_NAME) -o $@.its -k $@ \
-               -C $(word 1,$(1)) $(if $(word 2,$(1)),\
-               $(if $(DEVICE_DTS_OVERLAY),-d $(KERNEL_BUILD_DIR)/image-$$(basename $(word 2,$(1))),\
-                       -d $(word 2,$(1)))) \
+               -C $(word 1,$(1)) \
+               $(if $(word 2,$(1)),\
+                       $(if $(findstring 11,$(if $(DEVICE_DTS_OVERLAY),1)$(if $(findstring $(KERNEL_BUILD_DIR)/image-,$(word 2,$(1))),,1)), \
+                               -d $(KERNEL_BUILD_DIR)/image-$$(basename $(word 2,$(1))), \
+                               -d $(word 2,$(1)))) \
                $(if $(findstring with-rootfs,$(word 3,$(1))),-r $(IMAGE_ROOTFS)) \
                $(if $(findstring with-initrd,$(word 3,$(1))), \
                        $(if $(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE), \