diff options
author | Leah Rowe <leah@libreboot.org> | 2024-06-14 16:34:05 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-06-14 16:34:05 +0100 |
commit | af8296ce6b9c9d2386e4dae2fc5d43350f5f2e26 (patch) | |
tree | 5caae11bb49cf0dec692fc43c2c484d5223ab311 /script | |
parent | d1c0c34642a892ec7e6b85066f19a4ec49d3624f (diff) |
roms: merge handle_coreboot_target into main()
rely on return status per each of the three main rom
functions, to then update the "targets" variable.
use this as the basis to determine which targets were
built, during final confirmation when the script exits.
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script')
-rwxr-xr-x | script/roms | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/script/roms b/script/roms index 17a91b7f..9315bec6 100755 --- a/script/roms +++ b/script/roms @@ -44,12 +44,13 @@ main() [ -n "$boards" ] || boards="$(ls -1 config/coreboot)" || \ $err "Cannot generate list of boards for building" for x in $boards; do - [ -d "config/coreboot/$x/config" ] && \ - handle_coreboot_target "$x" && targets="$targets, $x" + [ -d "config/coreboot/$x/config" ] && configure_target "$x" \ + && build_payloads && build_board && [ -d "bin/$board" ] \ + && targets="$targets, $x"; continue done [ -z "$targets" ] && $err "No ROM images were compiled" - printf "Check these ROM directories in bins/: %s\n" "${targets#, }" + printf "Check these ROM directories in bin/: %s\n" "${targets#, }" printf "DO NOT flash images from elf/ - please use bin/ instead.\n" } @@ -109,18 +110,12 @@ list_serprog_boards() basename -a -s .h "$1/"*.h || $err "$1: can't list boards" } -handle_coreboot_target() +configure_target() { eval "$(setvars "n" $pv) $(setvars "" $v)" grub_background="background1280x800.png" board="$1" - configure_target && build_payloads && build_target_mainboard && \ - [ ! -d "bin/$board" ] && return 0; return 1 -} - -configure_target() -{ targetdir="$cfgsdir/$board" [ -f "$targetdir/target.cfg" ] || $err "$board: target.cfg missing" @@ -201,7 +196,7 @@ build_uboot_payload() [ -f "$ubootelf" ] || $err "$board: Can't find u-boot"; return 0 } -build_target_mainboard() +build_board() { x_ rm -Rf "$romdir" |