From a8fa379d47f06c7d3ed75c8fb26ae43ee38e1fd7 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Mon, 2 Nov 2009 09:40:18 -0600 Subject: [PATCH] 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 --- mkconfig | 5 +++++ 1 file changed, 5 insertions(+) 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..." # -- 2.30.2