All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 0/2] SPL improvements
@ 2011-09-12  3:56 Marek Vasut
  2011-09-12  3:56 ` [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable Marek Vasut
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Marek Vasut @ 2011-09-12  3:56 UTC (permalink / raw)
  To: u-boot

This series introduces a few modifications to the new SPL framework to make it
a bit more flexible.

Marek Vasut (2):
  SPL: Make path to start.S configurable
  SPL: Allow user to disable CPU support library

 spl/Makefile |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

-- 
1.7.5.4

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

* [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable
  2011-09-12  3:56 [U-Boot] [PATCH 0/2] SPL improvements Marek Vasut
@ 2011-09-12  3:56 ` Marek Vasut
  2011-09-15 22:54   ` Scott Wood
  2011-09-12  3:56 ` [U-Boot] [PATCH 2/2] SPL: Allow user to disable CPU support library Marek Vasut
  2011-09-12  4:11 ` [U-Boot] [PATCH 0/2] SPL improvements Marek Vasut
  2 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2011-09-12  3:56 UTC (permalink / raw)
  To: u-boot

Introduce CONFIG_SPL_START_S_PATH to configure path to start.S file. It's not
always fitting to use CPU's start.S .

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 spl/Makefile |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/spl/Makefile b/spl/Makefile
index 95ecce1..56d8ea1 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -26,7 +26,13 @@ obj := $(OBJTREE)/spl/
 HAVE_VENDOR_COMMON_LIB := $(shell [ -f $(SRCTREE)/board/$(VENDOR)/common/Makefile ] \
 			&& echo y || echo n)
 
-START := $(CPUDIR)/start.o
+ifdef	CONFIG_SPL_START_S_PATH
+START_PATH := $(subst ",,$(CONFIG_SPL_START_S_PATH))
+else
+START_PATH := $(CPUDIR)
+endif
+
+START := $(START_PATH)/start.o
 
 LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
 LIBS-y += $(CPUDIR)/lib$(CPU).o
@@ -119,7 +125,7 @@ $(obj)u-boot-spl:	depend $(START) $(LIBS) $(obj)u-boot-spl.lds
 	$(GEN_UBOOT)
 
 $(START):	depend
-	$(MAKE) -C $(SRCTREE)/$(CPUDIR) $@
+	$(MAKE) -C $(SRCTREE)/$(START_PATH) $@
 
 $(LIBS):	depend
 	$(MAKE) -C $(SRCTREE)$(dir $(subst $(SPLTREE),,$@))
-- 
1.7.5.4

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

* [U-Boot] [PATCH 2/2] SPL: Allow user to disable CPU support library
  2011-09-12  3:56 [U-Boot] [PATCH 0/2] SPL improvements Marek Vasut
  2011-09-12  3:56 ` [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable Marek Vasut
@ 2011-09-12  3:56 ` Marek Vasut
  2011-09-12  4:11 ` [U-Boot] [PATCH 0/2] SPL improvements Marek Vasut
  2 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2011-09-12  3:56 UTC (permalink / raw)
  To: u-boot

Introduce CONFIG_SPL_NO_CPU_SUPPORT_CODE to avoid compiling the CPU support
library. This can be useful on some setups.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
 spl/Makefile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/spl/Makefile b/spl/Makefile
index 56d8ea1..3967737 100644
--- a/spl/Makefile
+++ b/spl/Makefile
@@ -20,6 +20,11 @@ export CONFIG_SPL_BUILD
 
 include $(TOPDIR)/config.mk
 
+# In case we want to avoid the CPU support code, we need to define this:
+ifndef	CONFIG_SPL_NO_CPU_SUPPORT_CODE
+SPL_CPU_SUPPORT_CODE := y
+endif
+
 # We want the final binaries in this directory
 obj := $(OBJTREE)/spl/
 
@@ -35,7 +40,7 @@ endif
 START := $(START_PATH)/start.o
 
 LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
-LIBS-y += $(CPUDIR)/lib$(CPU).o
+LIBS-$(SPL_CPU_SUPPORT_CODE) += $(CPUDIR)/lib$(CPU).o
 ifdef SOC
 LIBS-y += $(CPUDIR)/$(SOC)/lib$(SOC).o
 endif
-- 
1.7.5.4

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

* [U-Boot] [PATCH 0/2] SPL improvements
  2011-09-12  3:56 [U-Boot] [PATCH 0/2] SPL improvements Marek Vasut
  2011-09-12  3:56 ` [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable Marek Vasut
  2011-09-12  3:56 ` [U-Boot] [PATCH 2/2] SPL: Allow user to disable CPU support library Marek Vasut
@ 2011-09-12  4:11 ` Marek Vasut
  2 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2011-09-12  4:11 UTC (permalink / raw)
  To: u-boot

On Monday, September 12, 2011 05:56:18 AM Marek Vasut wrote:
> This series introduces a few modifications to the new SPL framework to make
> it a bit more flexible.
> 
> Marek Vasut (2):
>   SPL: Make path to start.S configurable
>   SPL: Allow user to disable CPU support library
> 
>  spl/Makefile |   17 ++++++++++++++---
>  1 files changed, 14 insertions(+), 3 deletions(-)

Please ignore this series, there is a resend of this.

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

* [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable
  2011-09-12  3:56 ` [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable Marek Vasut
@ 2011-09-15 22:54   ` Scott Wood
  2011-09-15 23:02     ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2011-09-15 22:54 UTC (permalink / raw)
  To: u-boot

On 09/11/2011 10:56 PM, Marek Vasut wrote:
> Introduce CONFIG_SPL_START_S_PATH to configure path to start.S file. It's not
> always fitting to use CPU's start.S .
> 
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> ---
>  spl/Makefile |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/spl/Makefile b/spl/Makefile
> index 95ecce1..56d8ea1 100644
> --- a/spl/Makefile
> +++ b/spl/Makefile
> @@ -26,7 +26,13 @@ obj := $(OBJTREE)/spl/
>  HAVE_VENDOR_COMMON_LIB := $(shell [ -f $(SRCTREE)/board/$(VENDOR)/common/Makefile ] \
>  			&& echo y || echo n)
>  
> -START := $(CPUDIR)/start.o
> +ifdef	CONFIG_SPL_START_S_PATH
> +START_PATH := $(subst ",,$(CONFIG_SPL_START_S_PATH))
> +else
> +START_PATH := $(CPUDIR)
> +endif
> +
> +START := $(START_PATH)/start.o

So you can override the path, but not the filename?  What if I want to
have arch/.../cpu/.../start-nand-spl.o?

How about:

ifdef CONFIG_SPL_START_FILE
START := $(subst ",,$(CONFIG_SPL_START_FILE))
else
START := $(CPUDIR)/start.o
endif

START_PATH := $(dir $(START))

>  LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
>  LIBS-y += $(CPUDIR)/lib$(CPU).o
> @@ -119,7 +125,7 @@ $(obj)u-boot-spl:	depend $(START) $(LIBS) $(obj)u-boot-spl.lds
>  	$(GEN_UBOOT)
>  
>  $(START):	depend
> -	$(MAKE) -C $(SRCTREE)/$(CPUDIR) $@
> +	$(MAKE) -C $(SRCTREE)/$(START_PATH) $@

Yay recursive make. :-P

-Scott

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

* [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable
  2011-09-15 22:54   ` Scott Wood
@ 2011-09-15 23:02     ` Marek Vasut
  2011-09-16 16:16       ` Scott Wood
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Vasut @ 2011-09-15 23:02 UTC (permalink / raw)
  To: u-boot

On Friday, September 16, 2011 12:54:26 AM Scott Wood wrote:
> On 09/11/2011 10:56 PM, Marek Vasut wrote:
> > Introduce CONFIG_SPL_START_S_PATH to configure path to start.S file. It's
> > not always fitting to use CPU's start.S .
> > 
> > Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
> > ---
> > 
> >  spl/Makefile |   10 ++++++++--
> >  1 files changed, 8 insertions(+), 2 deletions(-)
> > 
> > diff --git a/spl/Makefile b/spl/Makefile
> > index 95ecce1..56d8ea1 100644
> > --- a/spl/Makefile
> > +++ b/spl/Makefile
> > @@ -26,7 +26,13 @@ obj := $(OBJTREE)/spl/
> > 
> >  HAVE_VENDOR_COMMON_LIB := $(shell [ -f
> >  $(SRCTREE)/board/$(VENDOR)/common/Makefile ] \
> >  
> >  			&& echo y || echo n)
> > 
> > -START := $(CPUDIR)/start.o
> > +ifdef	CONFIG_SPL_START_S_PATH
> > +START_PATH := $(subst ",,$(CONFIG_SPL_START_S_PATH))
> > +else
> > +START_PATH := $(CPUDIR)
> > +endif
> > +
> > +START := $(START_PATH)/start.o
> 
> So you can override the path, but not the filename?  What if I want to
> have arch/.../cpu/.../start-nand-spl.o?
> 
> How about:
> 
> ifdef CONFIG_SPL_START_FILE
> START := $(subst ",,$(CONFIG_SPL_START_FILE))
> else
> START := $(CPUDIR)/start.o
> endif
> 
> START_PATH := $(dir $(START))
> 
> >  LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
> >  LIBS-y += $(CPUDIR)/lib$(CPU).o
> > 
> > @@ -119,7 +125,7 @@ $(obj)u-boot-spl:	depend $(START) $(LIBS)
> > $(obj)u-boot-spl.lds
> > 
> >  	$(GEN_UBOOT)
> >  
> >  $(START):	depend
> > 
> > -	$(MAKE) -C $(SRCTREE)/$(CPUDIR) $@
> > +	$(MAKE) -C $(SRCTREE)/$(START_PATH) $@
> 
> Yay recursive make. :-P

Yea ... that's why that START_PATH is needed. We can of course have 
CONFIG_SPL_START_PATH and CONFIG_SPL_START_FILENAME, but I assume right now, 
this is enough and when needed, the other one can be added.

> 
> -Scott

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

* [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable
  2011-09-15 23:02     ` Marek Vasut
@ 2011-09-16 16:16       ` Scott Wood
  2011-09-16 16:22         ` Marek Vasut
  0 siblings, 1 reply; 8+ messages in thread
From: Scott Wood @ 2011-09-16 16:16 UTC (permalink / raw)
  To: u-boot

On 09/15/2011 06:02 PM, Marek Vasut wrote:
> On Friday, September 16, 2011 12:54:26 AM Scott Wood wrote:
>> How about:
>>
>> ifdef CONFIG_SPL_START_FILE
>> START := $(subst ",,$(CONFIG_SPL_START_FILE))
>> else
>> START := $(CPUDIR)/start.o
>> endif
>>
>> START_PATH := $(dir $(START))
>>
>>>  LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
>>>  LIBS-y += $(CPUDIR)/lib$(CPU).o
>>>
>>> @@ -119,7 +125,7 @@ $(obj)u-boot-spl:	depend $(START) $(LIBS)
>>> $(obj)u-boot-spl.lds
>>>
>>>  	$(GEN_UBOOT)
>>>  
>>>  $(START):	depend
>>>
>>> -	$(MAKE) -C $(SRCTREE)/$(CPUDIR) $@
>>> +	$(MAKE) -C $(SRCTREE)/$(START_PATH) $@
>>
>> Yay recursive make. :-P
> 
> Yea ... that's why that START_PATH is needed.

Does START_PATH := $(dir $(START)) not work?

-scott

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

* [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable
  2011-09-16 16:16       ` Scott Wood
@ 2011-09-16 16:22         ` Marek Vasut
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Vasut @ 2011-09-16 16:22 UTC (permalink / raw)
  To: u-boot

On Friday, September 16, 2011 06:16:15 PM Scott Wood wrote:
> On 09/15/2011 06:02 PM, Marek Vasut wrote:
> > On Friday, September 16, 2011 12:54:26 AM Scott Wood wrote:
> >> How about:
> >> 
> >> ifdef CONFIG_SPL_START_FILE
> >> START := $(subst ",,$(CONFIG_SPL_START_FILE))
> >> else
> >> START := $(CPUDIR)/start.o
> >> endif
> >> 
> >> START_PATH := $(dir $(START))
> >> 
> >>>  LIBS-y += arch/$(ARCH)/lib/lib$(ARCH).o
> >>>  LIBS-y += $(CPUDIR)/lib$(CPU).o
> >>> 
> >>> @@ -119,7 +125,7 @@ $(obj)u-boot-spl:	depend $(START) $(LIBS)
> >>> $(obj)u-boot-spl.lds
> >>> 
> >>>  	$(GEN_UBOOT)
> >>>  
> >>>  $(START):	depend
> >>> 
> >>> -	$(MAKE) -C $(SRCTREE)/$(CPUDIR) $@
> >>> +	$(MAKE) -C $(SRCTREE)/$(START_PATH) $@
> >> 
> >> Yay recursive make. :-P
> > 
> > Yea ... that's why that START_PATH is needed.
> 
> Does START_PATH := $(dir $(START)) not work?

What if you then wanted to have start.o for SPL in x/y/spl/start_spl.o with 
START_PATH=x/y and START=spl/start_spl.o ?

In currect patch, the spl code can be easily extended to support this.

Cheers

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

end of thread, other threads:[~2011-09-16 16:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-12  3:56 [U-Boot] [PATCH 0/2] SPL improvements Marek Vasut
2011-09-12  3:56 ` [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable Marek Vasut
2011-09-15 22:54   ` Scott Wood
2011-09-15 23:02     ` Marek Vasut
2011-09-16 16:16       ` Scott Wood
2011-09-16 16:22         ` Marek Vasut
2011-09-12  3:56 ` [U-Boot] [PATCH 2/2] SPL: Allow user to disable CPU support library Marek Vasut
2011-09-12  4:11 ` [U-Boot] [PATCH 0/2] SPL improvements Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.