linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arc: dts - remove default value if CONFIG_ARC_BUILTIN_DTB_NAME is blank
@ 2015-10-31 23:21 Alexey Brodkin
  2015-11-01 20:37 ` Noam Camus
  2015-11-02  6:54 ` Vineet Gupta
  0 siblings, 2 replies; 3+ messages in thread
From: Alexey Brodkin @ 2015-10-31 23:21 UTC (permalink / raw)
  To: linux-snps-arc; +Cc: linux-kernel, Alexey Brodkin, Vineet Gupta

As of today default .dtb will be built (and subsequently will be built-in
kernel binary) even if CONFIG_ARC_BUILTIN_DTB_NAME is not set.

But it is possible we're going to use external .dtb and so we don't want to
have .dtb built-in kernel binary.

For example that could be the case with:
 a) U-Boot which loads .dtb in DDR and passes its address to the kernel
 b) OpenWRT which embeds .dtb in existing kernel binary

This change excludes .dtb building if CONFIG_ARC_BUILTIN_DTB_NAME is
blank.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
---
 arch/arc/Makefile          | 2 ++
 arch/arc/boot/dts/Makefile | 6 ++----
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/arc/Makefile b/arch/arc/Makefile
index 8a27a48..b0cb6de 100644
--- a/arch/arc/Makefile
+++ b/arch/arc/Makefile
@@ -94,7 +94,9 @@ head-y		:= arch/arc/kernel/head.o
 core-y		+= arch/arc/
 
 # w/o this dtb won't embed into kernel binary
+ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")
 core-y		+= arch/arc/boot/dts/
+endif
 
 core-$(CONFIG_ARC_PLAT_SIM)	+= arch/arc/plat-sim/
 core-$(CONFIG_ARC_PLAT_TB10X)	+= arch/arc/plat-tb10x/
diff --git a/arch/arc/boot/dts/Makefile b/arch/arc/boot/dts/Makefile
index b0e3f19..4dcab5b 100644
--- a/arch/arc/boot/dts/Makefile
+++ b/arch/arc/boot/dts/Makefile
@@ -1,13 +1,11 @@
 # Built-in dtb
-builtindtb-y		:= nsim_700
 
 ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")
 	builtindtb-y	:= $(patsubst "%",%,$(CONFIG_ARC_BUILTIN_DTB_NAME))
+	obj-y   += $(builtindtb-y).dtb.o
+	targets += $(builtindtb-y).dtb
 endif
 
-obj-y   += $(builtindtb-y).dtb.o
-targets += $(builtindtb-y).dtb
-
 .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
 
 dtbs:  $(addprefix  $(obj)/, $(builtindtb-y).dtb)
-- 
2.4.3


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

* Re: [PATCH] arc: dts - remove default value if CONFIG_ARC_BUILTIN_DTB_NAME is blank
  2015-10-31 23:21 [PATCH] arc: dts - remove default value if CONFIG_ARC_BUILTIN_DTB_NAME is blank Alexey Brodkin
@ 2015-11-01 20:37 ` Noam Camus
  2015-11-02  6:54 ` Vineet Gupta
  1 sibling, 0 replies; 3+ messages in thread
From: Noam Camus @ 2015-11-01 20:37 UTC (permalink / raw)
  To: Alexey Brodkin, linux-snps-arc; +Cc: Vineet Gupta, linux-kernel

> From: linux-snps-arc <linux-snps-arc-bounces@lists.infradead.org> on behalf of Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> Sent: Sunday, November 1, 2015 1:21 AM
> To: linux-snps-arc@lists.infradead.org
> Cc: Vineet Gupta; Alexey Brodkin; linux-kernel@vger.kernel.org
> Subject: [PATCH] arc: dts - remove default value if CONFIG_ARC_BUILTIN_DTB_NAME is blank

> As of today default .dtb will be built (and subsequently will be built-in
> kernel binary) even if CONFIG_ARC_BUILTIN_DTB_NAME is not set.

> But it is possible we're going to use external .dtb and so we don't want to
have .dtb built-in kernel binary.

