rom.sh: also add grub to seabios images

we want multiple seagrub images made, with different
keymaps, but we only want one non-seagrub image.

however, we also want grub in the non-seagrub image.
it just means that seabios is primarily what the user
wants, and they might occasionally use grub, whereas
the seagrub images are for people who primarily want
grub but may occasionally access the seabios menu.

right now, the seabios images really only contain seabios,
but there's no harm in adding grub to them.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe 2024-07-22 18:47:38 +01:00 committed by Leah Rowe
parent 6ddc02a7b7
commit 792efc659f

View file

@ -126,7 +126,9 @@ add_seabios()
[ "$payload_memtest" = "y" ] && cbfs "$tmprom" \
"elf/memtest86plus/memtest.bin" img/memtest
cprom && [ "$payload_grub" = "y" ] && pname="seagrub" && add_grub; :
[ "$payload_grub" = "y" ] && add_grub
cprom && [ "$payload_grub" = "y" ] && pname="seagrub" && mkseagrub; :
}
add_grub()
@ -135,6 +137,10 @@ add_grub()
printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" \
> "$TMPDIR/tmpcfg" || $err "$target: !insert scandisk"
cbfs "$tmprom" "$TMPDIR/tmpcfg" scan.cfg raw
}
mkseagrub()
{
cbfs "$tmprom" "$grubdata/bootorder" bootorder raw
for keymap in config/data/grub/keymap/*.gkb; do
[ -f "$keymap" ] || continue