Skip to contentSkip to conversation

MAKEALL: fix get_target_arch() to adjust to '-' in Status field

PATCH New Masahiro Yamada 2 participants 2 messages Apr 6, 2015 – Apr 7, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 MAKEALL: fix get_target_arch() to adjust to '-' in Status field

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.

---

Changes in v3:
- Fix commit description

Changes in v2:
- Improve git description

 MAKEALL | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
MAKEALL +1 -7
index cd3b6c7..3808a59 100755
@@ -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() {
Signature · 1 line
1.9.1
#1 lore raw

PATCH v3 1/1 MAKEALL: fix get_target_arch() to adjust to '-' in Status field

Quoted 11 lines · Masahiro Yamada

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20150407/9f1a5ca9/attachment.sig>