summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Riesch <michael.riesch@wolfvision.net>2021-12-09 12:02:58 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2021-12-09 15:44:30 +0100
commite825644b85e9e8c9be99784c3edf3d63ab32bcec (patch)
tree90a112cf3602dda012b1b679aebe9cd02ec54c5f
parent2fafa7c4308db8d1e79dc3b5d2c9cb3400a16ff8 (diff)
downloadptxdist-e825644b85e9e8c9be99784c3edf3d63ab32bcec.tar.gz
ptxdist-e825644b85e9e8c9be99784c3edf3d63ab32bcec.tar.xz
kernel: activate support for device tree overlays
Activate the recently introduced support for device tree overlays for the kernel package. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> Message-Id: <20211209110258.3307503-3-michael.riesch@wolfvision.net> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--platforms/kernel.in32
-rw-r--r--rules/kernel.make9
2 files changed, 40 insertions, 1 deletions
diff --git a/platforms/kernel.in b/platforms/kernel.in
index 9976436ce..9f355f5dc 100644
--- a/platforms/kernel.in
+++ b/platforms/kernel.in
@@ -186,7 +186,7 @@ config KERNEL_DTS_PATH
help
Define path to the dts source file. Multiple directories can be
specified separated by ':'. A relative path will be expanded relative
- to the workspace and all other layers. Only on of the specified paths
+ to the workspace and all other layers. Only one of the specified paths
can be a relative path.
config KERNEL_DTS
@@ -198,6 +198,36 @@ config KERNEL_DTS
is used as a search path for the device tree files specified
here. Multiple dts files can be specified, separated by spaces.
+config KERNEL_DTS_SUPPORT_OVERLAYS
+ bool
+
+endif
+
+menuconfig KERNEL_DTBO
+ bool
+ select KERNEL_DTS_SUPPORT_OVERLAYS
+ prompt "Build device tree overlays "
+
+if KERNEL_DTBO
+
+config KERNEL_DTSO_PATH
+ string "path to overlay file(s)"
+ default "${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts/overlays:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
+ help
+ Define path to the dts(o) source file(s). Multiple directories can be
+ specified separated by ':'. A relative path will be expanded relative
+ to the workspace and all other layers. Only one of the specified paths
+ can be a relative path.
+
+config KERNEL_DTSO
+ string "overlay file(s)"
+ default "<youroverlay>.dtso"
+ help
+ Select the dts(o) file(s) to be compiled. For relative file
+ names KERNEL_DTSO_PATH is used as a search path for the device
+ tree files specified here.
+ Multiple dts(o) files can be specified, separated by spaces.
+
endif
config KERNEL_CODE_SIGNING
diff --git a/rules/kernel.make b/rules/kernel.make
index 0ecf5f4e9..1b70faf21 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -29,7 +29,11 @@ KERNEL_BUILD_DIR := $(KERNEL_DIR)-build
KERNEL_CONFIG := $(call ptx/in-platformconfigdir, $(call remove_quotes, $(PTXCONF_KERNEL_CONFIG)))
KERNEL_DTS_PATH := $(call remove_quotes,$(PTXCONF_KERNEL_DTS_PATH))
KERNEL_DTS := $(call remove_quotes,$(PTXCONF_KERNEL_DTS))
+KERNEL_DTSO_PATH := $(call remove_quotes,$(PTXCONF_KERNEL_DTSO_PATH))
+KERNEL_DTSO := $(call remove_quotes,$(PTXCONF_KERNEL_DTSO))
KERNEL_DTB_FILES := $(addsuffix .dtb,$(basename $(KERNEL_DTS)))
+KERNEL_DTBO_FILES := $(addsuffix .dtbo,$(basename $(KERNEL_DTSO)))
+KERNEL_DTBO_DIR := /boot/overlays
KERNEL_LICENSE := GPL-2.0-only
KERNEL_SOURCE := $(SRCDIR)/$(KERNEL).$(KERNEL_SUFFIX)
KERNEL_DEVPKG := NO
@@ -265,6 +269,7 @@ ifdef PTXCONF_KERNEL_MODULES_INSTALL
@$(call world/install, KERNEL)
endif
@$(call world/dtb, KERNEL)
+ @$(call world/dtbo, KERNEL)
@$(call touch)
# ----------------------------------------------------------------------------
@@ -294,6 +299,10 @@ ifdef PTXCONF_KERNEL_INSTALL
@$(foreach dtb, $(KERNEL_DTB_FILES), \
$(call install_copy, kernel, 0, 0, 0644, -, \
/boot/$(dtb), n)$(ptx/nl))
+
+ @$(foreach dtbo, $(KERNEL_DTBO_FILES), \
+ $(call install_copy, kernel, 0, 0, 0644, -, \
+ $(KERNEL_DTBO_DIR)/$(dtbo), n)$(ptx/nl))
endif
# install the ELF kernel image for debugging purpose