From mboxrd@z Thu Jan 1 00:00:00 1970 From: Allen Martin Date: Wed, 6 Jun 2012 11:09:48 -0700 Subject: [U-Boot] [PATCH v2 03/10] mkconfig: add support for SPL CPU In-Reply-To: <4FCF8346.2020208@wwwdotorg.org> References: <1338931225-12246-1-git-send-email-amartin@nvidia.com> <1338931225-12246-4-git-send-email-amartin@nvidia.com> <4FCF8346.2020208@wwwdotorg.org> Message-ID: <20120606180947.GD13311@nvidia.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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