From ec761c88f213171a50daa187c9e884e39cfdad8f Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Mon, 27 May 2024 14:24:26 +0100 Subject: 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 --- config/coreboot/t500_4mb/target.cfg | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'config/coreboot/t500_4mb') diff --git a/config/coreboot/t500_4mb/target.cfg b/config/coreboot/t500_4mb/target.cfg index 8688df3f..341e655e 100644 --- a/config/coreboot/t500_4mb/target.cfg +++ b/config/coreboot/t500_4mb/target.cfg @@ -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" -- cgit v1.2.1