[U-Boot] [RFC PATCH 14/17] spl: introduce CONFIG_SPL_TARGET

Scott Wood scottwood at freescale.com
Mon Sep 24 22:05:51 CEST 2012


On 09/24/2012 02:03:04 PM, Tom Rini wrote:
> On Mon, Sep 24, 2012 at 01:54:05PM -0500, Scott Wood wrote:
> > On 09/21/2012 07:12:38 PM, Tom Rini wrote:
> > >On Fri, Sep 21, 2012 at 07:01:24PM -0500, Scott Wood wrote:
> > >
> > >> Currently it seems that SPLs rely on the user to specify the
> > >final target
> > >> on the make command line.  This is a departure from traditional
> > >U-Boot practice
> > >> and results in a lack of build coverage in MAKEALL.
> > >>
> > >> Now boards can specify CONFIG_SPL_TARGET to determine what gets
> > >built by default.
> > >> Eventually all SPL boards should specify CONFIG_SPL_TARGET, but
> > >for now default
> > >> to at least building the SPL code.
> > >>
> > >> Signed-off-by: Scott Wood <scottwood at freescale.com>
> > >
> > >Note that this is sometimes handled via config.mk fragments:
> > >ifdef CONFIG_SPL_BUILD
> > >ALL-y   += $(OBJTREE)/MLO
> > >else
> > >ALL-y   += $(obj)u-boot.img
> > >endif
> > >
> > >Or similar.  I don't know what's better.
> >
> > Ah.  I was wondering if there were some magic that existing boards
> > were using, but couldn't find it.
> >
> > I think I'd prefer having a simple CONFIG_SPL_TARGET, and boards
> > that need something more complicated can still provide a config.mk
> > fragment.  What is the CONFIG_SPL_BUILD test for?  Is ALL-y really
> > evaluated twice?
> 
> I'm not sure.  And thinking about what Wolfgang said in the other  
> thread
> about SoC specific Makefile fragment for the custom rules, it might  
> work
> out easily enough to convert things like this.

Right, s/boards/SoCs/

> And yes, unless I'm
> missing something, we evaulate everything again for the SPL build (and
> each side of that if/else only would make sense in that context).

OK, it's not that you evaluate everything (most makefiles, yes, but I  
don't think this applies to the toplevel makefile) so much as that  
spl/Makefile has its own ALL-y.

-Scott


More information about the U-Boot mailing list