summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.m@jp.panasonic.com>2013-10-21 11:11:27 +0900
committerTom Rini <trini@ti.com>2013-11-08 09:38:24 -0500
commit8e5a2d4257ec040c7a82b4ea941b7c10e5c10b6d (patch)
tree239321341a15a4ff0fd80f1485adc00280ad4763
parent54d1f5048a1f69b6a62c4eaf2d232fcaa35e443c (diff)
downloadu-boot-imx-8e5a2d4257ec040c7a82b4ea941b7c10e5c10b6d.zip
u-boot-imx-8e5a2d4257ec040c7a82b4ea941b7c10e5c10b6d.tar.gz
u-boot-imx-8e5a2d4257ec040c7a82b4ea941b7c10e5c10b6d.tar.bz2
MAKEALL: fix boards_by_field function
Commit 27af930e changed the boards.cfg format and it changed boards_by_field() function incorrectly. For tegra cpus it returned Board Name field, not Target field. This commit restores the behavior prior to 27af930e in the right way. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
-rwxr-xr-xMAKEALL16
1 files changed, 7 insertions, 9 deletions
diff --git a/MAKEALL b/MAKEALL
index 230959c..5859361 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -226,17 +226,15 @@ RC=0
# Helper funcs for parsing boards.cfg
boards_by_field()
{
- FS="[ \t]+"
- [ -n "$3" ] && FS="$3"
- awk \
- -v field="$1" \
- -v select="$2" \
- -F "$FS" \
- '($1 !~ /^#/ && $field == select) { print $7 }' \
- boards.cfg
+ field=$1
+ regexp=$2
+
+ awk '($1 !~ /^#/ && $'"$field"' ~ /^'"$regexp"'$/) { print $7 }' \
+ boards.cfg
}
+
boards_by_arch() { boards_by_field 2 "$@" ; }
-boards_by_cpu() { boards_by_field 3 "$@" "[: \t]+" ; }
+boards_by_cpu() { boards_by_field 3 "$@" ; boards_by_field 3 "$@:.*" ; }
boards_by_soc() { boards_by_field 4 "$@" ; }
#########################################################################