Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nDOY4-0002OX-Gz for mharc-grub-devel@gnu.org; Fri, 28 Jan 2022 05:32:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45802) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDOY0-0002Ng-Rz for grub-devel@gnu.org; Fri, 28 Jan 2022 05:32:04 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:27253) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nDOXx-0000SZ-Kn for grub-devel@gnu.org; Fri, 28 Jan 2022 05:32:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1643365921; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2OL4z1WIyzRD9QUpKP3ub/NYgjkISp1jA30/+LPXJVs=; b=OY9/IXKwLdLzDHCJ2D91AYjAt9rojG+9HgvebKdcUP7lvoO7ASg9tK4zI1ZqfMntkbOXu2 8K2D/1rPD1HEMOc/TUPSYuu/Lz1g/j3Ya7BQg07h77scF1eE4xkKb+5Z+I8X/vKPyhhOLN BY/PfFnL7yzMB1ciMOyN8jja9GAx8D0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-465-hybw62B1O6CkGnt-L4mvSg-1; Fri, 28 Jan 2022 05:30:43 -0500 X-MC-Unique: hybw62B1O6CkGnt-L4mvSg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C9A688143E5 for ; Fri, 28 Jan 2022 10:30:42 +0000 (UTC) Received: from shalem.redhat.com (unknown [10.39.193.191]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3FED66E19; Fri, 28 Jan 2022 10:30:41 +0000 (UTC) From: Hans de Goede To: grub-devel@gnu.org Cc: Robbie Harwood , Hans de Goede Subject: [PATCH 2/2] EFI: suppress the "Welcome to GRUB!" message in EFI builds Date: Fri, 28 Jan 2022 11:30:33 +0100 Message-Id: <20220128103033.74343-3-hdegoede@redhat.com> In-Reply-To: <20220128103033.74343-1-hdegoede@redhat.com> References: <20220128103033.74343-1-hdegoede@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=hdegoede@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Received-SPF: pass client-ip=170.10.133.124; envelope-from=hdegoede@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -29 X-Spam_score: -3.0 X-Spam_bar: --- X-Spam_report: (-3.0 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.167, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2022 10:32:05 -0000 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) annd thus the message should not be printed. Signed-off-by: Hans de Goede --- grub-core/kern/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grub-core/kern/main.c b/grub-core/kern/main.c index 73967e2f5..e811dc3b1 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 (); -- 2.33.1