abuild: allow specifying multiple targets by mainboard descriptor
abuild -t EMULATION_QEMU_UCB_RISCV,EMULATION_SPIKE_UCB_RISCV works now Change-Id: I49d8cd86e21ede724d8daa441b728efa1f6ea1fa Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: http://review.coreboot.org/12281 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
parent
5ab5a39d2e
commit
f6dc544318
|
@ -118,7 +118,7 @@ function get_mainboards
|
||||||
{
|
{
|
||||||
local search_space=${1-*/*}
|
local search_space=${1-*/*}
|
||||||
grep -h "^[[:space:]]*config\>[[:space:]]*\<BOARD_" \
|
grep -h "^[[:space:]]*config\>[[:space:]]*\<BOARD_" \
|
||||||
${ROOT}/src/mainboard/${search_space}/Kconfig.name | \
|
${ROOT}/src/mainboard/${search_space}/Kconfig.name 2>/dev/null | \
|
||||||
sed "s,^.*\<BOARD_\([A-Z0-9_]*\)\>.*$,\1,"
|
sed "s,^.*\<BOARD_\([A-Z0-9_]*\)\>.*$,\1,"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,11 +154,21 @@ function mainboard_vendor
|
||||||
# If a directory contains multiple boards, returns them all.
|
# If a directory contains multiple boards, returns them all.
|
||||||
function normalize_target
|
function normalize_target
|
||||||
{
|
{
|
||||||
if [ -r ${ROOT}/src/mainboard/$1/Kconfig.name ]; then
|
local targets=$(get_mainboards $1)
|
||||||
get_mainboards $1
|
if [ -n "$targets" ]; then
|
||||||
elif [ -n "$(mainboard_directory $1)" ]; then
|
echo $targets
|
||||||
echo $1
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local targets=$(echo $1 | tr ',' ' ')
|
||||||
|
for i in $targets; do
|
||||||
|
if [ -n "$(mainboard_directory $i)" ]; then
|
||||||
|
echo $i
|
||||||
|
else
|
||||||
|
echo "$i is not a valid target" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_config
|
function create_config
|
||||||
|
|
Loading…
Reference in New Issue