]> git.sur5r.net Git - u-boot/commitdiff
mkconfig: deny messed up ARCH definition
authorNishanth Menon <nm@ti.com>
Mon, 2 Nov 2009 15:40:18 +0000 (09:40 -0600)
committerWolfgang Denk <wd@denx.de>
Tue, 24 Nov 2009 22:37:00 +0000 (23:37 +0100)
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 <wd@denx.de>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Dirk Behme <dirk.behme@googlemail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
mkconfig

index 4c5675bd3cca3eea89955f8d4feb49dd597d8463..10755107900cf190e664596be862d196cd0a4f30 100755 (executable)
--- 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..."
 
 #