X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=mkconfig;h=cd911a9dc7322ecd4b126001b31209f44debe2d7;hp=40db9910081de9b0ae21c63f58b00ae6b2e23c20;hb=c34c0246a3600dc4712247b267f71576234e403b;hpb=15c5cdf5aa6b292145e5e3e220ec1f42b11eff6f diff --git a/mkconfig b/mkconfig index 40db991008..cd911a9dc7 100755 --- a/mkconfig +++ b/mkconfig @@ -23,7 +23,7 @@ options="" if [ \( $# -eq 2 \) -a \( "$1" = "-A" \) ] ; then # Automatic mode - line=`awk '($0 !~ /^#/ && $7 ~ /^'"$2"'$/) { print $1, $2, $3, $4, $5, $6, $7, $8 }' boards.cfg` + line=`awk '($0 !~ /^#/ && $7 ~ /^'"$2"'$/) { print $1, $2, $3, $4, $5, $6, $7, $8 }' $srctree/boards.cfg` if [ -z "$line" ] ; then echo "make: *** No rule to make target \`$2_config'. Stop." >&2 exit 1 @@ -55,7 +55,9 @@ CONFIG_NAME="${7%_config}" arch="$2" cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $1}'` spl_cpu=`echo $3 | awk 'BEGIN {FS = ":"} ; {print $2}'` -if [ "$6" = "-" ] ; then +if [ "$6" = "" ] ; then + board= +elif [ "$6" = "-" ] ; then board=${BOARD_NAME} else board="$6" @@ -85,6 +87,13 @@ if [ "${ARCH}" -a "${ARCH}" != "${arch}" ]; then exit 1 fi +# +# Test above needed aarch64, now we need arm +# +if [ "${arch}" = "aarch64" ]; then + arch="arm" +fi + if [ "$options" ] ; then echo "Configuring for ${BOARD_NAME} - Board: ${CONFIG_NAME}, Options: ${options}" else @@ -94,10 +103,10 @@ fi # # Create link to architecture specific headers # -if [ "$SRCTREE" != "$OBJTREE" ] ; then - mkdir -p ${OBJTREE}/include - LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/ - cd ${OBJTREE}/include +if [ -n "$KBUILD_SRC" ] ; then + mkdir -p ${objtree}/include + LNPREFIX=${srctree}/arch/${arch}/include/asm/ + cd ${objtree}/include mkdir -p asm else cd arch/${arch}/include @@ -116,8 +125,8 @@ if [ "${arch}" = "arm" ] ; then ln -s ${LNPREFIX}proc-armv asm/proc fi -if [ "$SRCTREE" = "$OBJTREE" ] ; then - cd ${SRCTREE}/include +if [ -z "$KBUILD_SRC" ] ; then + cd ${srctree}/include fi # @@ -170,8 +179,8 @@ echo "#define CONFIG_SYS_BOARD \"${board}\"" >> config.h [ "${soc}" ] && echo "#define CONFIG_SYS_SOC \"${soc}\"" >> config.h +[ "${board}" ] && echo "#define CONFIG_BOARDDIR board/$BOARDDIR" >> config.h cat << EOF >> config.h -#define CONFIG_BOARDDIR board/$BOARDDIR #include #include #include