diff mbox

[U-Boot,v3] MAKEALL: fix get_target_arch() to adjust to '-' in Status field

Message ID 1428286348-18115-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada April 6, 2015, 2:12 a.m. UTC
Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
generated by tools/genboardscfg.py.  Every board is supposed to have
its own MAINTAINERS that contains maintainer and status information,
but, in fact, MAINTAINERS is missing from some boards.

For such boards, the first field, Status, is filled with '-'.
It causes a problem for "set" command, which ignores '-' in its
arguments.  Consequently, get_target_arch() returns a wrong field
and MAKEALL fails to get a correct toolchain.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

Changes in v3:
  - Fix commit description

Changes in v2:
  - Improve git description

 MAKEALL | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Comments

Tom Rini April 7, 2015, 5:59 p.m. UTC | #1
On Mon, Apr 06, 2015 at 11:12:28AM +0900, Masahiro Yamada wrote:

> Since the Kconfig conversion, boards.cfg scanned by MAKEALL is
> generated by tools/genboardscfg.py.  Every board is supposed to have
> its own MAINTAINERS that contains maintainer and status information,
> but, in fact, MAINTAINERS is missing from some boards.
> 
> For such boards, the first field, Status, is filled with '-'.
> It causes a problem for "set" command, which ignores '-' in its
> arguments.  Consequently, get_target_arch() returns a wrong field
> and MAKEALL fails to get a correct toolchain.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/MAKEALL b/MAKEALL
index cd3b6c7..3808a59 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -551,13 +551,7 @@  get_target_maintainers() {
 get_target_arch() {
 	local target=$1
 
-	# Automatic mode
-	local line=`awk '\$7 == "'"$target"'" { print \$0 }' boards.cfg`
-
-	if [ -z "${line}" ] ; then echo "" ; return ; fi
-
-	set ${line}
-	echo "$2"
+	awk '$7 == "'$target'" { print $2 }' boards.cfg
 }
 
 list_target() {