summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-04-28 20:21:35 +0100
committerLeah Rowe <leah@libreboot.org>2024-04-28 20:21:35 +0100
commit230f68fd8f9c4178051635f52df9ccf9700cd30d (patch)
treea36f4babec2f76723aab8b1ecc19fa7cdfbadca3
parent515185a7f5f4ec75392c33737ddb9160fa28070e (diff)
build/roms: simplified seagrub handling
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--config/grub/bootorder1
-rwxr-xr-xscript/build/roms36
2 files changed, 7 insertions, 30 deletions
diff --git a/config/grub/bootorder b/config/grub/bootorder
new file mode 100644
index 00000000..b33e1295
--- /dev/null
+++ b/config/grub/bootorder
@@ -0,0 +1 @@
+/rom@img/grub2
diff --git a/script/build/roms b/script/build/roms
index 853bbea6..1c427b69 100755
--- a/script/build/roms
+++ b/script/build/roms
@@ -399,8 +399,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 +433,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") || \