rom.sh: Support SeaUBoot for 64-bit x86 U-Boot

Same concept as SeaGRUB, but for U-Boot. SeaBIOS starts, but
has a bootorder file loading U-Boot first, from flash.

You can interrupt it with the ESC menu, to boot something else
in SeaBIOS, including GRUB.

With this, we can effectively provide extremely user-friendly
UEFI-first setups in Canoeboot.

Take that, edk2!

Signed-off-by: Leah Rowe <leah@libreboot.org>
master
Leah Rowe 2024-11-21 12:29:05 +00:00 committed by Leah Rowe
parent eea06c9659
commit dea09b8bf5
2 changed files with 10 additions and 4 deletions

View File

@ -0,0 +1 @@
/rom@img/u-boot

View File

@ -152,7 +152,9 @@ add_seabios()
[ "$payload_grub" = "y" ] && add_grub
cprom && [ "$payload_grub" = "y" ] && pname="seagrub" && mkseagrub; :
cprom
[ "$payload_uboot_amd64" = "y" ] && pname="seauboot" && cprom "seauboot"
[ "$payload_grub" = "y" ] && pname="seagrub" && mkseagrub; :
}
add_grub()
@ -208,11 +210,14 @@ add_uboot()
cprom()
{
newrom="bin/$target/${pname}_${target}_$initmode$displaymode.rom"
[ $# -gt 0 ] && newrom="${newrom%.rom}_${1%.gkb}.rom"
[ $# -gt 0 ] && [ "$1" != "seauboot" ] && \
newrom="${newrom%.rom}_${1%.gkb}.rom"
x_ mkdir -p "bin/$target"
x_ cp "$tmprom" "$newrom" && [ $# -gt 0 ] && \
cbfs "$newrom" "config/data/grub/keymap/$1" keymap.gkb raw; :
x_ cp "$tmprom" "$newrom" && [ $# -gt 0 ] && [ "$1" != "seauboot" ] && \
cbfs "$newrom" "config/data/grub/keymap/$1" keymap.gkb raw
[ $# -gt 0 ] && [ "$1" = "seauboot" ] && \
cbfs "$newrom" "config/data/grub/bootorder_uboot" "bootorder" raw; :
}
mkcoreboottar()