
6 Jun
2012
6 Jun
'12
6:20 p.m.
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?