From: Michael Riesch <michael.riesch@wolfvision.net>
To: ptxdist@pengutronix.de
Cc: christian.melki@t2data.com, m.tretter@pengutronix.de,
Michael Riesch <michael.riesch@wolfvision.net>
Subject: [ptxdist] [PATCH 2/2] kernel: activate support for device tree overlays
Date: Tue, 7 Dec 2021 16:39:05 +0100 [thread overview]
Message-ID: <20211207153905.2386379-3-michael.riesch@wolfvision.net> (raw)
In-Reply-To: <20211207153905.2386379-1-michael.riesch@wolfvision.net>
Activate the recently introduced support for device tree overlays
for the kernel package.
Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net>
---
platforms/kernel.in | 28 +++++++++++++++++++++++++++-
rules/kernel.make | 9 +++++++++
2 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/platforms/kernel.in b/platforms/kernel.in
index 9976436ce..2c332e2cb 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
@@ -200,6 +200,32 @@ config KERNEL_DTS
endif
+menuconfig KERNEL_DTBO
+ bool
+ 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
prompt "use code signing infrastructure"
select KERNEL_OPENSSL
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
--
2.30.2
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de
prev parent reply other threads:[~2021-12-07 15:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-07 15:39 [ptxdist] [PATCH 0/2] Add " Michael Riesch
2021-12-07 15:39 ` [ptxdist] [PATCH 1/2] ptxd_make_world_{dtb, dtbo}: add " Michael Riesch
2021-12-07 17:30 ` Christian Melki
2021-12-08 8:31 ` Michael Olbrich
2021-12-09 7:20 ` Michael Riesch
2021-12-09 8:53 ` Michael Olbrich
2021-12-09 9:58 ` Michael Riesch
2021-12-09 10:46 ` Michael Olbrich
2021-12-09 10:52 ` Michael Riesch
2021-12-09 6:26 ` Michael Riesch
2021-12-09 7:08 ` Michael Olbrich
2021-12-07 15:39 ` Michael Riesch [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211207153905.2386379-3-michael.riesch@wolfvision.net \
--to=michael.riesch@wolfvision.net \
--cc=christian.melki@t2data.com \
--cc=m.tretter@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox