Skip to contentSkip to conversation

Fix grub fails to boot failure

PATCH New kai 1 participant 2 messages May 8, 2021

lore
Share & tools
lore

kai

author
#0 lore raw

cover Fix grub fails to boot failure

From: Kai Kang <[email protected]>

Hi Tony,

I met the same failure with you. I tried with removing '-O2' and it works for me. So I send it out.

Kai Kang (1):
grub2.inc: remove '-O2' from CFLAGS

 meta/recipes-bsp/grub/grub2.inc | 2 ++
 1 file changed, 2 insertions(+)
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 1/1 grub2.inc: remove '-O2' from CFLAGS

From: Kai Kang <[email protected]>

It fails to boot grub after upgrade grub to 2.06. According to description in

https://bugzilla.yoctoproject.org/show_bug.cgi?id=14367

it is introduced by a commit to fix CVE. So remove option '-O2' from CFLAGS rather than revert the commit to avoid the failure.

[YOCTO #14367]

CC Tony Battersby <[email protected]>
---
 meta/recipes-bsp/grub/grub2.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-bsp/grub/grub2.inc +2 -0
index 590deb8d92..6de683ee1c 100644
@@ -49,6 +49,8 @@ GRUBPLATFORM ??= "pc"
 
 inherit autotools gettext texinfo pkgconfig
 
+CFLAGS_remove = "-O2"
+
 EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} \
                 --disable-grub-mkfont \
                 --program-prefix="" \
Signature · 1 line
2.17.1