From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Wed, 06 Jun 2012 10:20:22 -0600 Subject: [U-Boot] [PATCH v2 03/10] mkconfig: add support for SPL CPU In-Reply-To: <1338931225-12246-4-git-send-email-amartin@nvidia.com> References: <1338931225-12246-1-git-send-email-amartin@nvidia.com> <1338931225-12246-4-git-send-email-amartin@nvidia.com> Message-ID: <4FCF8346.2020208@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 06/05/2012 03:20 PM, Allen Martin wrote: > Add support for specifying a differnt CPU for main u-boot and SPL typo ^^ > 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?