From 40dd0a7cf35fe75e3e2ac14eecec256d918f33bc Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 22 Jul 2024 18:47:38 +0100 Subject: 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 --- include/rom.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include') 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 -- cgit v1.2.1