Skip to contentSkip to conversation

linux/linux.mk: custom dts path - build dtb only from *.dts files

PATCH New Ivo Slanina 2 participants 2 messages Mar 1, 2015 – Mar 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 linux/linux.mk: custom dts path - build dtb only from *.dts files

When building device tree blobs from custom *.dts files, buildroot initializes KERNEL_DTS_NAME variable from all given file names. This causes that user can't provide one *.dts file and some other *.dtsi files as dependencies.

Problem is fixed by adding filter for initializing KERNEL_DTS_NAME variable with *.dts files only. All user provided files are copied into kernel source tree, but only file names suffixed with *.dts are used for building appropriate *.dtb files.

---
 linux/linux.mk |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
linux/linux.mk +1 -1
index 0b8c912..eaed1f0 100644
@@ -64,7 +64,7 @@ LINUX_VERSION_PROBED = $(shell $(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-
 ifeq ($(BR2_LINUX_KERNEL_USE_INTREE_DTS),y)
 KERNEL_DTS_NAME = $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME))
 else ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y)
-KERNEL_DTS_NAME = $(basename $(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH))))
+KERNEL_DTS_NAME = $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))
 endif
 
 ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT)$(KERNEL_DTS_NAME),y)
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 1/1 linux/linux.mk: custom dts path - build dtb only from *.dts files

Dear Ivo Slanina,

Quoted 11 lines · Ivo Slanina

When building device tree blobs from custom *.dts files, buildroot initializes KERNEL_DTS_NAME variable from all given file names. This causes that user can't provide one *.dts file and some other *.dtsi files as dependencies.

Problem is fixed by adding filter for initializing KERNEL_DTS_NAME variable with *.dts files only. All user provided files are copied into kernel source tree, but only file names suffixed with *.dts are used for building appropriate *.dtb files.

Thanks, applied!

I've only added a comment in the linux.mk file itself to explain why we are doing this .dts filtering.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com