aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/image-commands.mk2
-rw-r--r--include/image.mk19
-rwxr-xr-xscripts/mkits.sh9
3 files changed, 22 insertions, 8 deletions
diff --git a/include/image-commands.mk b/include/image-commands.mk
index ea602662a5..1d69485019 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -307,7 +307,7 @@ define Build/fit
$(if $(DEVICE_FDT_NUM),-n $(DEVICE_FDT_NUM)) \
$(if $(DEVICE_DTS_DELIMITER),-l $(DEVICE_DTS_DELIMITER)) \
$(if $(DEVICE_DTS_LOADADDR),-s $(DEVICE_DTS_LOADADDR)) \
- $(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtb)) \
+ $(if $(DEVICE_DTS_OVERLAY),$(foreach dtso,$(DEVICE_DTS_OVERLAY), -O $(dtso):$(KERNEL_BUILD_DIR)/image-$(dtso).dtbo)) \
-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))),\
diff --git a/include/image.mk b/include/image.mk
index 0eae216ded..0cf110df93 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -555,15 +555,32 @@ define Device/Build/dtb
endif
endef
+
+define Device/Build/dtbo
+ ifndef BUILD_DTS_$(1)
+ BUILD_DTS_$(1) := 1
+ $(KDIR)/image-$(1).dtbo: FORCE
+ $(call Image/BuildDTB,$(strip $(2))/$(strip $(3)).dtso,$$@)
+
+ image_prepare: $(KDIR)/image-$(1).dtbo
+ endif
+
+endef
endif
define Device/Build/kernel
- $$(eval $$(foreach dts,$$(DEVICE_DTS) $$(DEVICE_DTS_OVERLAY), \
+ $$(eval $$(foreach dts,$$(DEVICE_DTS), \
$$(call Device/Build/dtb,$$(notdir $$(dts)), \
$$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
$$(dts) \
) \
))
+ $$(eval $$(foreach dtso,$$(DEVICE_DTS_OVERLAY), \
+ $$(call Device/Build/dtbo,$$(notdir $$(dtso)), \
+ $$(if $$(DEVICE_DTS_DIR),$$(DEVICE_DTS_DIR),$$(DTS_DIR)), \
+ $$(dtso) \
+ ) \
+ ))
$(KDIR)/$$(KERNEL_NAME):: image_prepare
$$(_TARGET): $$(if $$(KERNEL_INSTALL),$(BIN_DIR)/$$(KERNEL_IMAGE))
diff --git a/scripts/mkits.sh b/scripts/mkits.sh
index bf75d69f09..b1c6f98867 100755
--- a/scripts/mkits.sh
+++ b/scripts/mkits.sh
@@ -191,13 +191,10 @@ OVCONFIGS=""
"
OVCONFIGS="$OVCONFIGS
- config-$ovname {
- description = \"OpenWrt ${DEVICE} with $ovname\";
- kernel = \"kernel${REFERENCE_CHAR}1\";
- fdt = \"fdt${REFERENCE_CHAR}$FDTNUM\", \"$ovnode\";
- ${LOADABLES:+loadables = ${LOADABLES};}
+ $ovname {
+ description = \"OpenWrt ${DEVICE} overlay $ovname\";
+ fdt = \"$ovnode\";
${COMPATIBLE_PROP}
- ${INITRD_PROP}
};
"
done