Merge branch 'master' of git://www.denx.de/git/u-boot-imx
[platform/kernel/u-boot.git] / mkconfig
index b755d2a..401f262 100755 (executable)
--- 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
@@ -104,9 +109,9 @@ fi
 # Create link to architecture specific headers
 #
 if [ -n "$KBUILD_SRC" ] ; then
-       mkdir -p ${OBJTREE}/include
-       LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/
-       cd ${OBJTREE}/include
+       mkdir -p ${objtree}/include
+       LNPREFIX=${srctree}/arch/${arch}/include/asm/
+       cd ${objtree}/include
        mkdir -p asm
 else
        cd arch/${arch}/include
@@ -114,19 +119,14 @@ 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
-fi
-
-if [ "${arch}" = "arm" ] ; then
-       rm -f asm/proc
-       ln -s ${LNPREFIX}proc-armv asm/proc
+elif [ "${cpu}" ] ; then
+       ln -s ${LNPREFIX}arch-${cpu} asm/arch
 fi
 
 if [ -z "$KBUILD_SRC" ] ; then
-       cd ${SRCTREE}/include
+       cd ${srctree}/include
 fi
 
 #