aboutsummaryrefslogtreecommitdiffstats
path: root/include/image-commands.mk
diff options
context:
space:
mode:
authorDaniel Golle <daniel@makrotopia.org>2021-03-17 17:30:48 +0000
committerDaniel Golle <daniel@makrotopia.org>2021-03-17 17:45:34 +0000
commit6890f6fe13bb8dfc40dbca89703d4ab1116dd4bc (patch)
tree1f691e43baa12995f3307f3e04a00575ae99d628 /include/image-commands.mk
parent4e6de4f0938de24f407b85b6328f5114103bd45a (diff)
downloadupstream-6890f6fe13bb8dfc40dbca89703d4ab1116dd4bc.tar.gz
upstream-6890f6fe13bb8dfc40dbca89703d4ab1116dd4bc.tar.bz2
upstream-6890f6fe13bb8dfc40dbca89703d4ab1116dd4bc.zip
include/image*: add support for device-tree overlays
Add new target feature 'dt-overlay' which makes DTC keep the symbol names in the generated dtb. Make sure additional DT overlay sources specified by the new device variable DEVICE_DTS_OVERLAY get compiled together with the main DTS (currently overlays got to be in the same folder). Let Build/fit pass the generated DT overlay blobs to mkits.sh. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Diffstat (limited to 'include/image-commands.mk')
-rw-r--r--include/image-commands.mk5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index daa01a3d09..684646e233 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -207,13 +207,16 @@ endef
define Build/fit
$(TOPDIR)/scripts/mkits.sh \
-D $(DEVICE_NAME) -o $@.its -k $@ \
- $(if $(word 2,$(1)),-d $(word 2,$(1))) -C $(word 1,$(1)) \
+ -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)))) \
$(if $(findstring with-rootfs,$(word 3,$(1))),-r $(IMAGE_ROOTFS)) \
$(if $(findstring with-initrd,$(word 3,$(1))), \
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS_SEPARATE), \
-i $(KERNEL_BUILD_DIR)/initrd.cpio$(strip $(call Build/initrd_compression)))) \
-a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
+ $(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtb)) \
-c $(if $(DEVICE_DTS_CONFIG),$(DEVICE_DTS_CONFIG),"config-1") \
-A $(LINUX_KARCH) -v $(LINUX_VERSION)
PATH=$(LINUX_DIR)/scripts/dtc:$(PATH) mkimage $(if $(findstring external,$(word 3,$(1))),\