[U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable

Scott Wood scottwood at freescale.com
Fri Sep 16 00:54:26 CEST 2011


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 at 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



More information about the U-Boot mailing list