linux.mk: Allow wildcards in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 linux.mk: Allow wildcards in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH.
From: Graeme Smecher <[email protected]>
There are a few config/ entries where wildcards are already present:
$ grep -rle 'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=.*\*' configs/
configs/octavo_osd32mp1_brk_defconfig
configs/octavo_osd32mp1_red_defconfig...however, while the copy-in step of device tree compilation works correctly, these wildcards are not converted to DTC build targets in the kernel build. As a result, this configuration line alone is not enough to generate DTCs. It should be.
This patch adds a $(wildcard) expansion step into generation of DTB compilation targets (the LINUX_DTB_NAME variable). As a result, wildcards behave correctly.
--- linux/linux.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux/linux.mk +1 -1
@@ -195,7 +195,7 @@ LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) # 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_DTS_NAME += $(basename $(filter %.dts,$(notdir $(wildcard $(call qstrip, $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))) LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME))
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Graeme!
Quoted 13 lines · On Tue, 2024-01-30 at 13:05 -0800, [email protected] wrote:
From: Graeme Smecher <[email protected]>
There are a few config/ entries where wildcards are already present:
$ grep -rle 'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=.*\*' configs/ configs/octavo_osd32mp1_brk_defconfig configs/octavo_osd32mp1_red_defconfig...however, while the copy-in step of device tree compilation works correctly, these wildcards are not converted to DTC build targets in the kernel build. As a result, this configuration line alone is not enough to generate DTCs. It should be.
Quoted 5 lines
This patch adds a $(wildcard) expansion step into generation of DTB compilation targets (the
LINUX_DTB_NAMEvariable). As a result, wildcards behave correctly.Signed-off-by Graeme Smecher <[email protected]>
Makes sense to me (except a dot in the commit Subject),
Quoted 17 lines
---
linux/linux.mk | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)linux/linux.mk +1
-1@@ -195,7 +195,7 @@ LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) # 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_DTS_NAME += $(basename $(filter %.dts,$(notdir $(wildcard $(call qstrip, $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))))))
LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME))
Signature · 6 lines
Alexander Sverdlin. _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/1 linux.mk: Allow wildcards in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
There are a few config/ entries where wildcards are already present:
$ grep -rle 'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=.*\*' configs/
configs/octavo_osd32mp1_brk_defconfig
configs/octavo_osd32mp1_red_defconfig...however, while the copy-in step of device tree compilation works correctly, these wildcards are not converted to DTC build targets in the kernel build. As a result, this configuration line alone is not enough to generate DTCs. It should be.
This patch adds a $(wildcard) expansion step into generation of DTB compilation targets (the LINUX_DTB_NAME variable). As a result, wildcards behave correctly.
--- linux/linux.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
linux/linux.mk +1 -1
@@ -195,7 +195,7 @@ LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) # 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_DTS_NAME += $(basename $(filter %.dts,$(notdir $(wildcard $(call qstrip, $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))) LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME))
Signature · 6 lines
2.39.2 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2] linux.mk: Allow wildcards in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
Hello Graeme, All,
Le 29/02/2024 à 17:53, Graeme Smecher a écrit :
Quoted 6 lines
There are a few config/ entries where wildcards are already present:
$ grep -rle 'BR2_LINUX_KERNEL_CUSTOM_DTS_PATH=.*\*' configs/ configs/octavo_osd32mp1_brk_defconfig configs/octavo_osd32mp1_red_defconfig
Quoted 8 lines
...however, while the copy-in step of device tree compilation works correctly, these wildcards are not converted to DTC build targets in the kernel build. As a result, this configuration line alone is not enough to generate DTCs. It should be.
This patch adds a $(wildcard) expansion step into generation of DTB compilation targets (the
LINUX_DTB_NAMEvariable). As a result, wildcards behave correctly.
Actually, the BR2_LINUX_KERNEL_CUSTOM_DTS_PATH help text state that only a list of files is expected here [1].
I suggest to explicitly list all dts files that should be used by this config file.
Note: An issue was reported recently with BR2_LINUX_KERNEL_CUSTOM_DTS_PATH, we plan to rework how the external devicetree files are imported into the kernel sources.
While trying to reproduce due to a kernel build issue with latest prebuilt toolchains.
[1]
https://gitlab.com/buildroot.org/buildroot/-/blob/master/linux/Config.in?ref_type=heads#L429
[2] https://gitlab.com/buildroot.org/buildroot/-/jobs/8990262677
(octavo_osd32mp1_brk_defconfig)
[3] https://gitlab.com/buildroot.org/buildroot/-/jobs/8990262679
(octavo_osd32mp1_red_defconfig)
Best regards,
Romain
Quoted 12 lines
Signed-off-by Graeme Smecher <[email protected]>Reviewed-by Alexander Sverdlin <[email protected]>--- linux/linux.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)linux/linux.mk +0
-0
linux/linux.mk LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) · line 201
Quoted 8 lines
linux/linux.mk +1
-1@@ -195,7 +195,7 @@ LINUX_DTS_NAME += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME)) # 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_DTS_NAME += $(basename $(filter %.dts,$(notdir $(wildcard $(call qstrip, $(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))) LINUX_DTBS = $(addsuffix .dtb,$(LINUX_DTS_NAME))
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot