summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-11-21 12:29:05 +0000
committerLeah Rowe <leah@libreboot.org>2024-11-21 12:29:05 +0000
commit7d1fd1cc6a176d15d8a938cd0df9868cbbb86d8f (patch)
tree4f879ac25d148fb0890d21b7769fa7700f04606e
parent02e66ae01ae7bb9ae0dbab2903a2080f575151e1 (diff)
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 Libreboot. Take that, edk2! Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--config/data/grub/bootorder_uboot1
-rw-r--r--config/ifd/dell9020mt/gbebin8192 -> 8192 bytes
-rw-r--r--include/rom.sh11
3 files changed, 9 insertions, 3 deletions
diff --git a/config/data/grub/bootorder_uboot b/config/data/grub/bootorder_uboot
new file mode 100644
index 00000000..80641a36
--- /dev/null
+++ b/config/data/grub/bootorder_uboot
@@ -0,0 +1 @@
+/rom@img/u-boot
diff --git a/config/ifd/dell9020mt/gbe b/config/ifd/dell9020mt/gbe
index aed6737d..88aa36c4 100644
--- a/config/ifd/dell9020mt/gbe
+++ b/config/ifd/dell9020mt/gbe
Binary files differ
diff --git a/include/rom.sh b/include/rom.sh
index 96c7081a..c2896b85 100644
--- a/include/rom.sh
+++ b/include/rom.sh
@@ -154,7 +154,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()
@@ -210,11 +212,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 ] && \
+ 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
[ "$XBMK_RELEASE" = "y" ] || return 0
$dry mksha512sum "$newrom" "vendorhashes"; $dry ./vendor inject \