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.

Signed-off-by: Masahiro Yamada <yamad...@jp.panasonic.com>
Cc: Albert ARIBAUD <albert.u.b...@aribaud.net>
---

Commit 27af930e adjusted this part like follows:


                    -v field="$1" \
                    -v select="$2" \
                    -F "$FS" \
    -               '($1 !~ /^#/ && $field == select) { print $1 }' \
    +               '($1 !~ /^#/ && $field == select) { print $7 }' \
                    boards.cfg
     }
     boards_by_arch() { boards_by_field 2 "$@" ; }
     boards_by_cpu()  { boards_by_field 3 "$@" "[: \t]+" ; }
    -boards_by_soc()  { boards_by_field 6 "$@" ; }
    +boards_by_soc()  { boards_by_field 4 "$@" ; }


TAB is also treated as a field speparator, so
we should have taken the 8th field for Tegra
whereas the 7th field for the other cpus.

Fortunately, Board Name field and Target filed are the same
for all Tegra LSIs.
But we should not expect it.



 MAKEALL | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/MAKEALL b/MAKEALL
index 4f685e1..485721e 100755
--- a/MAKEALL
+++ b/MAKEALL
@@ -226,17 +226,17 @@ 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 }' \
+               -v cut="$3" \
+               '{sub(cut,"",$field)}
+               ($1 !~ /^#/ && $field == select) { 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_soc()  { boards_by_field 4 "$@" ; }
 
 #########################################################################
-- 
1.8.1.2

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to