Bug 14367 - Hardknott: grub immediately reboots
Summary: Hardknott: grub immediately reboots
Status: RESOLVED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-oe-core (show other bugs)
Version: 3.3
Hardware: x86 x86_64
: High normal
Target Milestone: 3.3.1
Assignee: Anuj Mittal
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2021-04-27 16:39 UTC by Tony Battersby
Modified: 2021-05-20 15:16 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.