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