Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/27215
Change subject: util/abuild: Enable abuild to compile a single variant
......................................................................
util/abuild: Enable abuild to compile a single variant
There are many boards in coreboot which support multiple
variants. When abuild is used to compile a single target, it builds
all its variants. If a target has 5 variants, then abuild takes nearly
10x the time to compile all variants of the target. This change adds
an option -b/--board-variant to enable abuild to compile only a single
variant of the target.
TEST=Verified:
1. abuild builds all variants of the target if -b option is not
provided.
2. abuild builds a single variant if -b option is provided.
3. abuild prints appropriate error message if invalid variant name is
provided.
Change-Id: I3781568c6409c5ec2610a8386a21d86037428e7f
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
M util/abuild/abuild
1 file changed, 13 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/15/27215/1
diff --git a/util/abuild/abuild b/util/abuild/abuild
index cebb7b7..ae4f100 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -168,8 +168,11 @@
{
local targets
+ local VARIANT_UC=$(echo "${variant}" | tr '[:lower:]' '[:upper:]')
+
targets=$(get_mainboards "$1")
if [ -n "$targets" ]; then
+ targets=$(grep "${VARIANT_UC}$" <<< ${targets})
echo "$targets"
return
fi
@@ -537,6 +540,8 @@
Options:\n"
[-a|--all] Build previously succeeded ports as well
[-A|--any-toolchain] Use any toolchain
+ [-b|--board-variant <name>] Build specific board variant under the
+ given target.
[-B|--blobs] Allow using binary files
[--checksum <path/basefile>] Store checksums at path/basefile
[-c|--cpus <numcpus>] Build on <numcpus> at the same time
@@ -613,12 +618,12 @@
# shellcheck disable=SC2086
if [ "${getoptbrand:0:6}" == "getopt" ]; then
# Detected GNU getopt that supports long options.
- args=$(getopt -l version,verbose,quiet,help,all,target:,payloads:,cpus:,silent,junit,config,loglevel:,remove,prefix:,update,scan-build,ccache,blobs,clang,any-toolchain,clean,outdir:,chromeos,xmlfile:,kconfig:,dir:,root:,recursive,checksum:,timeless,exitcode -o Vvqhat:p:c:sJCl:rP:uyBLAzo:xX:K:d:R:Ie -- "$@") || exit 1
+ args=$(getopt -l version,verbose,quiet,help,all,target:,board-variant:,payloads:,cpus:,silent,junit,config,loglevel:,remove,prefix:,update,scan-build,ccache,blobs,clang,any-toolchain,clean,outdir:,chromeos,xmlfile:,kconfig:,dir:,root:,recursive,checksum:,timeless,exitcode -o Vvqhat:b:p:c:sJCl:rP:uyBLAzo:xX:K:d:R:Ie -- "$@") || exit 1
eval set -- $args
retval=$?
else
# Detected non-GNU getopt
- args=$(getopt Vvqhat:p:c:sJCl:rP:uyBLAzo:xX:K:d:R:Ie "$@")
+ args=$(getopt Vvqhat:b:p:c:sJCl:rP:uyBLAzo:xX:K:d:R:Ie "$@")
set -- $args
retval=$?
fi
@@ -639,6 +644,7 @@
case "$1" in
-J|--junit) shift; mode=junit; rm -f "$XMLFILE" ;;
-t|--target) shift; target="$1"; shift;;
+ -b|--board-variant) shift; variant="$1"; shift;;
-a|--all) shift; buildall=true;;
-d|--dir) shift; configdir="$1"; shift;;
-e|--exitcode) shift; exitcode=1;;
@@ -829,7 +835,11 @@
# build a single board
MAINBOARD=$(normalize_target "${target}")
if [ -z "${MAINBOARD}" ]; then
- printf "No such target: %s\n" "$target"
+ printf "No such target: %s" "${target}"
+ if [ -n "${variant}" ]; then
+ printf ", variant: %s" "${variant}"
+ fi
+ printf "\n"
exit 1
fi
build_srcdir="$(mainboard_directory "${MAINBOARD}")"
--
To view, visit https://review.coreboot.org/27215
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3781568c6409c5ec2610a8386a21d86037428e7f
Gerrit-Change-Number: 27215
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Nico Huber has posted comments on this change. ( https://review.coreboot.org/27212 )
Change subject: mb/*/*: Drop VGA_BIOS_FILE and VGA_BIOS_ID on some cases
......................................................................
Patch Set 1:
I just had a look at some models with soldered down CPU. They have
much better odds to hit the correct number (only the more rare Core-i3
CPUs differ, AFAICS). Same for the Ivy Bridge notebooks, if you assume
that nobody downgrades the CPU ;)
--
To view, visit https://review.coreboot.org/27212
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5b70974b47d04267770c8e91b7663450f0e2dbbb
Gerrit-Change-Number: 27212
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sat, 23 Jun 2018 18:31:27 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/27212 )
Change subject: mb/*/*: Drop VGA_BIOS_FILE and VGA_BIOS_ID on some cases
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://review.coreboot.org/27212
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5b70974b47d04267770c8e91b7663450f0e2dbbb
Gerrit-Change-Number: 27212
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sat, 23 Jun 2018 18:24:55 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: Yes
Nico Huber has posted comments on this change. ( https://review.coreboot.org/27212 )
Change subject: mb/*/*: Drop VGA_BIOS_FILE and VGA_BIOS_ID on some cases
......................................................................
Patch Set 1:
I inspired this work because of a simple calculation: If you override
the default per mainboard you might fix loading the OPROM in SeaBIOS
in 1 out of 6 cases, but break it for coreboot in 5 out of 6 (the
chipset default always works in coreboot because it has a compati-
bility list).
What do you think, folks?
--
To view, visit https://review.coreboot.org/27212
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5b70974b47d04267770c8e91b7663450f0e2dbbb
Gerrit-Change-Number: 27212
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Sat, 23 Jun 2018 18:16:45 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No