Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12279
-gerrit
commit 1a172f4f5a3eb95fccffb1ede44bfc8a2ef809d6
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Sat Oct 31 01:35:20 2015 +0100
cbfstool: avoid naming variables "index"
Those may collide with strings.h's index(), included transitively
through system headers.
Change-Id: I6b03236844509ea85cfcdc0a37acf1df97d4c5f3
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
util/cbfstool/elfheaders.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/util/cbfstool/elfheaders.c b/util/cbfstool/elfheaders.c
index 45e96fd..dbce121 100644
--- a/util/cbfstool/elfheaders.c
+++ b/util/cbfstool/elfheaders.c
@@ -1287,7 +1287,7 @@ int elf_writer_add_symbol(struct elf_writer *ew, const char *name,
Elf64_Addr value, Elf64_Word size,
int binding, int type)
{
- int index;
+ int i;
Elf64_Sym sym = {
.st_value = value,
.st_size = size,
@@ -1299,15 +1299,15 @@ int elf_writer_add_symbol(struct elf_writer *ew, const char *name,
return -1;
}
- index = elf_writer_add_string(ew, name);
- if (index < 0)
+ i = elf_writer_add_string(ew, name);
+ if (i < 0)
return -1;
- sym.st_name = index;
+ sym.st_name = i;
- index = elf_writer_section_index(ew, section_name);
- if (index < 0)
+ i = elf_writer_section_index(ew, section_name);
+ if (i < 0)
return -1;
- sym.st_shndx = index;
+ sym.st_shndx = i;
ew->symtab.syms[ew->symtab.num_entries++] = sym;
@@ -1316,16 +1316,16 @@ int elf_writer_add_symbol(struct elf_writer *ew, const char *name,
static int elf_sym_index(struct elf_writer *ew, const char *sym)
{
- int index;
+ int j;
size_t i;
Elf64_Word st_name;
/* Determine index of symbol in the string table. */
- index = elf_writer_add_string(ew, sym);
- if (index < 0)
+ j = elf_writer_add_string(ew, sym);
+ if (j < 0)
return -1;
- st_name = index;
+ st_name = j;
for (i = 0; i < ew->symtab.num_entries; i++)
if (ew->symtab.syms[i].st_name == st_name)
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12278
-gerrit
commit 5ff121fae307e3e380c35b550db303fc8fe8b688
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Sat Oct 31 00:42:50 2015 +0100
abuild: allow users to specify multiple boards
Specifying a directory with multiple boards (eg abuild -t google/veyron)
makes abuild run through all of them.
Change-Id: Ifb60f3a1f0c4a727dc43c48671ea90711ffe5585
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
util/abuild/abuild | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 8a2520d..1157c81 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -541,25 +541,25 @@ if [ "$cpus" != "1" ]; then
if [ "$cpus" = "max" ]; then
cpus=32
fi
- if [ "$target" = "" ]; then
- # Test if xargs supports the non-standard -P flag
- # FIXME: disabled until we managed to eliminate all the make(1) quirks
- echo | xargs -P ${cpus:-0} -n 1 echo 2>/dev/null >/dev/null && USE_XARGS=1
- fi
+ # Test if xargs supports the non-standard -P flag
+ # FIXME: disabled until we managed to eliminate all the make(1) quirks
+ echo | xargs -P ${cpus:-0} -n 1 echo 2>/dev/null >/dev/null && USE_XARGS=1
fi
if [ "$USE_XARGS" = "0" ]; then
test "$MAKEFLAGS" == "" && test "$cpus" != "" && export MAKEFLAGS="-j $cpus"
-build_all_targets()
+build_targets()
{
- for MAINBOARD in $( get_mainboards ); do
- build_target $MAINBOARD
+ local targets=${*-$(get_mainboards)}
+ for MAINBOARD in $targets; do
+ build_target ${MAINBOARD}
remove_target ${MAINBOARD}
done
}
else
-build_all_targets()
+build_targets()
{
+ local targets=${*-$(get_mainboards)}
# seed shared utils
TMPCFG=`mktemp`
printf "$configoptions" > $TMPCFG
@@ -603,7 +603,7 @@ build_all_targets()
rmdir ${scanbuild_out}tmp
fi
rm -rf $TARGET/temp $TMPCFG
- get_mainboards | xargs -P ${cpus:-0} -n 1 $0 $cmdline -t
+ echo $targets | xargs -P ${cpus:-0} -n 1 $0 $cmdline -t
}
fi
@@ -622,7 +622,9 @@ if [ "$target" != "" ]; then
exit 1
fi
build_srcdir=$(mainboard_directory ${MAINBOARD})
- if [ ! -r $ROOT/src/mainboard/${build_srcdir} ]; then
+ if [ "$(echo ${MAINBOARD} | wc -w)" -gt 1 ]; then
+ build_targets ${MAINBOARD}
+ elif [ ! -r $ROOT/src/mainboard/${build_srcdir} ]; then
printf "No such target: ${MAINBOARD}\n"
exit 1
else
@@ -634,7 +636,7 @@ if [ "$target" != "" ]; then
XMLFILE=$REAL_XMLFILE
fi
else
- build_all_targets
+ build_targets
rm -f $REAL_XMLFILE
XMLFILE=$REAL_XMLFILE
junit '<?xml version="1.0" encoding="utf-8"?>'