* [Buildroot] [PATCH v5 1/6] linux: add support for device tree overlays
@ 2025-02-04 16:36 Romain Naour via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 2/6] configs/rock5b: build and install rock5b " Romain Naour via buildroot
` (4 more replies)
0 siblings, 5 replies; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-04 16:36 UTC (permalink / raw)
To: buildroot; +Cc: Michael Walle, Niklas Cassel, Romain Naour
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 either be in-tree device tree overlays
(BR2_LINUX_KERNEL_INTREE_DTSO_NAMES) or they can be provided outside of
the kernel (BR2_LINUX_KERNEL_CUSTOM_DTS_PATH). In the latter case, the
overlay source files will be copied into the kernel tree first.
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
v2: https://lore.kernel.org/buildroot/20240902112735.728574-1-michael@walle.cc/
---
linux/Config.in | 14 +++++++++++---
linux/linux.mk | 7 +++++--
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/linux/Config.in b/linux/Config.in
index 63e64c5d65..90aed24775 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -426,12 +426,20 @@ 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
- Paths to out-of-tree Device Tree Source (.dts) and Device Tree
- Source Include (.dtsi) files, separated by spaces. These files
- will be copied to the kernel sources and the .dts files will
+ Paths to out-of-tree Device Tree Source (.dts), Device Tree
+ Source Include (.dtsi) and Device Tree Overlay Source (.dtso)
+ files, separated by spaces. These files will be copied to the
+ kernel sources and the .dts files will
be compiled from there.
config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME
diff --git a/linux/linux.mk b/linux/linux.mk
index 12699b8ee4..9c621c18d5 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -203,14 +203,17 @@ 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
# copied to arch/<arch>/boot/dts, but only the .dts files will
# actually be generated as .dtb.
-LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))
+LINUX_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))
+LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(LINUX_CUSTOM_DTS_PATH))))
+LINUX_DTSO_NAMES += $(basename $(filter %.dtso,$(notdir $(LINUX_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.48.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v5 2/6] configs/rock5b: build and install rock5b device tree overlays
2025-02-04 16:36 [Buildroot] [PATCH v5 1/6] linux: add support for device tree overlays Romain Naour via buildroot
@ 2025-02-04 16:36 ` Romain Naour via buildroot
2025-02-20 13:25 ` Niklas Cassel via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR Romain Naour via buildroot
` (3 subsequent siblings)
4 siblings, 1 reply; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-04 16:36 UTC (permalink / raw)
To: buildroot; +Cc: Niklas Cassel, Romain Naour
From: Niklas Cassel <cassel@kernel.org>
Build and install all in-tree rock5b device tree overlays.
The device tree overlays will be available in /boot, such that it is
possible for u-boot to apply one (or many) of them before booting Linux.
Signed-off-by: Niklas Cassel <cassel@kernel.org>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
v2: https://lore.kernel.org/buildroot/20241213083430.4121422-2-niklas.cassel@wdc.com/
---
configs/rock5b_defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/configs/rock5b_defconfig b/configs/rock5b_defconfig
index 47a7acc083..3fef4a9d99 100644
--- a/configs/rock5b_defconfig
+++ b/configs/rock5b_defconfig
@@ -17,6 +17,7 @@ BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/radxa/rock5b/linux.fragment"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="rockchip/rk3588-rock-5b"
+BR2_LINUX_KERNEL_INTREE_DTSO_NAMES="rockchip/rk3588-rock-5b-pcie-srns rockchip/rk3588-rock-5b-pcie-ep"
BR2_LINUX_KERNEL_DTB_OVERLAY_SUPPORT=y
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
--
2.48.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
2025-02-04 16:36 [Buildroot] [PATCH v5 1/6] linux: add support for device tree overlays Romain Naour via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 2/6] configs/rock5b: build and install rock5b " Romain Naour via buildroot
@ 2025-02-04 16:36 ` Romain Naour via buildroot
2025-02-18 13:59 ` Niklas Cassel via buildroot
2025-02-20 13:49 ` Niklas Cassel via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 4/6] configs/acmesystems_acqua_a5_*: bump to Linux 6.12.9 Romain Naour via buildroot
` (2 subsequent siblings)
4 siblings, 2 replies; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-04 16:36 UTC (permalink / raw)
To: buildroot
Cc: Romain Naour, Michael Walle, Gaël PORTAY, Chris Packham,
Edgar Bonet
Since Linux 6.12, the Buildroot option BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
does not work as expected on arm, arm64, mips and ricv.[1] These are the
architectures that store the in-tree DTS files in vendor-specific
subdirectories of arch/$ARCH/boot/dts/.
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH was introduced in Buildroot 2012.08
(commit 69fc497df0ae "Rework support for the device tree"). At the time,
the kernel kept all in-tree DTS files directly in arch/$ARCH/boot/dts/,
and this is where Buildroot drops the user's custom DTS. Vendor-specific
subdirectories appeared in Linux v3.19 for the arm64 architecture, and
this scheme was later adopted by mips, riscv and arm.
For these architectures, Linux 6.12 (commit e7e2941300d2, "kbuild: split
device tree build rules into scripts/Makefile.dtbs") made the DTB build
infrastructure incompatible with the way
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is implemented. This infrastructure now
expects all DTS files to be in vendor-specific subdirectories on the
architectures that use this scheme.
We can't update easily the current behavior of
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH since it expect a list of files but
can also be used "unexpectedly" with directories [2].
BR2_LINUX_KERNEL_INTREE_DTS_NAME="st/stm32mp135f-dk-mx"
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_ST_PATH)/[...]/linux-dts/st"
In this case, the st directory is copied into the arch/$ARCH/boot/dts/
and BR2_LINUX_KERNEL_INTREE_DTS_NAME is used to build stm32mp135f-dk-mx dtb
as if it was intree.
Introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR configuration
parameter to specify a list of directories that are copied as-is over
the arch/<arch>/boot/dts/ directory before building the device tree
blob:
board/acmesystems/acqua-a5/dts/
└── microchip
└── at91-sama5d3_acqua.dts
defconfig:
BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
Each dts file found is automatically added to the list of devicetree
to build.
BR2_LINUX_KERNEL_CUSTOM_DTS_DIR can also be used for external
devicetree overlays files:
board/ti/am574x-idk/dts/
└── ti
└── omap
└── am57xx-evm.dtso
With this new option, BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is now deprecated.
Note: We want to create a list of dts files (LINUX_DTS_LIST) present in
diectrories listed by BR2_LINUX_KERNEL_CUSTOM_DTS_DIR. But
LINUX_DTS_LIST must not contain BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
paths. Use GNU 'find' print format %P to print each dts file path
without their respective dts overlay directory path.
Do the same for LINUX_DTSO_LIST.
Thanks to Edgar Bonet for the initial contribution [3].
[1] https://lists.buildroot.org/pipermail/buildroot/2024-October/765463.html
[2] https://github.com/bootlin/buildroot-external-st/blob/541ba7d96330cd7da5674b46806b549a7ccf9da8/configs/st_stm32mp135f_dk_demo_defconfig#L21
[3] https://lore.kernel.org/buildroot/93f83afb-6987-441c-8e06-dab4d43b828f@grenoble.cnrs.fr/
Cc: Michael Walle <michael@walle.cc>
Cc: Gaël PORTAY <gael.portay+rtone@gmail.com>
Reported-by: Chris Packham <judge.packham@gmail.com>
Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
[Romain:
- Rework the initial contribution by Edgar Bonet by
BR2_LINUX_KERNEL_CUSTOM_DTS_DIR following
Michael Walle comments and Gaël PORTAY review.
- Reword the commit log accordingly.
]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Changes v4 -> v5:
- Rename LINUX_INSTALL_CUSTOM_DTS_OVERLAY to LINUX_COPY_CUSTOM_DTS_FILES
- Rename LINUX_KERNEL_CUSTOM_DTS_PATH_OVERLAY to LINUX_KERNEL_CUSTOM_DTS_DIR
- Add devicetree overlay support
- Update authorship of the commit:
https://lore.kernel.org/buildroot/98d47c49-0e68-4d07-b2c9-1d67a6fd0e13@grenoble.cnrs.fr/
Changes v3 -> v4:
- Replace hooks added in v2 and add a new option to provide DTS overlay
https://lore.kernel.org/buildroot/D6UG5Z1HUN9N.GWVHB4L823ZC@kernel.org/
Changes v2 -> v3:
- note, in the comment and in the log message, that this issue only
affects some architectures
- expand the log message with some historical context
These changes were suggested by Romain Naour.
Changes v1 -> v2:
- define a hook for LINUX_POST_PATCH_HOOKS and LINUX_POST_RSYNC_HOOKS
instead of modifying LINUX_BUILD_CMDS
- use $(patsubst %.dts,%.dtb,$(dts)) instead of $(dts:%.dts=%.dtb)
both changes suggested by Arnout Vandecappelle.
This was build-tested with an Acqua defconfig,
in the same manner as v2:
# Test with an old kernel: v6.6.30
make acmesystems_acqua_a5_512mb_defconfig
make linux
# Test with a new kernel: v6.12.8
make linux-dirclean
git am bump_Acqua_kernel_to_v6.12.8.patch
make acmesystems_acqua_a5_512mb_defconfig
make linux
# Test the OVERRIDE_SRCDIR case.
make linux-dirclean
git -C $HOME/src/linux checkout v6.12.8
echo "LINUX_OVERRIDE_SRCDIR = $HOME/src/linux" > local.mk
make acmesystems_acqua_a5_512mb_defconfig
make linux
---
linux/Config.in | 25 +++++++++++++++++++++++++
linux/linux.mk | 17 +++++++++++++++++
2 files changed, 42 insertions(+)
diff --git a/linux/Config.in b/linux/Config.in
index 90aed24775..104343a718 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -435,6 +435,7 @@ config BR2_LINUX_KERNEL_INTREE_DTSO_NAMES
config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
string "Out-of-tree Device Tree Source file paths"
+ depends on BR2_LINUX_KERNEL_CUSTOM_DTS_DIR = ""
help
Paths to out-of-tree Device Tree Source (.dts), Device Tree
Source Include (.dtsi) and Device Tree Overlay Source (.dtso)
@@ -442,6 +443,30 @@ config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
kernel sources and the .dts files will
be compiled from there.
+ Due to a kernel build system changes in 6.12,
+ BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is now deprecated and
+ replaced by BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
+
+config BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
+ string "Out-of-tree Device Tree Source overlay directories"
+ help
+ Specify a list of directories that are copied as-is over the
+ arch/<arch>/boot/dts/ directory before building the device
+ tree blob.
+
+ This overlay can contain dts, dtso and dtsi files.
+
+ For pre-6.12 kernels or older architectures, the dts files
+ appear directly under this directory. For newer kernels and
+ architectures, the dts files must be in the appropriate
+ subdirectory.
+
+ Newer architectures like ARM64 and RISC-V keep their device
+ tree sources organized by vendor sub-directories.
+
+ Since the 6.12 release, each out-of-tree Device Tree Source
+ file must be copied into their corresponding sub-directory.
+
config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME
bool "Keep the directory name of the Device Tree"
help
diff --git a/linux/linux.mk b/linux/linux.mk
index 9c621c18d5..f915823dcf 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -213,6 +213,22 @@ LINUX_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))
LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(LINUX_CUSTOM_DTS_PATH))))
LINUX_DTSO_NAMES += $(basename $(filter %.dtso,$(notdir $(LINUX_CUSTOM_DTS_PATH))))
+LINUX_KERNEL_CUSTOM_DTS_DIR = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_DIR))
+ifneq ($(LINUX_KERNEL_CUSTOM_DTS_DIR),)
+# Use evaluation-during-assignment using := to avoid any re-evaluation
+# of LINUX_DTS_LIST when LINUX_DTS_NAME is used.
+LINUX_DTS_LIST := $(shell find $(LINUX_KERNEL_CUSTOM_DTS_DIR) -name '*.dts' -printf '%P\n' 2>/dev/null)
+LINUX_DTSO_LIST := $(shell find $(LINUX_KERNEL_CUSTOM_DTS_DIR) -name '*.dtso' -printf '%P\n' 2>/dev/null)
+LINUX_DTS_NAME += $(basename $(LINUX_DTS_LIST))
+LINUX_DTSO_NAMES += $(basename $(LINUX_DTSO_LIST))
+
+define LINUX_COPY_CUSTOM_DTS_FILES
+ $(foreach d, $(LINUX_KERNEL_CUSTOM_DTS_DIR), \
+ @$(call MESSAGE,"Copying devicetree overlay $(d)")$(sep) \
+ $(Q)$(call SYSTEM_RSYNC,$(d),$(LINUX_ARCH_PATH)/boot/dts/)$(sep))
+endef
+endif
+
LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME)) $(addsuffix .dtbo,$(LINUX_DTSO_NAMES))
ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
@@ -527,6 +543,7 @@ define LINUX_BUILD_CMDS
$(foreach dts,$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)), \
cp -f $(dts) $(LINUX_ARCH_PATH)/boot/dts/
)
+ $(LINUX_COPY_CUSTOM_DTS_FILES)
$(LINUX_MAKE_ENV) $(BR2_MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) all
$(LINUX_MAKE_ENV) $(BR2_MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
$(LINUX_BUILD_DTB)
--
2.48.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v5 4/6] configs/acmesystems_acqua_a5_*: bump to Linux 6.12.9
2025-02-04 16:36 [Buildroot] [PATCH v5 1/6] linux: add support for device tree overlays Romain Naour via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 2/6] configs/rock5b: build and install rock5b " Romain Naour via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR Romain Naour via buildroot
@ 2025-02-04 16:36 ` Romain Naour via buildroot
2025-02-20 13:25 ` Niklas Cassel
2025-02-04 16:36 ` [Buildroot] [PATCH v5 5/6] [WIP] am57 kernel version bump 6.12 Romain Naour via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 6/6] [WIP] am57: add dtso example Romain Naour via buildroot
4 siblings, 1 reply; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-04 16:36 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour, Edgar Bonet
Use the newly introduced BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
option to provide the Out-of-tree Device Tree Source file with
its vendor subdirectory that is needed since kernel 6.12 [1].
Revert the sama5d31.dtsi include path update added by the previous
kernel version bump 6.6.12 [2].
As noticed by Michael Walle, newer OOT device trees should use the
same #include directives as the in-tree device trees to ease
sharing the files between u-boot, linux and OOT external trees [3].
[1] https://lists.buildroot.org/pipermail/buildroot/2024-October/765463.html
[2] 8fb5209885 ("configs/acmesystems_acqua_a5_*: bump to Linux 6.6.12")
[3] https://lore.kernel.org/buildroot/D6UG5Z1HUN9N.GWVHB4L823ZC@kernel.org/
Cc: Edgar Bonet <bonet@grenoble.cnrs.fr>
Acked-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
Tested-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
Runtime testing:
v4: https://lore.kernel.org/buildroot/e68817f0-312c-4980-837c-7264656457ca@grenoble.cnrs.fr/
---
.../acqua-a5/{ => dts/microchip}/at91-sama5d3_acqua.dts | 2 +-
board/acmesystems/acqua-a5/patches/linux/linux.hash | 2 +-
configs/acmesystems_acqua_a5_256mb_defconfig | 6 +++---
configs/acmesystems_acqua_a5_512mb_defconfig | 6 +++---
4 files changed, 8 insertions(+), 8 deletions(-)
rename board/acmesystems/acqua-a5/{ => dts/microchip}/at91-sama5d3_acqua.dts (99%)
diff --git a/board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts b/board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
similarity index 99%
rename from board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts
rename to board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
index 411d1942f5..60be8a67cd 100644
--- a/board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts
+++ b/board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
@@ -9,7 +9,7 @@
* Licensed under GPLv2 or later.
*/
/dts-v1/;
-#include "microchip/sama5d31.dtsi"
+#include "sama5d31.dtsi"
/ {
model = "Acme Systems Acqua SOM";
diff --git a/board/acmesystems/acqua-a5/patches/linux/linux.hash b/board/acmesystems/acqua-a5/patches/linux/linux.hash
index 4b20a009a7..7a4c4e57c9 100644
--- a/board/acmesystems/acqua-a5/patches/linux/linux.hash
+++ b/board/acmesystems/acqua-a5/patches/linux/linux.hash
@@ -1,2 +1,2 @@
# Locally calculated
-sha256 b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6 linux-6.6.30.tar.xz
+sha256 87be0360df0931b340d2bac35161a548070fbc3a8c352c49e21e96666c26aeb4 linux-6.12.9.tar.xz
diff --git a/configs/acmesystems_acqua_a5_256mb_defconfig b/configs/acmesystems_acqua_a5_256mb_defconfig
index b102dde0ba..a50e306b1b 100644
--- a/configs/acmesystems_acqua_a5_256mb_defconfig
+++ b/configs/acmesystems_acqua_a5_256mb_defconfig
@@ -2,7 +2,7 @@ BR2_arm=y
BR2_cortex_a5=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_INSTRUCTIONS_THUMB2=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
BR2_GLOBAL_PATCH_DIR="board/acmesystems/acqua-a5/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_SYSTEM_DHCP="eth0"
@@ -10,10 +10,10 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/acqua-a5/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
BR2_LINUX_KERNEL_DEFCONFIG="sama5"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts"
+BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
diff --git a/configs/acmesystems_acqua_a5_512mb_defconfig b/configs/acmesystems_acqua_a5_512mb_defconfig
index da54eaf620..6ae8d037e7 100644
--- a/configs/acmesystems_acqua_a5_512mb_defconfig
+++ b/configs/acmesystems_acqua_a5_512mb_defconfig
@@ -2,7 +2,7 @@ BR2_arm=y
BR2_cortex_a5=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_INSTRUCTIONS_THUMB2=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
BR2_GLOBAL_PATCH_DIR="board/acmesystems/acqua-a5/patches"
BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
BR2_SYSTEM_DHCP="eth0"
@@ -10,10 +10,10 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/acqua-a5/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
BR2_LINUX_KERNEL_DEFCONFIG="sama5"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
-BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts"
+BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
--
2.48.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v5 5/6] [WIP] am57 kernel version bump 6.12
2025-02-04 16:36 [Buildroot] [PATCH v5 1/6] linux: add support for device tree overlays Romain Naour via buildroot
` (2 preceding siblings ...)
2025-02-04 16:36 ` [Buildroot] [PATCH v5 4/6] configs/acmesystems_acqua_a5_*: bump to Linux 6.12.9 Romain Naour via buildroot
@ 2025-02-04 16:36 ` Romain Naour via buildroot
2025-02-20 13:25 ` Niklas Cassel via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 6/6] [WIP] am57: add dtso example Romain Naour via buildroot
4 siblings, 1 reply; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-04 16:36 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
configs/am574x_idk_defconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configs/am574x_idk_defconfig b/configs/am574x_idk_defconfig
index 5d3ec12ad6..4b90d12745 100644
--- a/configs/am574x_idk_defconfig
+++ b/configs/am574x_idk_defconfig
@@ -1,13 +1,13 @@
BR2_arm=y
BR2_cortex_a15=y
-BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
BR2_SYSTEM_DHCP="eth0"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am574x-idk/post-build.sh"
BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am574x-idk/genimage.cfg"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.14"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
BR2_LINUX_KERNEL_DEFCONFIG="multi_v7"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/omap/am574x-idk"
--
2.48.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [Buildroot] [PATCH v5 6/6] [WIP] am57: add dtso example
2025-02-04 16:36 [Buildroot] [PATCH v5 1/6] linux: add support for device tree overlays Romain Naour via buildroot
` (3 preceding siblings ...)
2025-02-04 16:36 ` [Buildroot] [PATCH v5 5/6] [WIP] am57 kernel version bump 6.12 Romain Naour via buildroot
@ 2025-02-04 16:36 ` Romain Naour via buildroot
2025-02-20 13:25 ` Niklas Cassel via buildroot
4 siblings, 1 reply; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-04 16:36 UTC (permalink / raw)
To: buildroot; +Cc: Romain Naour
Only for testing external dtso build.
Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
.../ti/am574x-idk/dts/ti/omap/am57xx-evm.dtso | 127 ++++++++++++++++++
configs/am574x_idk_defconfig | 1 +
2 files changed, 128 insertions(+)
create mode 100644 board/ti/am574x-idk/dts/ti/omap/am57xx-evm.dtso
diff --git a/board/ti/am574x-idk/dts/ti/omap/am57xx-evm.dtso b/board/ti/am574x-idk/dts/ti/omap/am57xx-evm.dtso
new file mode 100644
index 0000000000..12385a3106
--- /dev/null
+++ b/board/ti/am574x-idk/dts/ti/omap/am57xx-evm.dtso
@@ -0,0 +1,127 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * DT overlay for AM57xx GP EVM boards
+ *
+ * Copyright (C) 2020-2022 Texas Instruments Incorporated - https://www.ti.com/
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/interrupt-controller/irq.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+&{/} {
+ compatible = "ti,am5728-evm", "ti,am572x-beagle-x15", "ti,am5728", "ti,dra742", "ti,dra74", "ti,dra7";
+ model = "TI AM5728 EVM";
+
+ aliases {
+ display0 = "/display";
+ display1 = "/connector"; // Fixme: &lcd0 and &hdmi0 could be
+ // resolved here correcly based on
+ // information in the base dtb symbol
+ // table with a fix in dtc
+ };
+
+ gpio-keys {
+ compatible = "gpio-keys";
+
+ button-user1 {
+ gpios = <&gpio2 23 GPIO_ACTIVE_LOW>;
+ label = "USER1";
+ linux,code = <BTN_1>;
+ };
+
+ button-user2 {
+ gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
+ label = "USER2";
+ linux,code = <BTN_2>;
+ };
+
+ button-user3 {
+ gpios = <&gpio2 28 GPIO_ACTIVE_LOW>;
+ label = "USER3";
+ linux,code = <BTN_3>;
+ };
+
+ button-user4 {
+ gpios = <&gpio2 24 GPIO_ACTIVE_LOW>;
+ label = "USER4";
+ linux,code = <BTN_4>;
+ };
+
+ button-user5 {
+ gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+ label = "USER5";
+ linux,code = <BTN_5>;
+ };
+ };
+
+ lcd0: display {
+ compatible = "osddisplays,osd070t1718-19ts", "panel-dpi";
+ backlight = <&lcd_bl>;
+ enable-gpios = <&gpio2 5 GPIO_ACTIVE_HIGH>;
+ label = "lcd";
+
+ port {
+ lcd_in: endpoint {
+ remote-endpoint = <&dpi_out>;
+ };
+ };
+ };
+
+ lcd_bl: backlight {
+ compatible = "pwm-backlight";
+ brightness-levels = <0 243 245 247 249 251 252 253 255>;
+ default-brightness-level = <8>;
+ pwms = <&ehrpwm1 0 50000 0>;
+ };
+};
+
+&ehrpwm1 {
+ status = "okay";
+};
+
+&epwmss1 {
+ status = "okay";
+};
+
+&i2c5 {
+ status = "okay";
+ clock-frequency = <400000>;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ touchscreen@5c {
+ compatible = "pixcir,pixcir_tangoc";
+ attb-gpio = <&gpio2 4 GPIO_ACTIVE_HIGH>;
+ interrupt-parent = <&gpio2>;
+ interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
+ reg = <0x5c>;
+ reset-gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>;
+ touchscreen-size-x = <1024>;
+ touchscreen-size-y = <600>;
+ };
+};
+
+&uart8 {
+ status = "okay";
+};
+
+&dss {
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dpi_out: endpoint {
+ data-lines = <24>;
+ remote-endpoint = <&lcd_in>;
+ };
+ };
+ };
+};
diff --git a/configs/am574x_idk_defconfig b/configs/am574x_idk_defconfig
index 4b90d12745..b1aaec0f6a 100644
--- a/configs/am574x_idk_defconfig
+++ b/configs/am574x_idk_defconfig
@@ -10,6 +10,7 @@ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
BR2_LINUX_KERNEL_DEFCONFIG="multi_v7"
BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/ti/am574x-idk/dts"
BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/omap/am574x-idk"
BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
BR2_TARGET_ROOTFS_EXT2=y
--
2.48.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
2025-02-04 16:36 ` [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR Romain Naour via buildroot
@ 2025-02-18 13:59 ` Niklas Cassel via buildroot
2025-02-20 8:58 ` Romain Naour via buildroot
2025-02-20 13:49 ` Niklas Cassel via buildroot
1 sibling, 1 reply; 16+ messages in thread
From: Niklas Cassel via buildroot @ 2025-02-18 13:59 UTC (permalink / raw)
To: Romain Naour
Cc: buildroot@buildroot.org, Michael Walle, Gaël PORTAY,
Chris Packham, Edgar Bonet
Hello Romain,
Any update on this series?
Kind regards,
Niklas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
2025-02-18 13:59 ` Niklas Cassel via buildroot
@ 2025-02-20 8:58 ` Romain Naour via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-20 8:58 UTC (permalink / raw)
To: Niklas Cassel
Cc: buildroot@buildroot.org, Michael Walle, Gaël PORTAY,
Chris Packham, Edgar Bonet
Hello Niklas, All,
Le 18/02/2025 à 14:59, Niklas Cassel a écrit :
> Hello Romain,
>
> Any update on this series?
May I ask for a review-by and/or tested-by tag for this series?
Thanks!
Best regards,
Romain
>
>
> Kind regards,
> Niklas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 2/6] configs/rock5b: build and install rock5b device tree overlays
2025-02-04 16:36 ` [Buildroot] [PATCH v5 2/6] configs/rock5b: build and install rock5b " Romain Naour via buildroot
@ 2025-02-20 13:25 ` Niklas Cassel via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Niklas Cassel via buildroot @ 2025-02-20 13:25 UTC (permalink / raw)
To: Romain Naour; +Cc: buildroot@buildroot.org, Niklas Cassel
On Tue, Feb 04, 2025 at 05:36:17PM +0100, Romain Naour via buildroot wrote:
> From: Niklas Cassel <cassel@kernel.org>
>
> Build and install all in-tree rock5b device tree overlays.
>
> The device tree overlays will be available in /boot, such that it is
> possible for u-boot to apply one (or many) of them before booting Linux.
>
> Signed-off-by: Niklas Cassel <cassel@kernel.org>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
FWIW:
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 4/6] configs/acmesystems_acqua_a5_*: bump to Linux 6.12.9
2025-02-04 16:36 ` [Buildroot] [PATCH v5 4/6] configs/acmesystems_acqua_a5_*: bump to Linux 6.12.9 Romain Naour via buildroot
@ 2025-02-20 13:25 ` Niklas Cassel
2025-02-21 22:36 ` Romain Naour via buildroot
0 siblings, 1 reply; 16+ messages in thread
From: Niklas Cassel @ 2025-02-20 13:25 UTC (permalink / raw)
To: Romain Naour; +Cc: buildroot@buildroot.org, Edgar Bonet
On Tue, Feb 04, 2025 at 05:36:19PM +0100, Romain Naour via buildroot wrote:
> Use the newly introduced BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
> option to provide the Out-of-tree Device Tree Source file with
> its vendor subdirectory that is needed since kernel 6.12 [1].
>
> Revert the sama5d31.dtsi include path update added by the previous
> kernel version bump 6.6.12 [2].
>
> As noticed by Michael Walle, newer OOT device trees should use the
> same #include directives as the in-tree device trees to ease
> sharing the files between u-boot, linux and OOT external trees [3].
>
> [1] https://lists.buildroot.org/pipermail/buildroot/2024-October/765463.html
> [2] 8fb5209885 ("configs/acmesystems_acqua_a5_*: bump to Linux 6.6.12")
> [3] https://lore.kernel.org/buildroot/D6UG5Z1HUN9N.GWVHB4L823ZC@kernel.org/
>
> Cc: Edgar Bonet <bonet@grenoble.cnrs.fr>
> Acked-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
> Tested-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
> Runtime testing:
> v4: https://lore.kernel.org/buildroot/e68817f0-312c-4980-837c-7264656457ca@grenoble.cnrs.fr/
> ---
> .../acqua-a5/{ => dts/microchip}/at91-sama5d3_acqua.dts | 2 +-
> board/acmesystems/acqua-a5/patches/linux/linux.hash | 2 +-
> configs/acmesystems_acqua_a5_256mb_defconfig | 6 +++---
> configs/acmesystems_acqua_a5_512mb_defconfig | 6 +++---
> 4 files changed, 8 insertions(+), 8 deletions(-)
> rename board/acmesystems/acqua-a5/{ => dts/microchip}/at91-sama5d3_acqua.dts (99%)
>
> diff --git a/board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts b/board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
> similarity index 99%
> rename from board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts
> rename to board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
> index 411d1942f5..60be8a67cd 100644
> --- a/board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts
> +++ b/board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
> @@ -9,7 +9,7 @@
> * Licensed under GPLv2 or later.
> */
> /dts-v1/;
> -#include "microchip/sama5d31.dtsi"
> +#include "sama5d31.dtsi"
>
> / {
> model = "Acme Systems Acqua SOM";
> diff --git a/board/acmesystems/acqua-a5/patches/linux/linux.hash b/board/acmesystems/acqua-a5/patches/linux/linux.hash
> index 4b20a009a7..7a4c4e57c9 100644
> --- a/board/acmesystems/acqua-a5/patches/linux/linux.hash
> +++ b/board/acmesystems/acqua-a5/patches/linux/linux.hash
> @@ -1,2 +1,2 @@
> # Locally calculated
> -sha256 b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6 linux-6.6.30.tar.xz
> +sha256 87be0360df0931b340d2bac35161a548070fbc3a8c352c49e21e96666c26aeb4 linux-6.12.9.tar.xz
> diff --git a/configs/acmesystems_acqua_a5_256mb_defconfig b/configs/acmesystems_acqua_a5_256mb_defconfig
> index b102dde0ba..a50e306b1b 100644
> --- a/configs/acmesystems_acqua_a5_256mb_defconfig
> +++ b/configs/acmesystems_acqua_a5_256mb_defconfig
> @@ -2,7 +2,7 @@ BR2_arm=y
> BR2_cortex_a5=y
> BR2_ARM_ENABLE_VFP=y
> BR2_ARM_INSTRUCTIONS_THUMB2=y
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
> BR2_GLOBAL_PATCH_DIR="board/acmesystems/acqua-a5/patches"
> BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
> BR2_SYSTEM_DHCP="eth0"
> @@ -10,10 +10,10 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/acqua-a5/genimage.cfg"
> BR2_LINUX_KERNEL=y
> BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
> BR2_LINUX_KERNEL_DEFCONFIG="sama5"
> BR2_LINUX_KERNEL_DTS_SUPPORT=y
> -BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts"
> +BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
> BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> BR2_TARGET_ROOTFS_EXT2=y
> BR2_TARGET_ROOTFS_EXT2_4=y
> diff --git a/configs/acmesystems_acqua_a5_512mb_defconfig b/configs/acmesystems_acqua_a5_512mb_defconfig
> index da54eaf620..6ae8d037e7 100644
> --- a/configs/acmesystems_acqua_a5_512mb_defconfig
> +++ b/configs/acmesystems_acqua_a5_512mb_defconfig
> @@ -2,7 +2,7 @@ BR2_arm=y
> BR2_cortex_a5=y
> BR2_ARM_ENABLE_VFP=y
> BR2_ARM_INSTRUCTIONS_THUMB2=y
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
> BR2_GLOBAL_PATCH_DIR="board/acmesystems/acqua-a5/patches"
> BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
> BR2_SYSTEM_DHCP="eth0"
> @@ -10,10 +10,10 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/acqua-a5/genimage.cfg"
> BR2_LINUX_KERNEL=y
> BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
> BR2_LINUX_KERNEL_DEFCONFIG="sama5"
> BR2_LINUX_KERNEL_DTS_SUPPORT=y
> -BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts"
> +BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
> BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
> BR2_TARGET_ROOTFS_EXT2=y
> BR2_TARGET_ROOTFS_EXT2_4=y
> --
Personally I would split this into two patchs
patch 1/2: that uses BR2_LINUX_KERNEL_CUSTOM_DTS_DIR instead of
BR2_LINUX_KERNEL_CUSTOM_DTS_PATH and removes the vendor prefix
from the .dts.
patch 2/2: that bumps to linux 6.12.xx.
Regardless if splitting this patch or not:
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 5/6] [WIP] am57 kernel version bump 6.12
2025-02-04 16:36 ` [Buildroot] [PATCH v5 5/6] [WIP] am57 kernel version bump 6.12 Romain Naour via buildroot
@ 2025-02-20 13:25 ` Niklas Cassel via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Niklas Cassel via buildroot @ 2025-02-20 13:25 UTC (permalink / raw)
To: Romain Naour; +Cc: buildroot@buildroot.org
On Tue, Feb 04, 2025 at 05:36:20PM +0100, Romain Naour via buildroot wrote:
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
> configs/am574x_idk_defconfig | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configs/am574x_idk_defconfig b/configs/am574x_idk_defconfig
> index 5d3ec12ad6..4b90d12745 100644
> --- a/configs/am574x_idk_defconfig
> +++ b/configs/am574x_idk_defconfig
> @@ -1,13 +1,13 @@
> BR2_arm=y
> BR2_cortex_a15=y
> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
> BR2_SYSTEM_DHCP="eth0"
> BR2_ROOTFS_POST_BUILD_SCRIPT="board/ti/am574x-idk/post-build.sh"
> BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
> BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/ti/am574x-idk/genimage.cfg"
> BR2_LINUX_KERNEL=y
> BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.14"
> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
> BR2_LINUX_KERNEL_DEFCONFIG="multi_v7"
> BR2_LINUX_KERNEL_DTS_SUPPORT=y
> BR2_LINUX_KERNEL_INTREE_DTS_NAME="ti/omap/am574x-idk"
> --
> 2.48.1
>
Needs a proper commit message, or drop the patch.
Kind regards,
Niklas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 6/6] [WIP] am57: add dtso example
2025-02-04 16:36 ` [Buildroot] [PATCH v5 6/6] [WIP] am57: add dtso example Romain Naour via buildroot
@ 2025-02-20 13:25 ` Niklas Cassel via buildroot
2025-02-21 22:39 ` Romain Naour via buildroot
0 siblings, 1 reply; 16+ messages in thread
From: Niklas Cassel via buildroot @ 2025-02-20 13:25 UTC (permalink / raw)
To: Romain Naour; +Cc: buildroot@buildroot.org
On Tue, Feb 04, 2025 at 05:36:21PM +0100, Romain Naour via buildroot wrote:
> Only for testing external dtso build.
>
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
Needs a proper commit message, or drop the patch.
Kind regards,
Niklas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
2025-02-04 16:36 ` [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR Romain Naour via buildroot
2025-02-18 13:59 ` Niklas Cassel via buildroot
@ 2025-02-20 13:49 ` Niklas Cassel via buildroot
2025-02-21 22:29 ` Romain Naour via buildroot
1 sibling, 1 reply; 16+ messages in thread
From: Niklas Cassel via buildroot @ 2025-02-20 13:49 UTC (permalink / raw)
To: Romain Naour
Cc: buildroot@buildroot.org, Michael Walle, Gaël PORTAY,
Chris Packham, Edgar Bonet
On Tue, Feb 04, 2025 at 05:36:18PM +0100, Romain Naour via buildroot wrote:
> Since Linux 6.12, the Buildroot option BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
> does not work as expected on arm, arm64, mips and ricv.[1] These are the
s/ricv/riscv/
> architectures that store the in-tree DTS files in vendor-specific
> subdirectories of arch/$ARCH/boot/dts/.
>
> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH was introduced in Buildroot 2012.08
> (commit 69fc497df0ae "Rework support for the device tree"). At the time,
> the kernel kept all in-tree DTS files directly in arch/$ARCH/boot/dts/,
> and this is where Buildroot drops the user's custom DTS. Vendor-specific
> subdirectories appeared in Linux v3.19 for the arm64 architecture, and
> this scheme was later adopted by mips, riscv and arm.
>
> For these architectures, Linux 6.12 (commit e7e2941300d2, "kbuild: split
> device tree build rules into scripts/Makefile.dtbs") made the DTB build
> infrastructure incompatible with the way
> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is implemented. This infrastructure now
> expects all DTS files to be in vendor-specific subdirectories on the
> architectures that use this scheme.
>
> We can't update easily the current behavior of
> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH since it expect a list of files but
> can also be used "unexpectedly" with directories [2].
>
> BR2_LINUX_KERNEL_INTREE_DTS_NAME="st/stm32mp135f-dk-mx"
> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_ST_PATH)/[...]/linux-dts/st"
>
> In this case, the st directory is copied into the arch/$ARCH/boot/dts/
> and BR2_LINUX_KERNEL_INTREE_DTS_NAME is used to build stm32mp135f-dk-mx dtb
> as if it was intree.
>
> Introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR configuration
> parameter to specify a list of directories that are copied as-is over
> the arch/<arch>/boot/dts/ directory before building the device tree
> blob:
>
> board/acmesystems/acqua-a5/dts/
> └── microchip
> └── at91-sama5d3_acqua.dts
>
> defconfig:
> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
>
> Each dts file found is automatically added to the list of devicetree
> to build.
>
> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR can also be used for external
> devicetree overlays files:
>
> board/ti/am574x-idk/dts/
> └── ti
> └── omap
> └── am57xx-evm.dtso
>
> With this new option, BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is now deprecated.
>
> Note: We want to create a list of dts files (LINUX_DTS_LIST) present in
> diectrories listed by BR2_LINUX_KERNEL_CUSTOM_DTS_DIR. But
> LINUX_DTS_LIST must not contain BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
> paths. Use GNU 'find' print format %P to print each dts file path
> without their respective dts overlay directory path.
> Do the same for LINUX_DTSO_LIST.
>
> Thanks to Edgar Bonet for the initial contribution [3].
>
> [1] https://lists.buildroot.org/pipermail/buildroot/2024-October/765463.html
> [2] https://github.com/bootlin/buildroot-external-st/blob/541ba7d96330cd7da5674b46806b549a7ccf9da8/configs/st_stm32mp135f_dk_demo_defconfig#L21
> [3] https://lore.kernel.org/buildroot/93f83afb-6987-441c-8e06-dab4d43b828f@grenoble.cnrs.fr/
>
> Cc: Michael Walle <michael@walle.cc>
> Cc: Gaël PORTAY <gael.portay+rtone@gmail.com>
> Reported-by: Chris Packham <judge.packham@gmail.com>
> Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
> [Romain:
> - Rework the initial contribution by Edgar Bonet by
> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR following
> Michael Walle comments and Gaël PORTAY review.
> - Reword the commit log accordingly.
> ]
> Signed-off-by: Romain Naour <romain.naour@smile.fr>
> ---
> Changes v4 -> v5:
> - Rename LINUX_INSTALL_CUSTOM_DTS_OVERLAY to LINUX_COPY_CUSTOM_DTS_FILES
> - Rename LINUX_KERNEL_CUSTOM_DTS_PATH_OVERLAY to LINUX_KERNEL_CUSTOM_DTS_DIR
> - Add devicetree overlay support
> - Update authorship of the commit:
> https://lore.kernel.org/buildroot/98d47c49-0e68-4d07-b2c9-1d67a6fd0e13@grenoble.cnrs.fr/
>
> Changes v3 -> v4:
> - Replace hooks added in v2 and add a new option to provide DTS overlay
> https://lore.kernel.org/buildroot/D6UG5Z1HUN9N.GWVHB4L823ZC@kernel.org/
>
> Changes v2 -> v3:
> - note, in the comment and in the log message, that this issue only
> affects some architectures
> - expand the log message with some historical context
> These changes were suggested by Romain Naour.
>
> Changes v1 -> v2:
> - define a hook for LINUX_POST_PATCH_HOOKS and LINUX_POST_RSYNC_HOOKS
> instead of modifying LINUX_BUILD_CMDS
> - use $(patsubst %.dts,%.dtb,$(dts)) instead of $(dts:%.dts=%.dtb)
> both changes suggested by Arnout Vandecappelle.
>
> This was build-tested with an Acqua defconfig,
> in the same manner as v2:
>
> # Test with an old kernel: v6.6.30
> make acmesystems_acqua_a5_512mb_defconfig
> make linux
>
> # Test with a new kernel: v6.12.8
> make linux-dirclean
> git am bump_Acqua_kernel_to_v6.12.8.patch
> make acmesystems_acqua_a5_512mb_defconfig
> make linux
>
> # Test the OVERRIDE_SRCDIR case.
> make linux-dirclean
> git -C $HOME/src/linux checkout v6.12.8
> echo "LINUX_OVERRIDE_SRCDIR = $HOME/src/linux" > local.mk
> make acmesystems_acqua_a5_512mb_defconfig
> make linux
> ---
> linux/Config.in | 25 +++++++++++++++++++++++++
> linux/linux.mk | 17 +++++++++++++++++
> 2 files changed, 42 insertions(+)
>
> diff --git a/linux/Config.in b/linux/Config.in
> index 90aed24775..104343a718 100644
> --- a/linux/Config.in
> +++ b/linux/Config.in
> @@ -435,6 +435,7 @@ config BR2_LINUX_KERNEL_INTREE_DTSO_NAMES
>
> config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
> string "Out-of-tree Device Tree Source file paths"
> + depends on BR2_LINUX_KERNEL_CUSTOM_DTS_DIR = ""
> help
> Paths to out-of-tree Device Tree Source (.dts), Device Tree
> Source Include (.dtsi) and Device Tree Overlay Source (.dtso)
> @@ -442,6 +443,30 @@ config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
> kernel sources and the .dts files will
> be compiled from there.
>
> + Due to a kernel build system changes in 6.12,
> + BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is now deprecated and
> + replaced by BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
Not sure how this legacy stuff works in buildroot.
Should this select BR2_LEGACY ?
> +
> +config BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
> + string "Out-of-tree Device Tree Source overlay directories"
> + help
> + Specify a list of directories that are copied as-is over the
> + arch/<arch>/boot/dts/ directory before building the device
> + tree blob.
> +
> + This overlay can contain dts, dtso and dtsi files.
> +
> + For pre-6.12 kernels or older architectures, the dts files
> + appear directly under this directory. For newer kernels and
> + architectures, the dts files must be in the appropriate
> + subdirectory.
I think this should be rephrased.
Architechtures making use of vendor subdirectories did so even before 6.12.
If you want to reference the past, perhaps:
The legacy config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH points to a directory that
contains that dts files directly.
But I'm not sure if it makes sense to reference a legacy config, so perhaps
just omit this and instead write something like:
BR2_LINUX_KERNEL_CUSTOM_DTS_DIR should point to a directory containing a
vendor subdirectory (e.g. rockchip) which contains the dts files.
This vendor subdirectory should match the vendor subdirectory
used by the board in the kernel (e.g. arch/arm64/boot/dts/rockchip/).
While most architechtures make use of vendor subdirectories, like arm,
arm64 and riscv, some architectures like powerpc and xtensa do not.
In this case, BR2_LINUX_KERNEL_CUSTOM_DTS_DIR should point to a directory
containing the dts files directly.
> +
> + Newer architectures like ARM64 and RISC-V keep their device
> + tree sources organized by vendor sub-directories.
> +
> + Since the 6.12 release, each out-of-tree Device Tree Source
> + file must be copied into their corresponding sub-directory.
> +
> config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME
> bool "Keep the directory name of the Device Tree"
> help
> diff --git a/linux/linux.mk b/linux/linux.mk
> index 9c621c18d5..f915823dcf 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -213,6 +213,22 @@ LINUX_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))
> LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(LINUX_CUSTOM_DTS_PATH))))
> LINUX_DTSO_NAMES += $(basename $(filter %.dtso,$(notdir $(LINUX_CUSTOM_DTS_PATH))))
>
> +LINUX_KERNEL_CUSTOM_DTS_DIR = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_DIR))
> +ifneq ($(LINUX_KERNEL_CUSTOM_DTS_DIR),)
> +# Use evaluation-during-assignment using := to avoid any re-evaluation
> +# of LINUX_DTS_LIST when LINUX_DTS_NAME is used.
> +LINUX_DTS_LIST := $(shell find $(LINUX_KERNEL_CUSTOM_DTS_DIR) -name '*.dts' -printf '%P\n' 2>/dev/null)
> +LINUX_DTSO_LIST := $(shell find $(LINUX_KERNEL_CUSTOM_DTS_DIR) -name '*.dtso' -printf '%P\n' 2>/dev/null)
> +LINUX_DTS_NAME += $(basename $(LINUX_DTS_LIST))
> +LINUX_DTSO_NAMES += $(basename $(LINUX_DTSO_LIST))
> +
> +define LINUX_COPY_CUSTOM_DTS_FILES
> + $(foreach d, $(LINUX_KERNEL_CUSTOM_DTS_DIR), \
> + @$(call MESSAGE,"Copying devicetree overlay $(d)")$(sep) \
> + $(Q)$(call SYSTEM_RSYNC,$(d),$(LINUX_ARCH_PATH)/boot/dts/)$(sep))
> +endef
> +endif
> +
> LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME)) $(addsuffix .dtbo,$(LINUX_DTSO_NAMES))
>
> ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
> @@ -527,6 +543,7 @@ define LINUX_BUILD_CMDS
> $(foreach dts,$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)), \
> cp -f $(dts) $(LINUX_ARCH_PATH)/boot/dts/
> )
> + $(LINUX_COPY_CUSTOM_DTS_FILES)
> $(LINUX_MAKE_ENV) $(BR2_MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) all
> $(LINUX_MAKE_ENV) $(BR2_MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
> $(LINUX_BUILD_DTB)
> --
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
2025-02-20 13:49 ` Niklas Cassel via buildroot
@ 2025-02-21 22:29 ` Romain Naour via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-21 22:29 UTC (permalink / raw)
To: Niklas Cassel
Cc: buildroot@buildroot.org, Michael Walle, Gaël PORTAY,
Chris Packham, Edgar Bonet
Hello Niklas, All,
Le 20/02/2025 à 14:49, Niklas Cassel a écrit :
> On Tue, Feb 04, 2025 at 05:36:18PM +0100, Romain Naour via buildroot wrote:
>> Since Linux 6.12, the Buildroot option BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
>> does not work as expected on arm, arm64, mips and ricv.[1] These are the
>
> s/ricv/riscv/
>
>
>> architectures that store the in-tree DTS files in vendor-specific
>> subdirectories of arch/$ARCH/boot/dts/.
>>
>> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH was introduced in Buildroot 2012.08
>> (commit 69fc497df0ae "Rework support for the device tree"). At the time,
>> the kernel kept all in-tree DTS files directly in arch/$ARCH/boot/dts/,
>> and this is where Buildroot drops the user's custom DTS. Vendor-specific
>> subdirectories appeared in Linux v3.19 for the arm64 architecture, and
>> this scheme was later adopted by mips, riscv and arm.
>>
>> For these architectures, Linux 6.12 (commit e7e2941300d2, "kbuild: split
>> device tree build rules into scripts/Makefile.dtbs") made the DTB build
>> infrastructure incompatible with the way
>> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is implemented. This infrastructure now
>> expects all DTS files to be in vendor-specific subdirectories on the
>> architectures that use this scheme.
>>
>> We can't update easily the current behavior of
>> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH since it expect a list of files but
>> can also be used "unexpectedly" with directories [2].
>>
>> BR2_LINUX_KERNEL_INTREE_DTS_NAME="st/stm32mp135f-dk-mx"
>> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="$(BR2_EXTERNAL_ST_PATH)/[...]/linux-dts/st"
>>
>> In this case, the st directory is copied into the arch/$ARCH/boot/dts/
>> and BR2_LINUX_KERNEL_INTREE_DTS_NAME is used to build stm32mp135f-dk-mx dtb
>> as if it was intree.
>>
>> Introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR configuration
>> parameter to specify a list of directories that are copied as-is over
>> the arch/<arch>/boot/dts/ directory before building the device tree
>> blob:
>>
>> board/acmesystems/acqua-a5/dts/
>> └── microchip
>> └── at91-sama5d3_acqua.dts
>>
>> defconfig:
>> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
>>
>> Each dts file found is automatically added to the list of devicetree
>> to build.
>>
>> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR can also be used for external
>> devicetree overlays files:
>>
>> board/ti/am574x-idk/dts/
>> └── ti
>> └── omap
>> └── am57xx-evm.dtso
>>
>> With this new option, BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is now deprecated.
>>
>> Note: We want to create a list of dts files (LINUX_DTS_LIST) present in
>> diectrories listed by BR2_LINUX_KERNEL_CUSTOM_DTS_DIR. But
>> LINUX_DTS_LIST must not contain BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
>> paths. Use GNU 'find' print format %P to print each dts file path
>> without their respective dts overlay directory path.
>> Do the same for LINUX_DTSO_LIST.
>>
>> Thanks to Edgar Bonet for the initial contribution [3].
>>
>> [1] https://lists.buildroot.org/pipermail/buildroot/2024-October/765463.html
>> [2] https://github.com/bootlin/buildroot-external-st/blob/541ba7d96330cd7da5674b46806b549a7ccf9da8/configs/st_stm32mp135f_dk_demo_defconfig#L21
>> [3] https://lore.kernel.org/buildroot/93f83afb-6987-441c-8e06-dab4d43b828f@grenoble.cnrs.fr/
>>
>> Cc: Michael Walle <michael@walle.cc>
>> Cc: Gaël PORTAY <gael.portay+rtone@gmail.com>
>> Reported-by: Chris Packham <judge.packham@gmail.com>
>> Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
>> [Romain:
>> - Rework the initial contribution by Edgar Bonet by
>> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR following
>> Michael Walle comments and Gaël PORTAY review.
>> - Reword the commit log accordingly.
>> ]
>> Signed-off-by: Romain Naour <romain.naour@smile.fr>
>> ---
>> Changes v4 -> v5:
>> - Rename LINUX_INSTALL_CUSTOM_DTS_OVERLAY to LINUX_COPY_CUSTOM_DTS_FILES
>> - Rename LINUX_KERNEL_CUSTOM_DTS_PATH_OVERLAY to LINUX_KERNEL_CUSTOM_DTS_DIR
>> - Add devicetree overlay support
>> - Update authorship of the commit:
>> https://lore.kernel.org/buildroot/98d47c49-0e68-4d07-b2c9-1d67a6fd0e13@grenoble.cnrs.fr/
>>
>> Changes v3 -> v4:
>> - Replace hooks added in v2 and add a new option to provide DTS overlay
>> https://lore.kernel.org/buildroot/D6UG5Z1HUN9N.GWVHB4L823ZC@kernel.org/
>>
>> Changes v2 -> v3:
>> - note, in the comment and in the log message, that this issue only
>> affects some architectures
>> - expand the log message with some historical context
>> These changes were suggested by Romain Naour.
>>
>> Changes v1 -> v2:
>> - define a hook for LINUX_POST_PATCH_HOOKS and LINUX_POST_RSYNC_HOOKS
>> instead of modifying LINUX_BUILD_CMDS
>> - use $(patsubst %.dts,%.dtb,$(dts)) instead of $(dts:%.dts=%.dtb)
>> both changes suggested by Arnout Vandecappelle.
>>
>> This was build-tested with an Acqua defconfig,
>> in the same manner as v2:
>>
>> # Test with an old kernel: v6.6.30
>> make acmesystems_acqua_a5_512mb_defconfig
>> make linux
>>
>> # Test with a new kernel: v6.12.8
>> make linux-dirclean
>> git am bump_Acqua_kernel_to_v6.12.8.patch
>> make acmesystems_acqua_a5_512mb_defconfig
>> make linux
>>
>> # Test the OVERRIDE_SRCDIR case.
>> make linux-dirclean
>> git -C $HOME/src/linux checkout v6.12.8
>> echo "LINUX_OVERRIDE_SRCDIR = $HOME/src/linux" > local.mk
>> make acmesystems_acqua_a5_512mb_defconfig
>> make linux
>> ---
>> linux/Config.in | 25 +++++++++++++++++++++++++
>> linux/linux.mk | 17 +++++++++++++++++
>> 2 files changed, 42 insertions(+)
>>
>> diff --git a/linux/Config.in b/linux/Config.in
>> index 90aed24775..104343a718 100644
>> --- a/linux/Config.in
>> +++ b/linux/Config.in
>> @@ -435,6 +435,7 @@ config BR2_LINUX_KERNEL_INTREE_DTSO_NAMES
>>
>> config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
>> string "Out-of-tree Device Tree Source file paths"
>> + depends on BR2_LINUX_KERNEL_CUSTOM_DTS_DIR = ""
>> help
>> Paths to out-of-tree Device Tree Source (.dts), Device Tree
>> Source Include (.dtsi) and Device Tree Overlay Source (.dtso)
>> @@ -442,6 +443,30 @@ config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
>> kernel sources and the .dts files will
>> be compiled from there.
>>
>> + Due to a kernel build system changes in 6.12,
>> + BR2_LINUX_KERNEL_CUSTOM_DTS_PATH is now deprecated and
>> + replaced by BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
>
> Not sure how this legacy stuff works in buildroot.
> Should this select BR2_LEGACY ?
Selecting BR2_LEGACY here will fail the build [1].
BR2_LEGACY option is used when a config option is replaced or removed from
Buildroot.
My concern about BR2_LINUX_KERNEL_CUSTOM_DTS_PATH option complete removal is
that it may be used by defconfig from br2-externals and several custom Buildroot
projects. Removing it just before 2025.02-rc1 is not really great.
[1]
https://gitlab.com/buildroot.org/buildroot/-/blob/master/Makefile.legacy?ref_type=heads#L9
>
>
>> +
>> +config BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
>> + string "Out-of-tree Device Tree Source overlay directories"
>> + help
>> + Specify a list of directories that are copied as-is over the
>> + arch/<arch>/boot/dts/ directory before building the device
>> + tree blob.
>> +
>> + This overlay can contain dts, dtso and dtsi files.
>> +
>> + For pre-6.12 kernels or older architectures, the dts files
>> + appear directly under this directory. For newer kernels and
>> + architectures, the dts files must be in the appropriate
>> + subdirectory.
>
> I think this should be rephrased.
>
> Architechtures making use of vendor subdirectories did so even before 6.12.
True but it's not really easy to find an explanation that is correct for each
possible architectures and kernel versions.
Actually the intent is to suggest using BR2_LINUX_KERNEL_CUSTOM_DTS_DIR when a
kernel >= 6.12 is used.
>
> If you want to reference the past, perhaps:
> The legacy config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH points to a directory that
> contains that dts files directly.
>
>
> But I'm not sure if it makes sense to reference a legacy config, so perhaps
> just omit this and instead write something like:
>
> BR2_LINUX_KERNEL_CUSTOM_DTS_DIR should point to a directory containing a
> vendor subdirectory (e.g. rockchip) which contains the dts files.
> This vendor subdirectory should match the vendor subdirectory
> used by the board in the kernel (e.g. arch/arm64/boot/dts/rockchip/).
>
> While most architechtures make use of vendor subdirectories, like arm,
> arm64 and riscv, some architectures like powerpc and xtensa do not.
> In this case, BR2_LINUX_KERNEL_CUSTOM_DTS_DIR should point to a directory
> containing the dts files directly.
Thanks for your suggestion. I'll use it as is.
>
>
>> +
>> + Newer architectures like ARM64 and RISC-V keep their device
>> + tree sources organized by vendor sub-directories.
>> +
>> + Since the 6.12 release, each out-of-tree Device Tree Source
>> + file must be copied into their corresponding sub-directory.
I'll just keep this last sentence to explain that
BR2_LINUX_KERNEL_CUSTOM_DTS_DIR option must be used for kernels >= 6.12.
Best regards,
Romain
>> +
>> config BR2_LINUX_KERNEL_DTB_KEEP_DIRNAME
>> bool "Keep the directory name of the Device Tree"
>> help
>> diff --git a/linux/linux.mk b/linux/linux.mk
>> index 9c621c18d5..f915823dcf 100644
>> --- a/linux/linux.mk
>> +++ b/linux/linux.mk
>> @@ -213,6 +213,22 @@ LINUX_CUSTOM_DTS_PATH = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))
>> LINUX_DTS_NAME += $(basename $(filter %.dts,$(notdir $(LINUX_CUSTOM_DTS_PATH))))
>> LINUX_DTSO_NAMES += $(basename $(filter %.dtso,$(notdir $(LINUX_CUSTOM_DTS_PATH))))
>>
>> +LINUX_KERNEL_CUSTOM_DTS_DIR = $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_DIR))
>> +ifneq ($(LINUX_KERNEL_CUSTOM_DTS_DIR),)
>> +# Use evaluation-during-assignment using := to avoid any re-evaluation
>> +# of LINUX_DTS_LIST when LINUX_DTS_NAME is used.
>> +LINUX_DTS_LIST := $(shell find $(LINUX_KERNEL_CUSTOM_DTS_DIR) -name '*.dts' -printf '%P\n' 2>/dev/null)
>> +LINUX_DTSO_LIST := $(shell find $(LINUX_KERNEL_CUSTOM_DTS_DIR) -name '*.dtso' -printf '%P\n' 2>/dev/null)
>> +LINUX_DTS_NAME += $(basename $(LINUX_DTS_LIST))
>> +LINUX_DTSO_NAMES += $(basename $(LINUX_DTSO_LIST))
>> +
>> +define LINUX_COPY_CUSTOM_DTS_FILES
>> + $(foreach d, $(LINUX_KERNEL_CUSTOM_DTS_DIR), \
>> + @$(call MESSAGE,"Copying devicetree overlay $(d)")$(sep) \
>> + $(Q)$(call SYSTEM_RSYNC,$(d),$(LINUX_ARCH_PATH)/boot/dts/)$(sep))
>> +endef
>> +endif
>> +
>> LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME)) $(addsuffix .dtbo,$(LINUX_DTSO_NAMES))
>>
>> ifeq ($(BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM),y)
>> @@ -527,6 +543,7 @@ define LINUX_BUILD_CMDS
>> $(foreach dts,$(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)), \
>> cp -f $(dts) $(LINUX_ARCH_PATH)/boot/dts/
>> )
>> + $(LINUX_COPY_CUSTOM_DTS_FILES)
>> $(LINUX_MAKE_ENV) $(BR2_MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) all
>> $(LINUX_MAKE_ENV) $(BR2_MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(LINUX_TARGET_NAME)
>> $(LINUX_BUILD_DTB)
>> --
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 4/6] configs/acmesystems_acqua_a5_*: bump to Linux 6.12.9
2025-02-20 13:25 ` Niklas Cassel
@ 2025-02-21 22:36 ` Romain Naour via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-21 22:36 UTC (permalink / raw)
To: Niklas Cassel; +Cc: buildroot@buildroot.org, Edgar Bonet
Hello Niklas,
Le 20/02/2025 à 14:25, Niklas Cassel a écrit :
> On Tue, Feb 04, 2025 at 05:36:19PM +0100, Romain Naour via buildroot wrote:
>> Use the newly introduced BR2_LINUX_KERNEL_CUSTOM_DTS_DIR
>> option to provide the Out-of-tree Device Tree Source file with
>> its vendor subdirectory that is needed since kernel 6.12 [1].
>>
>> Revert the sama5d31.dtsi include path update added by the previous
>> kernel version bump 6.6.12 [2].
>>
>> As noticed by Michael Walle, newer OOT device trees should use the
>> same #include directives as the in-tree device trees to ease
>> sharing the files between u-boot, linux and OOT external trees [3].
>>
>> [1] https://lists.buildroot.org/pipermail/buildroot/2024-October/765463.html
>> [2] 8fb5209885 ("configs/acmesystems_acqua_a5_*: bump to Linux 6.6.12")
>> [3] https://lore.kernel.org/buildroot/D6UG5Z1HUN9N.GWVHB4L823ZC@kernel.org/
>>
>> Cc: Edgar Bonet <bonet@grenoble.cnrs.fr>
>> Acked-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
>> Tested-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
>> Signed-off-by: Romain Naour <romain.naour@smile.fr>
>> ---
>> Runtime testing:
>> v4: https://lore.kernel.org/buildroot/e68817f0-312c-4980-837c-7264656457ca@grenoble.cnrs.fr/
>> ---
>> .../acqua-a5/{ => dts/microchip}/at91-sama5d3_acqua.dts | 2 +-
>> board/acmesystems/acqua-a5/patches/linux/linux.hash | 2 +-
>> configs/acmesystems_acqua_a5_256mb_defconfig | 6 +++---
>> configs/acmesystems_acqua_a5_512mb_defconfig | 6 +++---
>> 4 files changed, 8 insertions(+), 8 deletions(-)
>> rename board/acmesystems/acqua-a5/{ => dts/microchip}/at91-sama5d3_acqua.dts (99%)
>>
>> diff --git a/board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts b/board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
>> similarity index 99%
>> rename from board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts
>> rename to board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
>> index 411d1942f5..60be8a67cd 100644
>> --- a/board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts
>> +++ b/board/acmesystems/acqua-a5/dts/microchip/at91-sama5d3_acqua.dts
>> @@ -9,7 +9,7 @@
>> * Licensed under GPLv2 or later.
>> */
>> /dts-v1/;
>> -#include "microchip/sama5d31.dtsi"
>> +#include "sama5d31.dtsi"
>>
>> / {
>> model = "Acme Systems Acqua SOM";
>> diff --git a/board/acmesystems/acqua-a5/patches/linux/linux.hash b/board/acmesystems/acqua-a5/patches/linux/linux.hash
>> index 4b20a009a7..7a4c4e57c9 100644
>> --- a/board/acmesystems/acqua-a5/patches/linux/linux.hash
>> +++ b/board/acmesystems/acqua-a5/patches/linux/linux.hash
>> @@ -1,2 +1,2 @@
>> # Locally calculated
>> -sha256 b66a5b863b0f8669448b74ca83bd641a856f164b29956e539bbcb5fdeeab9cc6 linux-6.6.30.tar.xz
>> +sha256 87be0360df0931b340d2bac35161a548070fbc3a8c352c49e21e96666c26aeb4 linux-6.12.9.tar.xz
>> diff --git a/configs/acmesystems_acqua_a5_256mb_defconfig b/configs/acmesystems_acqua_a5_256mb_defconfig
>> index b102dde0ba..a50e306b1b 100644
>> --- a/configs/acmesystems_acqua_a5_256mb_defconfig
>> +++ b/configs/acmesystems_acqua_a5_256mb_defconfig
>> @@ -2,7 +2,7 @@ BR2_arm=y
>> BR2_cortex_a5=y
>> BR2_ARM_ENABLE_VFP=y
>> BR2_ARM_INSTRUCTIONS_THUMB2=y
>> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
>> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
>> BR2_GLOBAL_PATCH_DIR="board/acmesystems/acqua-a5/patches"
>> BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
>> BR2_SYSTEM_DHCP="eth0"
>> @@ -10,10 +10,10 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>> BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/acqua-a5/genimage.cfg"
>> BR2_LINUX_KERNEL=y
>> BR2_LINUX_KERNEL_CUSTOM_VERSION=y
>> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30"
>> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
>> BR2_LINUX_KERNEL_DEFCONFIG="sama5"
>> BR2_LINUX_KERNEL_DTS_SUPPORT=y
>> -BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts"
>> +BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
>> BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
>> BR2_TARGET_ROOTFS_EXT2=y
>> BR2_TARGET_ROOTFS_EXT2_4=y
>> diff --git a/configs/acmesystems_acqua_a5_512mb_defconfig b/configs/acmesystems_acqua_a5_512mb_defconfig
>> index da54eaf620..6ae8d037e7 100644
>> --- a/configs/acmesystems_acqua_a5_512mb_defconfig
>> +++ b/configs/acmesystems_acqua_a5_512mb_defconfig
>> @@ -2,7 +2,7 @@ BR2_arm=y
>> BR2_cortex_a5=y
>> BR2_ARM_ENABLE_VFP=y
>> BR2_ARM_INSTRUCTIONS_THUMB2=y
>> -BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_6=y
>> +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_6_12=y
>> BR2_GLOBAL_PATCH_DIR="board/acmesystems/acqua-a5/patches"
>> BR2_DOWNLOAD_FORCE_CHECK_HASHES=y
>> BR2_SYSTEM_DHCP="eth0"
>> @@ -10,10 +10,10 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
>> BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/acmesystems/acqua-a5/genimage.cfg"
>> BR2_LINUX_KERNEL=y
>> BR2_LINUX_KERNEL_CUSTOM_VERSION=y
>> -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.6.30"
>> +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.12.9"
>> BR2_LINUX_KERNEL_DEFCONFIG="sama5"
>> BR2_LINUX_KERNEL_DTS_SUPPORT=y
>> -BR2_LINUX_KERNEL_CUSTOM_DTS_PATH="board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts"
>> +BR2_LINUX_KERNEL_CUSTOM_DTS_DIR="board/acmesystems/acqua-a5/dts"
>> BR2_LINUX_KERNEL_NEEDS_HOST_OPENSSL=y
>> BR2_TARGET_ROOTFS_EXT2=y
>> BR2_TARGET_ROOTFS_EXT2_4=y
>> --
>
> Personally I would split this into two patchs
> patch 1/2: that uses BR2_LINUX_KERNEL_CUSTOM_DTS_DIR instead of
> BR2_LINUX_KERNEL_CUSTOM_DTS_PATH and removes the vendor prefix
> from the .dts.
> patch 2/2: that bumps to linux 6.12.xx.
Indeed, it's probably better.
Best regards,
Romain
>
>
> Regardless if splitting this patch or not:
>
> Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [Buildroot] [PATCH v5 6/6] [WIP] am57: add dtso example
2025-02-20 13:25 ` Niklas Cassel via buildroot
@ 2025-02-21 22:39 ` Romain Naour via buildroot
0 siblings, 0 replies; 16+ messages in thread
From: Romain Naour via buildroot @ 2025-02-21 22:39 UTC (permalink / raw)
To: Niklas Cassel; +Cc: buildroot@buildroot.org
Niklas,
Le 20/02/2025 à 14:25, Niklas Cassel a écrit :
> On Tue, Feb 04, 2025 at 05:36:21PM +0100, Romain Naour via buildroot wrote:
>> Only for testing external dtso build.
>>
>> Signed-off-by: Romain Naour <romain.naour@smile.fr>
>> ---
>
> Needs a proper commit message, or drop the patch.
Theses patch was sent to test the devicetree overlay build and wasn't meant to
be merged as is :)
Best regards,
Romain
>
>
> Kind regards,
> Niklas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2025-02-21 22:39 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-04 16:36 [Buildroot] [PATCH v5 1/6] linux: add support for device tree overlays Romain Naour via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 2/6] configs/rock5b: build and install rock5b " Romain Naour via buildroot
2025-02-20 13:25 ` Niklas Cassel via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 3/6] linux: introduce BR2_LINUX_KERNEL_CUSTOM_DTS_DIR Romain Naour via buildroot
2025-02-18 13:59 ` Niklas Cassel via buildroot
2025-02-20 8:58 ` Romain Naour via buildroot
2025-02-20 13:49 ` Niklas Cassel via buildroot
2025-02-21 22:29 ` Romain Naour via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 4/6] configs/acmesystems_acqua_a5_*: bump to Linux 6.12.9 Romain Naour via buildroot
2025-02-20 13:25 ` Niklas Cassel
2025-02-21 22:36 ` Romain Naour via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 5/6] [WIP] am57 kernel version bump 6.12 Romain Naour via buildroot
2025-02-20 13:25 ` Niklas Cassel via buildroot
2025-02-04 16:36 ` [Buildroot] [PATCH v5 6/6] [WIP] am57: add dtso example Romain Naour via buildroot
2025-02-20 13:25 ` Niklas Cassel via buildroot
2025-02-21 22:39 ` Romain Naour via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox