summaryrefslogtreecommitdiff
path: root/mkconfig
diff options
context:
space:
mode:
authorAllen Martin <amartin@nvidia.com>2012-04-19 07:58:57 +0000
committerWolfgang Denk <wd@denx.de>2012-08-09 22:37:42 +0200
commitd22650afabd6ce0003569f11b1605a69aac0f22c (patch)
tree168813d217bf2e8229459f92b6ca52ab094600b3 /mkconfig
parentf28e26951a903f495912b89d2563d1b2e41caf76 (diff)
downloadu-boot-imx-d22650afabd6ce0003569f11b1605a69aac0f22c.zip
u-boot-imx-d22650afabd6ce0003569f11b1605a69aac0f22c.tar.gz
u-boot-imx-d22650afabd6ce0003569f11b1605a69aac0f22c.tar.bz2
mkconfig: add support for SPL CPU
Add support for specifying a differnt CPU for main u-boot and SPL 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. Signed-off-by: Allen Martin <amartin@nvidia.com>
Diffstat (limited to 'mkconfig')
-rwxr-xr-xmkconfig15
1 files changed, 14 insertions, 1 deletions
diff --git a/mkconfig b/mkconfig
index 801f921..9e1a7e6 100755
--- a/mkconfig
+++ b/mkconfig
@@ -60,6 +60,11 @@ CONFIG_NAME="${1%_config}"
arch="$2"
cpu="$3"
+tmp="${cpu#*:}"
+if [ "$tmp" != "$cpu" ] ; then
+ spl_cpu=$tmp
+ cpu="${cpu%:*}"
+fi
if [ "$4" = "-" ] ; then
board=${BOARD_NAME}
else
@@ -131,7 +136,15 @@ fi
# Create include file for Make
#
echo "ARCH = ${arch}" > config.mk
-echo "CPU = ${cpu}" >> config.mk
+if [ ! -z "$spl_cpu" ] ; then
+ echo 'ifeq ($(CONFIG_SPL_BUILD),y)' >> config.mk
+ echo "CPU = ${spl_cpu}" >> config.mk
+ echo "else" >> config.mk
+ echo "CPU = ${cpu}" >> config.mk
+ echo "endif" >> config.mk
+else
+ echo "CPU = ${cpu}" >> config.mk
+fi
echo "BOARD = ${board}" >> config.mk
[ "${vendor}" ] && echo "VENDOR = ${vendor}" >> config.mk