[U-Boot] [PATCH v2 03/10] mkconfig: add support for SPL CPU

Stephen Warren swarren at wwwdotorg.org
Wed Jun 6 18:20:22 CEST 2012


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?


More information about the U-Boot mailing list