diff mbox series

[v2] linux.mk: Allow wildcards in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH

Message ID 20240229165310.1453209-1-gsmecher@threespeedlogic.com
State New
Headers show
Series [v2] linux.mk: Allow wildcards in BR2_LINUX_KERNEL_CUSTOM_DTS_PATH | expand

Commit Message

Graeme Smecher Feb. 29, 2024, 4:53 p.m. UTC
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.

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 mbox series

Patch

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))