X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=mkconfig;h=27d9f2bac7ca500f51a771000030d42081c8be3b;hp=4c5675bd3cca3eea89955f8d4feb49dd597d8463;hb=1c2a8e359ebbec0dbef62f5b54c72f9cd72ccd59;hpb=084f3ddac6ab624a4b1c7174b3cdf9cc25866217 diff --git a/mkconfig b/mkconfig index 4c5675bd3c..27d9f2bac7 100755 --- a/mkconfig +++ b/mkconfig @@ -27,6 +27,11 @@ done [ $# -lt 4 ] && exit 1 [ $# -gt 6 ] && exit 1 +if [ "${ARCH}" -a "${ARCH}" != "$2" ]; then + echo "Failed: \$ARCH=${ARCH}, should be '$2' for ${BOARD_NAME}" 1>&2 + exit 1 +fi + echo "Configuring for ${BOARD_NAME} board..." # @@ -74,6 +79,13 @@ echo "BOARD = $4" >> config.mk [ "$6" ] && [ "$6" != "NULL" ] && echo "SOC = $6" >> config.mk +# Assign board directory to BOARDIR variable +if [ -z "$5" -o "$5" = "NULL" ] ; then + BOARDDIR=$4 +else + BOARDDIR=$5/$4 +fi + # # Create board specific header file # @@ -89,6 +101,8 @@ for i in ${TARGETS} ; do echo "#define CONFIG_MK_${i} 1" >>config.h ; done +echo "#define CONFIG_BOARDDIR board/$BOARDDIR" >>config.h + echo "#include " >>config.h echo "#include " >>config.h