[U-Boot] [PATCH 3/3] MAKEALL: fix boards_by_field function
Albert ARIBAUD
albert.u.boot at aribaud.net
Thu Oct 17 11:41:39 CEST 2013
Hi Masahiro,
On Thu, 17 Oct 2013 16:37:42 +0900, Masahiro Yamada
<yamada.m at jp.panasonic.com> wrote:
> 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 <yamada.m at jp.panasonic.com>
> Cc: Albert ARIBAUD <albert.u.boot at 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.
(As per our discussion, 'tab' here should be 'colon')
Not sure I am getting the logic here. Colon is *not* a field separator,
precisely because it is not present on all lines; it is a sub-field
separator. At this low level, the only field separator should be spaces.
Therefore, I would prefer boards_by_field() and board_by_cpu() to *not*
handle colons and thus consider the CPU field as a whole even when it
consists in a cpu:splcpu pair.
Splitting that pair and using either cpu or splcpu depending on
whether building SPL or not should only happen when the CPU field is
actually used, not fetched.
Can you try and provide a v2 patch (set) along these lines?
Amicalement,
--
Albert.
More information about the U-Boot
mailing list