> For example that could be the case with:
> a) U-Boot which loads .dtb in DDR and passes its address to the kernel
> b) OpenWRT which embeds .dtb in existing kernel binary

> This change excludes .dtb building if CONFIG_ARC_BUILTIN_DTB_NAME is
blank.

You can add my Ack (worked on my platform)
Noam

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

* Re: [PATCH] arc: dts - remove default value if CONFIG_ARC_BUILTIN_DTB_NAME is blank
  2015-10-31 23:21 [PATCH] arc: dts - remove default value if CONFIG_ARC_BUILTIN_DTB_NAME is blank Alexey Brodkin
  2015-11-01 20:37 ` Noam Camus
@ 2015-11-02  6:54 ` Vineet Gupta
  1 sibling, 0 replies; 3+ messages in thread
From: Vineet Gupta @ 2015-11-02  6:54 UTC (permalink / raw)
  To: Alexey Brodkin, linux-snps-arc; +Cc: linux-kernel, Rob Herring

On Sunday 01 November 2015 04:51 AM, Alexey Brodkin wrote:
> As of today default .dtb will be built (and subsequently will be built-in
> kernel binary) even if CONFIG_ARC_BUILTIN_DTB_NAME is not set.
>
> But it is possible we're going to use external .dtb and so we don't want to
> have .dtb built-in kernel binary.
>
> For example that could be the case with:
>  a) U-Boot which loads .dtb in DDR and passes its address to the kernel
>  b) OpenWRT which embeds .dtb in existing kernel binary
>
> This change excludes .dtb building if CONFIG_ARC_BUILTIN_DTB_NAME is
> blank.
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>

Rob has been doing a series to build all DTBs and he also provided a fix to ARC
makefiles to use common make variables which collides with ur patch.

@Alexey, can u wait until rc1 comes out and rebase it on top, assuming Rob's
series is merged in 4.4 window ?
If his doesn't, I will merge this as it is for rc2 !

-Vineet

> ---
>  arch/arc/Makefile          | 2 ++
>  arch/arc/boot/dts/Makefile | 6 ++----
>  2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arc/Makefile b/arch/arc/Makefile
> index 8a27a48..b0cb6de 100644
> --- a/arch/arc/Makefile
> +++ b/arch/arc/Makefile
> @@ -94,7 +94,9 @@ head-y		:= arch/arc/kernel/head.o
>  core-y		+= arch/arc/
>  
>  # w/o this dtb won't embed into kernel binary
> +ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")
>  core-y		+= arch/arc/boot/dts/
> +endif
>  
>  core-$(CONFIG_ARC_PLAT_SIM)	+= arch/arc/plat-sim/
>  core-$(CONFIG_ARC_PLAT_TB10X)	+= arch/arc/plat-tb10x/
> diff --git a/arch/arc/boot/dts/Makefile b/arch/arc/boot/dts/Makefile
> index b0e3f19..4dcab5b 100644
> --- a/arch/arc/boot/dts/Makefile
> +++ b/arch/arc/boot/dts/Makefile
> @@ -1,13 +1,11 @@
>  # Built-in dtb
> -builtindtb-y		:= nsim_700
>  
>  ifneq ($(CONFIG_ARC_BUILTIN_DTB_NAME),"")
>  	builtindtb-y	:= $(patsubst "%",%,$(CONFIG_ARC_BUILTIN_DTB_NAME))
> +	obj-y   += $(builtindtb-y).dtb.o
> +	targets += $(builtindtb-y).dtb
>  endif
>  
> -obj-y   += $(builtindtb-y).dtb.o
> -targets += $(builtindtb-y).dtb
> -
>  .SECONDARY: $(obj)/$(builtindtb-y).dtb.S
>  
>  dtbs:  $(addprefix  $(obj)/, $(builtindtb-y).dtb)


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

end of thread, other threads:[~2015-11-02  6:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-31 23:21 [PATCH] arc: dts - remove default value if CONFIG_ARC_BUILTIN_DTB_NAME is blank Alexey Brodkin
2015-11-01 20:37 ` Noam Camus
2015-11-02  6:54 ` Vineet Gupta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).