]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
linux: allow both in-tree and custom dts files
authorSimon van der Veldt <simon.vanderveldt@gmail.com>
Wed, 21 Feb 2018 19:53:16 +0000 (20:53 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Fri, 30 Mar 2018 16:45:51 +0000 (18:45 +0200)
For some boards, for example the Raspberry Pi, it's necessary to build
in-tree dts files as well as custom/out of tree dts-files (dt-blob.bin).
The existing logic made these two options exclusive, this commit changes
that to allow both in-tree as well as custom sources for dts files.

Signed-off-by: Simon van der Veldt <simon.vanderveldt@gmail.com>
[Arnout: re-wrap help, add extra empty line, change = into +=]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit 382fe9f9261812682eab2d35e47aa94dc554380e)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
linux/Config.in
linux/linux.mk

index 5afd620d989c32a154c64bcdf5b0388eb7cf595a..bc6cd1b5f75918eefd71391abaa2381d2ff85d2e 100644 (file)
@@ -363,10 +363,6 @@ config BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT
 config BR2_LINUX_KERNEL_APPENDED_DTB
        bool
 
-choice
-       prompt "Device tree source"
-       default BR2_LINUX_KERNEL_USE_INTREE_DTS
-
 config BR2_LINUX_KERNEL_USE_INTREE_DTS
        bool "Use a device tree present in the kernel"
        help
@@ -374,14 +370,6 @@ config BR2_LINUX_KERNEL_USE_INTREE_DTS
          the kernel sources. The dts files are located
          in the arch/<arch>/boot/dts folder.
 
-config BR2_LINUX_KERNEL_USE_CUSTOM_DTS
-       bool "Use a custom device tree file"
-       help
-         Use a custom device tree file, i.e, a device
-         tree file that does not belong to the kernel
-         source tree.
-endchoice
-
 config BR2_LINUX_KERNEL_INTREE_DTS_NAME
        string "Device Tree Source file names"
        depends on BR2_LINUX_KERNEL_USE_INTREE_DTS
@@ -390,6 +378,13 @@ config BR2_LINUX_KERNEL_INTREE_DTS_NAME
          the trailing .dts. You can provide a list of
          dts files to build, separated by spaces.
 
+config BR2_LINUX_KERNEL_USE_CUSTOM_DTS
+       bool "Use a custom device tree file"
+       help
+         Use a custom device tree file, i.e, a device
+         tree file that does not belong to the kernel
+         source tree.
+
 config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
        string "Device Tree Source file paths"
        depends on BR2_LINUX_KERNEL_USE_CUSTOM_DTS
index 5300b9cfc58fb8073f359d7989b7383b51cb46d5..a14a07a485d8c86c88aad0bb901ddd539592086c 100644 (file)
@@ -119,13 +119,15 @@ endif
 LINUX_VERSION_PROBED = `$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelrelease 2>/dev/null`
 
 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 += $(call qstrip,$(BR2_LINUX_KERNEL_INTREE_DTS_NAME))
+endif
+
+ifeq ($(BR2_LINUX_KERNEL_USE_CUSTOM_DTS),y)
 # 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)))))
+KERNEL_DTS_NAME += $(basename $(filter %.dts,$(notdir $(call qstrip,$(BR2_LINUX_KERNEL_CUSTOM_DTS_PATH)))))
 endif
 
 KERNEL_DTBS = $(addsuffix .dtb,$(KERNEL_DTS_NAME))