Bug 14367

Summary: Hardknott: grub immediately reboots
Product: [Build System, Metadata & Runtime] BSPs Reporter: Tony Battersby <tonyb>
Component: bsps-oe-coreAssignee: Anuj Mittal <anuj.mittal>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: High CC: kai.kang, randy.macleod, richard.purdie
Version: 3.3   
Target Milestone: 3.3.1   
Hardware: x86   
OS: x86_64   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Tony Battersby 2021-04-27 16:39:15 UTC
Environment: Hardknott on Ubuntu 20.04

After upgrading from Dunfell (YP 3.1) to Hardknott (YP 3.3), our firmware was unable to boot.  Our target hardware is x86-64 booting in legacy BIOS mode using grub on a variety of motherboards and CPUs.  The grub menu would never show up; instead it would reboot immediately, leading to an endless reboot loop.

I have two different workarounds.  Create a bbappend file for grub, and do one of the following two things:

1) Add the following line:

CFLAGS_remove = "-O2"

2) Or make a patch to revert the following commit, and add it to SRC_URI:

https://git.savannah.gnu.org/cgit/grub.git/commit/?id=4ea7bae51f97e49c84dc67ea30b466ca8633b9f6

NOTE: this commit fixes a CVE, so do not revert it without due consideration.

Here is my upstream bug report:

https://savannah.gnu.org/bugs/index.php?60458

Reproducibility: always
Comment 1 Randy MacLeod 2021-05-06 15:23:13 UTC
Friendly reminder Anuj.
Comment 2 Kai Kang 2021-05-10 01:07:33 UTC
I met the same failure, so I sent the patch to remove option '-O2' from CFLAGS to oe-core. And it has been merged. But I suppose it should be dropped when the failure fixed by upstream.