summaryrefslogtreecommitdiff
path: root/script/build/roms
diff options
context:
space:
mode:
Diffstat (limited to 'script/build/roms')
-rwxr-xr-xscript/build/roms117
1 files changed, 34 insertions, 83 deletions
diff --git a/script/build/roms b/script/build/roms
index 853bbea6..1ed64004 100755
--- a/script/build/roms
+++ b/script/build/roms
@@ -33,10 +33,6 @@ main()
while [ $# -gt 0 ]; do
if [ "$listboards" = "y" ]; then
- [ "$1" = "stable" ] || [ "$1" = "unstable" ] || \
- [ "$1" = "broken" ] || [ "$1" = "untested" ] || \
- [ "$1" = "unknown" ] || \
- $err "invalid list type '$1'"
list_type="$list_type $1"
list_type="${list_type# }"
shift 1; continue
@@ -62,9 +58,6 @@ main()
shift 2
done
- [ "$listboards" = "y" ] && [ -z "$list_type" ] && \
- list_type="stable unstable broken untested unknown"
-
[ "${all}" != "y" ] || boards=$(items config/coreboot) || \
$err "Cannot generate list of boards for building"
@@ -72,19 +65,18 @@ main()
eval "$(setvars "n" ${pv}) $(setvars "" ${v})"
grub_background="background1280x800.png"
board="${x}"
+ status="unknown"
configure_target
[ "$board" = "$tree" ] && \
continue
- handle_status
-
if [ "$listboards" = "y" ]; then
+ [ -z "$list_type" ] && printf "%s\n" "$board"
for _list_type in $list_type; do
[ "$status" != "$_list_type" ] && continue
printf "%s\n" "$board"
- done
- continue
+ done; continue
fi
# exclude certain targets from the release
@@ -163,50 +155,33 @@ configure_target()
eval "payload_${_payload}=y"
}
-handle_status()
-{
- [ "$status" = "stable" ] || [ "$status" = "unstable" ] || \
- [ "$status" = "broken" ] || [ "$status" = "untested" ] || \
- status="unknown"
-
- [ "$listboards" != "y" ] && \
- printf "Handling target: %s (status=%s)\n" "$board" "$status"
-
- [ "$status" = "broken" ] && release="n"
- [ "$status" = "unknown" ] && release="n"
- [ "$status" = "untested" ] && release="n"
-
- [ "$listboards" != "y" ] && \
- [ "$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" ] && [ "$lbmk_status" = "y" ]; 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
- printf "\nTo disable this dialog when building, do:\n"
- printf "export LBMK_STATUS=n\n\n"
- 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
+ [ "$listboards" != "y" ] && [ "$status" != "stable" ] && \
+ printf "WARNING: %s not stable (status=%s):\n\n" \
+ "$board" "$status"
+
+ if [ -f "$targetdir/warn.txt" ] && [ "$listboards" != "y" ]; then
+ printf "Regarding board '%s' (status '%s'):\n" \
+ "$board" "$status"
+ cat -u "$targetdir/warn.txt" || \
+ $err "!cat $targetdir/warn.txt"
+ fi
+
+ [ "$lbmk_release" = "y" ] && [ "$release" = "n" ] && return 0
+ [ "$lbmk_release" = "y" ] && [ "$status" != "broken" ] && return 1
+ [ "$lbmk_status" = "y" ] || return 1
+ [ "$status" = "stable" ] && return 1
+
+ printf "\nTo disable this dialog when building, do:\n"
+ printf "export LBMK_STATUS=n\n\n"
+ 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
}
build_payloads()
@@ -399,8 +374,12 @@ build_grub_roms()
newrom="${newrom}${initmode}_${keymap}.rom"
x_ moverom "${tmpgrubrom}" "${newrom}"
if [ "${payload_seabios_grubonly}" = "y" ]; then
- mkSeagrubRom "${tmpgrubrom}" "${newrom}"
- mkSeabiosGrubonlyRom "${tmpgrubrom}" "${newrom}"
+ x_ "$cbfstool" "$tmpgrubrom" add \
+ -f "config/grub/bootorder" -n bootorder -t raw
+ x_ moverom "$tmpgrubrom" "${newrom%.rom}_grubfirst.rom"
+ x_ "$cbfstool" "$tmpgrubrom" add-int -i 0 \
+ -n etc/show-boot-menu
+ x_ moverom "$tmpgrubrom" "${newrom%.rom}_grubonly.rom"
fi
x_ rm -f "${tmpgrubrom}"
done
@@ -429,34 +408,6 @@ mkSeabiosRom() {
printf "%s\n" "${tmprom}"
}
-# SeaGRUB configuration
-mkSeagrubRom()
-{
- _grubrom="${1}"
- _newrom="${2}"
-
- tmpbootorder=$(mktemp -t coreboot_rom.XXXXXXXXXX)
-
- # only load grub, by inserting a custom bootorder file
- printf "/rom@img/grub2\n" > "$tmpbootorder" || $err "printf bootorder"
- x_ "${cbfstool}" "${_grubrom}" \
- add -f "${tmpbootorder}" -n bootorder -t raw
- x_ rm -f "${tmpbootorder}"
-
- x_ moverom "${_grubrom}" "${_newrom%.rom}_grubfirst.rom"
-}
-
-# SeaGRUB, and disable the SeaBIOS menu (grub only)
-mkSeabiosGrubonlyRom()
-{
- _grubrom="${1}"
- _newrom="${2}"
-
- x_ "${cbfstool}" "${_grubrom}" add-int -i 0 -n etc/show-boot-menu
-
- x_ moverom "${_grubrom}" "${_newrom%.rom}_grubonly.rom"
-}
-
build_uboot_roms()
{
tmprom=$(mkUbootRom "${cbrom}" "fallback/payload") || \