aboutsummaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorGravatar Ivo Slanina <ivo.slanina@gmail.com>2015-03-01 15:51:44 +0100
committerGravatar Thomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-03-04 23:38:15 +0100
commit541d9937d43a5954ba640c9523f6b1e60a4e9040 (patch)
tree2c2715e421c2a8d309163c4ce7d71a5954c88cc1 /linux
parent32317a6bef4d7f506acda38eeedb72864eb3a4fa (diff)
downloadbuildroot-541d9937d43a5954ba640c9523f6b1e60a4e9040.tar.gz
buildroot-541d9937d43a5954ba640c9523f6b1e60a4e9040.tar.bz2
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. [Thomas: add comment into the code to explain why we are filtering .dts files only.] Signed-off-by: Ivo Slanina <ivo.slanina@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'linux')
-rw-r--r--linux/linux.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/linux/linux.mk b/linux/linux.mk
index 78e589e486..672ce485c7 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -68,7 +68,11 @@ 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))))
+# 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.
+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)