Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v3 1/2] linux: add support for device tree overlays
@ 2024-12-13  8:34 Niklas Cassel via buildroot
  2024-12-13  8:34 ` [Buildroot] [PATCH v3 2/2] configs/rock5b: build and install rock5b " Niklas Cassel via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Niklas Cassel via buildroot @ 2024-12-13  8:34 UTC (permalink / raw)
  To: buildroot
  Cc: Kilian Zinnecker, Damien Le Moal, Thomas Petazzoni, Michael Walle,
	Niklas Cassel

From: Michael Walle <michael@walle.cc>

The linux kernel can build device tree overlays (.dtbo) itself. Add
support to build and copy them along with the actual device trees.
These can only be in-tree device tree overlays.

Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Niklas Cassel <cassel@kernel.org>
---
Changes since v2:
-Dropped support for out-of-tree device tree overlays, as Linux 6.12 no
 longer supports building an out-of-tree device tree by simply copying
 it to the kernel source directory (without also modifying the Makefile).

 linux/Config.in | 7 +++++++
 linux/linux.mk  | 3 ++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/linux/Config.in b/linux/Config.in
index f537dd7adf..c59b56786f 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -417,6 +417,13 @@ config BR2_LINUX_KERNEL_INTREE_DTS_NAME
 	  the trailing .dts. You can provide a list of
 	  dts files to build, separated by spaces.
 
+config BR2_LINUX_KERNEL_INTREE_DTSO_NAMES
+	string "In-tree Device Tree Overlay file names"
+	help
+	  Names of in-tree device tree overlay, without the trailing
+	  .dtso which should be built and installed into the target
+	  system, separated by spaces.
+
 config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
 	string "Out-of-tree Device Tree Source file paths"
 	help
diff --git a/linux/linux.mk b/linux/linux.mk
index 1d3d8fffa6..54b34d8281 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -203,6 +203,7 @@ endif
 LINUX_VERSION_PROBED = `MAKEFLAGS='$(filter-out w,$(MAKEFLAGS))' $(BR2_MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease 2>/dev/null`
 
 LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME))
+LINUX_DTSO_NAMES += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTSO_NAMES))
 
 # We keep only the .dts files, so that the user can specify both .dts
 # and .dtsi files in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH. Both will be
@@ -210,7 +211,7 @@ LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME))
 # actually be generated as .dtb.
 LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))
 
-LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME))
+LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME)) $(addsuffix .dtbo,$(LINUX_DTSO_NAMES))
 
 ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
 LINUX_IMAGE_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_IMAGE_NAME))
-- 
2.47.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-02-04 16:36 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13  8:34 [Buildroot] [PATCH v3 1/2] linux: add support for device tree overlays Niklas Cassel via buildroot
2024-12-13  8:34 ` [Buildroot] [PATCH v3 2/2] configs/rock5b: build and install rock5b " Niklas Cassel via buildroot
2024-12-13  8:53 ` [Buildroot] [PATCH v3 1/2] linux: add support for " Michael Walle via buildroot
2024-12-13  9:09   ` Niklas Cassel via buildroot
2024-12-13  9:35     ` Michael Walle via buildroot
2024-12-13  9:48       ` Niklas Cassel
2024-12-13 10:03         ` Michael Walle via buildroot
2025-02-04 16:36           ` Romain Naour via buildroot
2024-12-20 10:06 ` Niklas Cassel via buildroot
2025-01-02 11:48   ` Niklas Cassel via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox