[U-Boot] [PATCH v2 03/10] mkconfig: add support for SPL CPU
Allen Martin
amartin at nvidia.com
Wed Jun 6 20:09:48 CEST 2012
On Wed, Jun 06, 2012 at 09:20:22AM -0700, Stephen Warren wrote:
> On 06/05/2012 03:20 PM, Allen Martin wrote:
> > Add support for specifying a differnt CPU for main u-boot and SPL
>
> typo ^^
Got it, thanks.
> > u-boot builds. This is done by adding an optional SPL CPU after the
> > main CPU in boards.cfg as follows:
> >
> > normal_cpu:spl_cpu
> >
> > This this case CPU will be set to "normal_cpu" during the main u-boot
> > build and "spl_cpu" during the SPL build.
>
> > diff --git a/mkconfig b/mkconfig
>
> > +tmp="${cpu#*:}"
> > +if [ "$tmp" != "$cpu" ] ; then
> > + spl_cpu=$tmp
> > + cpu="${cpu%:*}"
> > +fi
>
> Neat - I wasn't aware of those variable expansion techniques.
>
> However, this script runs under /bin/sh - are they standard sh
> constructs, or are they bash-isms? I wonder if shelling out to awk or
> cut here would be more portable?
It's bash, I'll rewrite it with awk.
-Allen
--
nvpublic
More information about the U-Boot
mailing list