summaryrefslogtreecommitdiff
path: root/mkconfig
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2014-06-24 13:10:52 (GMT)
committerTom Rini <trini@ti.com>2014-07-07 23:42:34 (GMT)
commita8b0f9b685072e1d3acd01741e7db6833b445b2a (patch)
treeef92f75a73693017a4bc42e690eec2b0618d48cc /mkconfig
parentd1db76f1494492fc1c13e3bfe036c6dfb942e8be (diff)
downloadu-boot-fsl-qoriq-a8b0f9b685072e1d3acd01741e7db6833b445b2a.tar.xz
build: define CPU only when arch/${ARCH}/cpu/${CPU} exists
The directory arch/${ARCH}/cpu/${CPU} does not exist in avr32, blackfin, microblaze, nios2, openrisc, sandbox, x86. These architectures have only one CPU type. Defining CPU should not be required for such architectures. This commit allows cpu field (= the 3rd field of boards.cfg) to be kept blank. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Sonic Zhang <sonic.zhang@analog.com> Cc: Michal Simek <michal.simek@xilinx.com> Cc: Thomas Chou <thomas@wytron.com.tw> Cc: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Diffstat (limited to 'mkconfig')
-rwxr-xr-xmkconfig11
1 files changed, 8 insertions, 3 deletions
diff --git a/mkconfig b/mkconfig
index 2bf5897..401f262 100755
--- a/mkconfig
+++ b/mkconfig
@@ -55,6 +55,11 @@ CONFIG_NAME="${7%_config}"
arch="$2"
cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $1}'`
spl_cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $2}'`
+
+if [ "$cpu" = "-" ] ; then
+ cpu=
+fi
+
if [ "$6" = "<none>" ] ; then
board=
elif [ "$6" = "-" ] ; then
@@ -114,10 +119,10 @@ fi
rm -f asm/arch
-if [ -z "${soc}" ] ; then
- ln -s ${LNPREFIX}arch-${cpu} asm/arch
-else
+if [ "${soc}" ] ; then
ln -s ${LNPREFIX}arch-${soc} asm/arch
+elif [ "${cpu}" ] ; then
+ ln -s ${LNPREFIX}arch-${cpu} asm/arch
fi
if [ -z "$KBUILD_SRC" ] ; then