diff options
author | Leah Rowe <leah@libreboot.org> | 2024-07-22 18:47:38 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2024-07-22 18:47:38 +0100 |
commit | 40dd0a7cf35fe75e3e2ac14eecec256d918f33bc (patch) | |
tree | 3f8a86e839018060a65ec88d67d5dc8203fc0f90 | |
parent | d070eb1fefca339b6fea0f262fcb889a16d2b27d (diff) |
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>
-rw-r--r-- | include/rom.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/rom.sh b/include/rom.sh index 58c49bb5..21d7e3d9 100644 --- a/include/rom.sh +++ b/include/rom.sh @@ -128,7 +128,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() @@ -137,6 +139,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 |