Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv3] linux: Support multiple device tree build
@ 2012-12-20  8:48 Maxime Ripard
  2012-12-20 14:24 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Maxime Ripard @ 2012-12-20  8:48 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
Fixes since v3:
  - Remove the use of foreach but use addprefix/addsuffix instead
---
 linux/Config.in |    5 +++--
 linux/linux.mk  |    7 +++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/linux/Config.in b/linux/Config.in
index f408ad5..3ff6b4a 100644
--- a/linux/Config.in
+++ b/linux/Config.in
@@ -261,11 +261,12 @@ config BR2_LINUX_KERNEL_USE_CUSTOM_DTS
 endchoice
 
 config BR2_LINUX_KERNEL_INTREE_DTS_NAME
-	string "Device Tree Source file name"
+	string "Device Tree Source file names"
 	depends on BR2_LINUX_KERNEL_USE_INTREE_DTS
 	help
 	 Name of the device tree source file, without
-	 the trailing .dts
+	 the trailing .dts. You can provide a list of
+	 dts files to build, separated by spaces.
 
 config BR2_LINUX_KERNEL_CUSTOM_DTS_PATH
 	string "Device Tree Source file path"
diff --git a/linux/linux.mk b/linux/linux.mk
index c4bdf90..3321d80 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -187,10 +187,13 @@ endef
 ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
 ifeq ($(BR2_LINUX_KERNEL_DTB_IS_SELF_BUILT),)
 define LINUX_BUILD_DTB
-	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) $(KERNEL_DTS_NAME).dtb
+	$(TARGET_MAKE_ENV) $(MAKE) $(LINUX_MAKE_FLAGS) -C $(@D) \
+		$(addsuffix .dtb, $(call qstrip, $(KERNEL_DTS_NAME)))
 endef
 define LINUX_INSTALL_DTB
-	cp $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb $(BINARIES_DIR)/
+	cp $(addprefix $(KERNEL_ARCH_PATH)/boot/, \
+		$(addsuffix .dtb, $(call qstrip, $(KERNEL_DTS_NAME)))) \
+		$(BINARIES_DIR)/
 endef
 endif
 endif
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCHv3] linux: Support multiple device tree build
  2012-12-20  8:48 [Buildroot] [PATCHv3] linux: Support multiple device tree build Maxime Ripard
@ 2012-12-20 14:24 ` Peter Korsgaard
  2012-12-21 12:21   ` Arnout Vandecappelle
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2012-12-20 14:24 UTC (permalink / raw)
  To: buildroot

>>>>> "Maxime" == Maxime Ripard <maxime.ripard@free-electrons.com> writes:

 Maxime> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Committed, thanks.

 Maxime>  define LINUX_INSTALL_DTB
 Maxime> -	cp $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb $(BINARIES_DIR)/
 Maxime> +	cp $(addprefix $(KERNEL_ARCH_PATH)/boot/, \
 Maxime> +		$(addsuffix .dtb, $(call qstrip, $(KERNEL_DTS_NAME)))) \
 Maxime> +		$(BINARIES_DIR)/

Not directly related to your patch, but this is broken by the recent
(post-3.7) change to put .dtb files in arch/arm/boot/dts. I wonder how
the best way of handling this is?

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCHv3] linux: Support multiple device tree build
  2012-12-20 14:24 ` Peter Korsgaard
@ 2012-12-21 12:21   ` Arnout Vandecappelle
  2012-12-21 12:26     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2012-12-21 12:21 UTC (permalink / raw)
  To: buildroot

On 20/12/12 15:24, Peter Korsgaard wrote:
>>>>>> "Maxime" == Maxime Ripard<maxime.ripard@free-electrons.com>  writes:
>
>   Maxime>  Signed-off-by: Maxime Ripard<maxime.ripard@free-electrons.com>
>
> Committed, thanks.
>
>   Maxime>   define LINUX_INSTALL_DTB
>   Maxime>  -	cp $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb $(BINARIES_DIR)/
>   Maxime>  +	cp $(addprefix $(KERNEL_ARCH_PATH)/boot/, \
>   Maxime>  +		$(addsuffix .dtb, $(call qstrip, $(KERNEL_DTS_NAME)))) \
>   Maxime>  +		$(BINARIES_DIR)/
>
> Not directly related to your patch, but this is broken by the recent
> (post-3.7) change to put .dtb files in arch/arm/boot/dts. I wonder how
> the best way of handling this is?

  How about adding this to LINUX_POST_PATCH_HOOKS

if [ ! -e $(KERNEL_ARCH_PATH)/boot/dts ]; then \
	ln -s . $(KERNEL_ARCH_PATH)/boot/dts; \
fi

  and adding dts to the path everywhere we use it?

  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCHv3] linux: Support multiple device tree build
  2012-12-21 12:21   ` Arnout Vandecappelle
@ 2012-12-21 12:26     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2012-12-21 12:26 UTC (permalink / raw)
  To: buildroot

>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes:

Hi,

 >> Not directly related to your patch, but this is broken by the recent
 >> (post-3.7) change to put .dtb files in arch/arm/boot/dts. I wonder how
 >> the best way of handling this is?

 Arnout>  How about adding this to LINUX_POST_PATCH_HOOKS

 Arnout> if [ ! -e $(KERNEL_ARCH_PATH)/boot/dts ]; then \
 Arnout> 	ln -s . $(KERNEL_ARCH_PATH)/boot/dts; \
 Arnout> fi

 Arnout>  and adding dts to the path everywhere we use it?

That won't work as boot/dts exists (that's where the .dts files
are). The only thing that changed was where the generated .dtb files are
put (in arch/$ARCH/boot vs arch/$ARCH/boot/dts).

I solved it by adding a bit of extra logic to the LINUX_INSTALL_DTB rule
instead.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-21 12:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-20  8:48 [Buildroot] [PATCHv3] linux: Support multiple device tree build Maxime Ripard
2012-12-20 14:24 ` Peter Korsgaard
2012-12-21 12:21   ` Arnout Vandecappelle
2012-12-21 12:26     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox