From: Masahiro Yamada Date: Thu, 17 Oct 2013 19:32:31 +0900 Subject: [U-Boot] [PATCH 3/3] MAKEALL: fix boards_by_field function In-Reply-To: <20131017114139.375e9a9c@lilith> References: <1381995462-32556-4-git-send-email-yamada.m@jp.panasonic.com> <20131017114139.375e9a9c@lilith> Message-ID: <20131017193230.7ED4.AA925319@jp.panasonic.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Albert > > -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') Yes, I answerd so in my previous reply. > 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. Yes. I think I already did this in my v1 patch. + -v cut="$3" \ + '{sub(cut,"",$field)} These lines split the pair into cpu and spl_cpu. I simply cut down spl_cpu because it is the same behaviour as before Commit 27af930e. > 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? Sorry, I cannot understand what you mean. Best Regards Masahiro Yamada