summaryrefslogtreecommitdiff
path: root/script/build/roms
diff options
context:
space:
mode:
Diffstat (limited to 'script/build/roms')
-rwxr-xr-xscript/build/roms66
1 files changed, 60 insertions, 6 deletions
diff --git a/script/build/roms b/script/build/roms
index 5fdc05c9..2269e714 100755
--- a/script/build/roms
+++ b/script/build/roms
@@ -21,9 +21,10 @@ cfgsdir="config/coreboot"
pv="payload_grub payload_grub_withseabios payload_seabios payload_memtest t"
pv="${pv} payload_seabios_withgrub payload_seabios_grubonly payload_uboot memtest_bin"
v="romdir cbrom initmode displaymode cbcfg targetdir tree keymaps release"
-v="${v} grub_timeout ubdir board grub_scan_disk uboot_config"
+v="${v} grub_timeout ubdir board grub_scan_disk uboot_config status"
eval "$(setvars "n" ${pv})"
-eval "$(setvars "" ${v} boards _displaymode _payload _keyboard all targets)"
+eval "$(setvars "" ${v} boards _displaymode _payload _keyboard all targets \
+ skipped)"
main()
{
@@ -55,20 +56,31 @@ main()
eval "$(setvars "n" ${pv}) $(setvars "" ${v})"
grub_background="background1280x800.png"
board="${x}"
+
configure_target
+ [ "$board" = "$tree" ] && \
+ return 1
+
+ handle_status
# exclude certain targets from the release
- if [ "$release" = "n" ] && [ "$lbmk_release" = "y" ]; then
- printf "Skipping target: %s\n" "$x"
- continue
- fi
+ skip_board && \
+ printf "Skip target %s(%s)\n" "$board" "$status" && \
+ skipped="* $board($status)\n$skipped" && continue
build_payloads
build_target_mainboard
+
[ -d "bin/${board}" ] || continue
targets="* bin/${board}\n${targets}"
done
+ if [ -n "$skipped" ]; then
+ printf "\nThese targets were skipped:\n"
+ eval "printf \"${skipped}\""
+ printf "^^ These targets were skipped.\n\n"
+ fi
+
[ -z "${targets}" ] && $err "No ROM images were compiled"
printf "\nROM images available in these directories:\n"
eval "printf \"${targets}\""
@@ -125,6 +137,48 @@ configure_target()
eval "payload_${_payload}=y"
}
+handle_status()
+{
+ [ "$status" = "stable" ] || [ "$status" = "unstable" ] || \
+ [ "$status" = "broken" ] || [ "$status" = "untested" ] || \
+ status="unknown"
+
+ printf "Handling target: %s (status=%s)\n" "$board" "$status"
+
+ [ "$status" = "broken" ] && release="n"
+ [ "$status" = "unknown" ] && release="n"
+ [ "$status" = "untested" ] && release="n"
+
+ [ "$status" != "stable" ] && [ "$status" != "$release_type" ] && \
+ printf "WARNING: %s not marked stable (status=%s):\n\n" \
+ "$board" "$status"; return 0
+}
+
+skip_board()
+{
+ [ "$release" = "n" ] && [ "$lbmk_release" = "y" ] && \
+ return 0
+ [ -n "$release_type" ] && [ "$status" = "$release_type" ] && \
+ return 1
+
+ if [ "$lbmk_release" != "y" ] && [ "$status" != "stable" ] && \
+ [ "$status" != "$release_type" ]; then
+ if [ -f "$targetdir/warn.txt" ]; then
+ printf "Regarding board '%s' (status '%s'):\n" \
+ "$board" "$status"
+ cat -u "$targetdir/warn.txt" || \
+ $err "!cat $targetdir/warn.txt"
+ fi
+ while true; do
+ printf "Board %s has status '%s'. Skip? [y/n]" \
+ "$board" "$status"
+ read -r skip
+ [ "$skip" = "y" ] && return 0
+ [ "$skip" = "n" ] && return 1; continue
+ done
+ fi; return 1
+}
+
build_payloads()
{
romdir="bin/${board}"