mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-27 14:51:15 +02:00
build/boot/roms: check all targets before building
If one of them doesn't exist, error out. Previously, a build would start but then it would error out later on. This implements the mentality: fail early, fail hard Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -57,15 +57,23 @@ handle_targets()
|
||||
[ "${first}" != "all" ] || boards="$(listitems config/coreboot)" || \
|
||||
err "handle_targets: Cannot get list of boards"
|
||||
|
||||
check_targets
|
||||
|
||||
for board in ${boards}; do
|
||||
[ -d "config/coreboot/${board}/" ] || \
|
||||
err "handle_targets: target not defined: ${board}"
|
||||
./build boot roms_helper ${board}${opts} || \
|
||||
err "handle_targets ${board}${opts}: build error"
|
||||
[ -d "bin/${board}" ] && targets="${board} ${targets}"
|
||||
done
|
||||
}
|
||||
|
||||
check_targets()
|
||||
{
|
||||
for board in ${boards}; do
|
||||
[ -d "config/coreboot/${board}/" ] || \
|
||||
err "check_targets: target not defined: ${board}"
|
||||
done
|
||||
}
|
||||
|
||||
confirm_targets()
|
||||
{
|
||||
[ -z "${targets}" ] && err "No ROM images were compiled."
|
||||
|
||||
Reference in New Issue
Block a user