coreboot: only run GRUB as a secondary payload

See:
https://codeberg.org/libreboot/lbmk/issues/216

Almost all users will be OK running GRUB, but a
minority of users have experienced a fatal error
pertaining to grub_free() or grub_realloc() (as
my investigation of GRUB sources reveal when grepping
the error reported in the link above).

We don't yet know what the bug is, only that the
error occurs, leading to an effective brick if the
user has GRUB as their primary payload.

So far, it has only been reported on some Intel
SandyBridge-based Dell Latitudes in Libreboot, but
we can't be too sure.

The user reported that memtest86+ passes just fine,
and SeaBIOS works; BIOS GRUB also works, which means
that the bug is likely only in an area of GRUB that
runs specifically on the coreboot payload, so it's
probably a driver in GRUB when running on the metal
rather than BIOS/UEFI.

The build system supports a configuration whereby
SeaBIOS is the primary payload, but GRUB is available
in the SeaBIOS boot select menu, and an additional
configuration is available where GRUB is what SeaBIOS
executes first (while still providing boot select);
both of these are now the *only* configurations
available, on all x86 targets except QEMU.

The QEMU target is fine because if the bug occurs there,
you can just close QEMU and try a different image.

Even after this bug is later identified and fixed,
the GRUB source code is vastly over-engineered and there
are likely many more such bugs. SeaBIOS is a reliable
payload; the code is small and robust. Remember always:

Code

equals

bugs

Therefore, this configuration change is likely going
to be permanent. This will apply in the next release.

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2-merge1
Leah Rowe 2024-05-27 14:24:26 +01:00 committed by Leah Rowe
parent b75490f8fc
commit fca9b19e18
35 changed files with 40 additions and 74 deletions

View File

@ -1,7 +1,5 @@
tree="default"
xarch="i386-elf"
payload_grub="n"
payload_grub_withseabios="n"
payload_seabios="y"
payload_memtest="y"
release="n"

View File

@ -1,7 +1,4 @@
tree="default"
xarch="i386-elf"
payload_grub="n"
payload_grub_withseabios="n"
payload_seabios="y"
payload_memtest="n"
release="n"

View File

@ -1,7 +1,5 @@
tree="default"
xarch="i386-elf"
payload_grub="n"
payload_grub_withseabios="n"
payload_seabios="y"
payload_memtest="n"
payload_seabios_withgrub="y"
release="n"

View File

@ -1,9 +1,6 @@
tree="dell"
xarch="i386-elf"
payload_grub="n"
payload_grub_withseabios="n"
payload_seabios="y"
payload_memtest="y"
payload_seabios_withgrub="y"
payload_seabios_grubonly="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,8 @@
tree="fam15h_rdimm"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"
xlang="c"
grub_timeout=10

View File

@ -1,7 +1,7 @@
tree="fam15h_rdimm"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"
xlang="c"

View File

@ -1,8 +1,9 @@
tree="fam15h_udimm"
xtree="fam15h_rdimm"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"
xlang="c"
grub_timout=10

View File

@ -1,8 +1,9 @@
tree="fam15h_udimm"
xtree="fam15h_rdimm"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"
xlang="c"
grub_timeout=10

View File

@ -1,6 +1,5 @@
tree="i945"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
grub_scan_disk="ahci"

View File

@ -1,6 +1,5 @@
tree="i945"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="i945"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="i945"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="i945"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
grub_scan_disk="ahci"
grub_background="background1024x768.png"

View File

@ -1,7 +1,6 @@
tree="i945"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
grub_scan_disk="ahci"
grub_background="background1024x768.png"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,7 +1,6 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"

View File

@ -1,8 +1,7 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"
release="n"

View File

@ -1,8 +1,7 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"
release="n"

View File

@ -1,8 +1,7 @@
tree="default"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
payload_memtest="y"
grub_scan_disk="ahci"
release="n"

View File

@ -1,7 +1,6 @@
tree="i945"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
grub_scan_disk="ahci"
grub_background="background1024x768.png"

View File

@ -1,7 +1,6 @@
tree="i945"
xarch="i386-elf"
payload_grub="y"
payload_grub_withseabios="y"
payload_seabios="y"
payload_seabios_withgrub="y"
grub_scan_disk="ahci"
grub_background="background1024x768.png"