|
|
b35c50 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
b35c50 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
|
b35c50 |
Date: Fri, 28 Jan 2022 11:30:33 +0100
|
|
|
b35c50 |
Subject: [PATCH] EFI: suppress the "Welcome to GRUB!" message in EFI builds
|
|
|
b35c50 |
|
|
|
b35c50 |
Grub EFI builds are now often used in combination with flicker-free
|
|
|
b35c50 |
boot, but this breaks with upstream grub because the "Welcome to GRUB!"
|
|
|
b35c50 |
message will kick the EFI fb into text mode and show the msg,
|
|
|
b35c50 |
breaking the flicker-free experience.
|
|
|
b35c50 |
|
|
|
b35c50 |
EFI systems are so fast, that when the menu or the countdown are enabled
|
|
|
b35c50 |
the message will be immediately overwritten, so in these cases not
|
|
|
b35c50 |
printing the message does not matter.
|
|
|
b35c50 |
|
|
|
b35c50 |
And in case when the timeout_style is set to TIMEOUT_STYLE_HIDDEN,
|
|
|
b35c50 |
the user has asked grub to be quiet (for example to allow flickfree
|
|
|
b35c50 |
boot) annd thus the message should not be printed.
|
|
|
b35c50 |
|
|
|
b35c50 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
|
b35c50 |
---
|
|
|
b35c50 |
grub-core/kern/main.c | 3 +++
|
|
|
b35c50 |
1 file changed, 3 insertions(+)
|
|
|
b35c50 |
|
|
|
b35c50 |
diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c
|
|
|
b35c50 |
index 3fc3401472..993b8a8598 100644
|
|
|
b35c50 |
--- a/grub-core/kern/main.c
|
|
|
b35c50 |
+++ b/grub-core/kern/main.c
|
|
|
b35c50 |
@@ -317,10 +317,13 @@ grub_main (void)
|
|
|
b35c50 |
|
|
|
b35c50 |
grub_boot_time ("After machine init.");
|
|
|
b35c50 |
|
|
|
b35c50 |
+ /* This breaks flicker-free boot on EFI systems, so disable it there. */
|
|
|
b35c50 |
+#ifndef GRUB_MACHINE_EFI
|
|
|
b35c50 |
/* Hello. */
|
|
|
b35c50 |
grub_setcolorstate (GRUB_TERM_COLOR_HIGHLIGHT);
|
|
|
b35c50 |
grub_printf ("Welcome to GRUB!\n\n");
|
|
|
b35c50 |
grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
|
|
|
b35c50 |
+#endif
|
|
|
b35c50 |
|
|
|
b35c50 |
/* Init verifiers API. */
|
|
|
b35c50 |
grub_verifiers_init ();
|