summaryrefslogtreecommitdiff
path: root/script/build/boot
diff options
context:
space:
mode:
Diffstat (limited to 'script/build/boot')
-rwxr-xr-xscript/build/boot/roms26
1 files changed, 18 insertions, 8 deletions
diff --git a/script/build/boot/roms b/script/build/boot/roms
index e31c68e6..72bd2f3d 100755
--- a/script/build/boot/roms
+++ b/script/build/boot/roms
@@ -45,22 +45,23 @@ main()
shift
done
+ handle_targets
+ display_targets
+}
+
+handle_targets()
+{
[ -z ${opts+x} ] && opts=""
printf "Building %s ROM images\n" "${projectname}"
[ "${first}" != "all" ] || boards="$(listitems config/coreboot)" || \
- err "Cannot get list of boards"
+ err "handle_targets: Cannot get list of boards"
for board in ${boards}; do
- buildrom "${board}" || err "build/roms: error"
+ buildrom "${board}" || err "handle_targets: build error"
[ -d "bin/${board}" ] && targets="${board} ${targets}"
done
-
- [ -z "${targets}" ] && err "No ROM images were compiled."
- printf "\n\nYour ROM images are available in these directories:\n"
- for x in ${targets}; do
- printf "* bin/%s\n" "${x}"
- done
+ confirm_targets
}
# Build ROM images for supported boards
@@ -70,6 +71,15 @@ buildrom() {
./build boot roms_helper ${1}${opts} || return 1
}
+confirm_targets()
+{
+ [ -z "${targets}" ] && err "No ROM images were compiled."
+ printf "\n\nYour ROM images are available in these directories:\n"
+ for x in ${targets}; do
+ printf "* bin/%s\n" "${x}"
+ done
+}
+
usage()
{
cat <<- EOF