Message ID | 20240229165310.1453209-1-gsmecher@threespeedlogic.com |
---|---|
State | Rejected |
Headers | show |
Series | [v2] linux.mk: Allow wildcards in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH | expand |
Hello Graeme, All, Le 29/02/2024 à 17:53, Graeme Smecher a écrit : > 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. 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 > > Signed-off-by: Graeme Smecher <gsmecher@threespeedlogic.com> > Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com> > --- > linux/linux.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/linux/linux.mk b/linux/linux.mk > index 1db5c6046d..80881597ad 100644 > --- a/linux/linux.mk > +++ b/linux/linux.mk > @@ -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)) >
diff --git a/linux/linux.mk b/linux/linux.mk index 1db5c6046d..80881597ad 100644 --- a/linux/linux.mk +++ b/linux/linux.mk @@ -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))