From: Hans de Goede Date: Fri, 28 Jan 2022 10:30:33 +0000 (+0100) Subject: kern/main: Suppress the "Welcome to GRUB!" message in EFI builds X-Git-Tag: grub-2.12-rc1~425 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e4cbbeca0ef35097301a1086f85fd0d119e64aa;p=thirdparty%2Fgrub.git kern/main: Suppress the "Welcome to GRUB!" message in EFI builds GRUB EFI builds are now often used in combination with flicker-free boot, but this breaks with upstream GRUB because the "Welcome to GRUB!" message will kick the EFI fb into text mode and show the msg, breaking the flicker-free experience. EFI systems are so fast, that when the menu or the countdown are enabled the message will be immediately overwritten, so in these cases not printing the message does not matter. And in case when the timeout_style is set to TIMEOUT_STYLE_HIDDEN, the user has asked GRUB to be quiet (for example to allow flickfree boot) and thus the message should not be printed. Signed-off-by: Hans de Goede Reviewed-by: Robbie Harwood Reviewed-by: Daniel Kiper --- diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c index 60e33b84f..731c07c29 100644 --- a/grub-core/kern/main.c +++ b/grub-core/kern/main.c @@ -270,10 +270,13 @@ grub_main (void) grub_boot_time ("After machine init."); + /* This breaks flicker-free boot on EFI systems, so disable it there. */ +#ifndef GRUB_MACHINE_EFI /* Hello. */ grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT); grub_printf ("Welcome to GRUB!\n\n"); grub_setcolorstate (GRUB_TERM_COLOR_STANDARD); +#endif /* Init verifiers API. */ grub_verifiers_init ();