[U-Boot] [PATCH v3 04/14] mkconfig: add support for SPL CPU

Allen Martin amartin at nvidia.com
Mon Jun 11 20:40:19 CEST 2012


On Sat, Jun 09, 2012 at 11:20:34AM -0700, Simon Glass wrote:
> +
> +Normally CPU is assumed to be the same between the SPL and normal
> +u-boot build.  However it is possible to specify a different CPU for
> +the SPL build for cases where the SPL is expected to run on a
> +different CPU model from the main u-boot.  This is done by specifying
> +an SPL CPU in boards.cfg as follows:
> +
> +       normal_cpu:spl_cpu
> 
> I can't help thinking that this is more of a cpu issue than a board issue. The way this is done all tegra2 (and later tegra3) boards will need to add this in for their CPU. If you could solve this in the Makefiles then it might be easier. Then this feature could be put into Tegra's config.mk<http://config.mk> instead of in every board.
> 
> I notice that $(CPU) is only references once in Makefile and once in config.mk<http://config.mk>.
> 
> You could perhaps define a SPL_CPU variable and use that in spl/Makefile, and CPU in Makefile. Then you don't need to put an 'if' in your config.mk<http://config.mk> - it can just specify both.
> 
> This is just an idea - if you are happy with what you have then it is fine with me.
> 

I would definately prefer not to touch boards.cfg and mkconfig if I
don't have to.  The problem is the mkcnofig generated $(CPU) variable
is read really early by the top level Makefile and a bunch of derived
variables and decisions are made based on that well before any board
or chip specific Makefiles or config.mk files are referenced.  

I'm loathe to change how any of that works for fear of breaking some
other boards/chips.  I'm definately open to suggestions if there's a
better way of doing this that doesn't have to change boards.cfg
format. 

-Allen
-- 
nvpublic


More information about the U-Boot mailing list