public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] SPL: Make path to start.S configurable
Date: Thu, 15 Sep 2011 17:54:26 -0500	[thread overview]
Message-ID: <4E728222.6030803@freescale.com> (raw)
In-Reply-To: <1315799780-16127-2-git-send-email-marek.vasut@gmail.com>

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

  reply	other threads:[~2011-09-15 22:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E728222.6030803@freescale.com \
    --to=scottwood@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox