Patchwork linux: Support multiple device tree build

login
register
mail settings
Submitter Maxime Ripard
Date Dec. 17, 2012, 11:05 a.m.
Message ID <1355742312-25258-1-git-send-email-maxime.ripard@free-electrons.com>
Download mbox | patch
Permalink /patch/206833/
State Changes Requested
Headers show

Comments

Maxime Ripard - Dec. 17, 2012, 11:05 a.m.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 linux/linux.mk |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Baruch Siach - Dec. 17, 2012, 11:12 a.m.
Hi Maxime,

On Mon, Dec 17, 2012 at 12:05:12PM +0100, Maxime Ripard wrote:
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  linux/linux.mk |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/linux/linux.mk b/linux/linux.mk
> index c4bdf90..c7d0099 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -187,10 +187,12 @@ 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) \
> +		$(foreach dtbfile, $(call qstrip, $(KERNEL_DTS_NAME)), $(dtbfile).dtb)
>  endef
>  define LINUX_INSTALL_DTB
> -	cp $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb $(BINARIES_DIR)/
> +	$(foreach dtbfile, $(call qstrip, $(KERNEL_DTS_NAME)),
> +		cp $(KERNEL_ARCH_PATH)/boot/$(dtbfile).dtb $(BINARIES_DIR)/)
>  endef
>  endif
>  endif

Please update the comment and help text in the 
BR2_LINUX_KERNEL_INTREE_DTS_NAME config option as well.

baruch
Arnout Vandecappelle - Dec. 17, 2012, 10:13 p.m.
On 17/12/12 12:05, Maxime Ripard wrote:
> Signed-off-by: Maxime Ripard<maxime.ripard@free-electrons.com>
> ---
>   linux/linux.mk |    6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/linux/linux.mk b/linux/linux.mk
> index c4bdf90..c7d0099 100644
> --- a/linux/linux.mk
> +++ b/linux/linux.mk
> @@ -187,10 +187,12 @@ 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) \
> +		$(foreach dtbfile, $(call qstrip, $(KERNEL_DTS_NAME)), $(dtbfile).dtb)

  I would personally prefer
$(addsuffix .dtb,$(call qstrip,$(KERNEL_DTS_NAME)))

>   endef
>   define LINUX_INSTALL_DTB
> -	cp $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb $(BINARIES_DIR)/
> +	$(foreach dtbfile, $(call qstrip, $(KERNEL_DTS_NAME)),
> +		cp $(KERNEL_ARCH_PATH)/boot/$(dtbfile).dtb $(BINARIES_DIR)/)

  Does this work? I would expect you need a $(sep) or ; between the cp 
statements...

  But since it's a cp (not an install), you can put the foreach inside 
the cp.


  Regards,
  Arnout

>   endef
>   endif
>   endif

Patch

diff --git a/linux/linux.mk b/linux/linux.mk
index c4bdf90..c7d0099 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -187,10 +187,12 @@  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) \
+		$(foreach dtbfile, $(call qstrip, $(KERNEL_DTS_NAME)), $(dtbfile).dtb)
 endef
 define LINUX_INSTALL_DTB
-	cp $(KERNEL_ARCH_PATH)/boot/$(KERNEL_DTS_NAME).dtb $(BINARIES_DIR)/
+	$(foreach dtbfile, $(call qstrip, $(KERNEL_DTS_NAME)),
+		cp $(KERNEL_ARCH_PATH)/boot/$(dtbfile).dtb $(BINARIES_DIR)/)
 endef
 endif
 endif