mkconfig: deny messed up ARCH definition
PATCH 1/1 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 thier builds
Reported in thread:
http://old.nabble.com/-U-Boot--Build-breaks-on-some-OMAP3-configs-to26132721.html
--- mkconfig | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
mkconfig +5 -0
@@ -27,6 +27,11 @@ done [ $# -lt 4 ] && exit 1 [ $# -gt 6 ] && exit 1 +if [ ! -z "$ARCH" -a "$ARCH" != "$2" ]; then + echo "ARCH=$ARCH while ${BOARD_NAME} arch=$2: fail" + exit 1 +fi + echo "Configuring for ${BOARD_NAME} board..." #
Signature · 1 line
1.6.0.4
PATCH 1/1 mkconfig: deny messed up ARCH definition
Quoted 5 lines · On Saturday 31 October 2009 10:12:01 Nishanth Menon wrote:
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 thier builds
seems like excessive line wrapping
Quoted 1 line
+if [ ! -z "$ARCH" -a "$ARCH" != "$2" ]; then
is the !-z really needed ?
mkconfig done · line 31
Quoted 1 line
mkconfig +1
-0+ echo "ARCH=$ARCH while ${BOARD_NAME} arch=$2: fail"
should be sent to stderr: 1>&2
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091031/aca0c43e/attachment.pgp
Menon
PATCH 1/1 mkconfig: deny messed up ARCH definition
Quoted 7 lines
-----Original Message-----
From: Mike Frysinger [mailto:vapier at gentoo.org]
Sent: Saturday, October 31, 2009 11:41 PM
To: u-boot at lists.denx.de
Cc: Menon, Nishanth; Gadiyar, Anand
Subject: Re: [U-Boot] [PATCH] mkconfig: deny messed up ARCH definition
Quoted 8 lines
Quoted 5 lines · On Saturday 31 October 2009 10:12:01 Nishanth Menon wrote:
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 thier builds
seems like excessive line wrapping
Ok.. will stick with 70 chars..
Quoted 4 lines
Quoted 2 lines
+if [ ! -z "$ARCH" -a "$ARCH" != "$2" ]; then
is the !-z really needed ?
We don't want the check to trigger if ARCH is not defined. [ "$ARCH" != "$2" ] will trigger as "" != "arm"
Quoted 4 lines
mkconfig done · line 31
Quoted 2 lines
mkconfig +1
-0+ echo "ARCH=$ARCH while ${BOARD_NAME} arch=$2: fail"should be sent to stderr: 1>&2
Ack.
Regards,
Nishanth Menon
PATCH 1/1 mkconfig: deny messed up ARCH definition
Quoted 8 lines · Nishanth
From: Mike Frysinger
Quoted 4 lines · On Saturday 31 October 2009 10:12:01 Nishanth Menon wrote:
Quoted 1 line
+if [ ! -z "$ARCH" -a "$ARCH" != "$2" ]; then
is the !-z really needed ?
We don't want the check to trigger if ARCH is not defined. [ "$ARCH" != "$2" ] will trigger as "" != "arm"
the implied question is whether this is a valid state. i know you dont want that kind of comparison, but i thought the Makefile would have set it up for you by default. now that i think about it a bit more, that isnt what happens at all.
so only thing to change here is to use -n and not !-z
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20091101/e64b37c3/attachment.pgp
PATCH 1/1 mkconfig: deny messed up ARCH definition
Dear Mike Frysinger,
Quoted 8 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
+if [ ! -z "$ARCH" -a "$ARCH" != "$2" ]; then
is the !-z really needed ?
We don't want the check to trigger if ARCH is not defined. [ "$ARCH" != "$2" ] will trigger as "" != "arm"
Quoted 6 lines
the implied question is whether this is a valid state. i know you dont wan> t that kind of comparison, but i thought the
Makefilewould have set it up fo> r you by default. now that i think about it a bit more, that isnt what happe> ns at all.so only thing to change here is to use -n and not !-z
Or even omit the (redundant) "-n" and just write
if [ "$ARCH" -a "$ARCH" != "$2" ]; then ...
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Use the Force, Luke.
Menon
PATCH 1/1 mkconfig: deny messed up ARCH definition
Quoted 20 lines
From: Wolfgang Denk [mailto:wd at denx.de]
Sent: Sunday, November 01, 2009 8:58 AMDear Mike Frysinger,
Quoted 9 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
+if [ ! -z "$ARCH" -a "$ARCH" != "$2" ]; then
is the !-z really needed ?
We don't want the check to trigger if ARCH is not defined. [ "$ARCH" != "$2" ] will trigger as "" != "arm"
the implied question is whether this is a valid state. i know you dont
wan> t
Quoted 1 line
that kind of comparison, but i thought the
Makefilewould have set it upfo> r
Quoted 1 line
you by default. now that i think about it a bit more, that isnt what
Quoted 8 lines
happe> ns
Quoted 3 lines
at all.
so only thing to change here is to use -n and not !-z
Or even omit the (redundant) "-n" and just write
if [ "$ARCH" -a "$ARCH" != "$2" ]; then
Ack. V2 coming up
Regards,
Nishanth Menon