From: Nishanth Menon Date: Mon, 2 Nov 2009 15:40:18 +0000 (-0600) Subject: mkconfig: deny messed up ARCH definition X-Git-Tag: v2009.11-rc2~42 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a8fa379d47f06c7d3ed75c8fb26ae43ee38e1fd7;p=u-boot mkconfig: deny messed up ARCH definition Refuse to setup a platform if the command line ARCH= is not the same as the one required for the board. This prevents any user with prehistoric aliases from messing up their builds. Reported in thread: http://old.nabble.com/-U-Boot--Build-breaks-on-some-OMAP3-configs-to26132721.html Inputs from: Mike Frysinger and Wolfgang Denk: http://lists.denx.de/pipermail/u-boot/2009-November/063642.html Cc: Wolfgang Denk Cc: Mike Frysinger Cc: Anand Gadiyar Cc: Dirk Behme Signed-off-by: Nishanth Menon --- diff --git a/mkconfig b/mkconfig index 4c5675bd3c..1075510790 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..." #