From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8CgOMwh+314HKQAA0tVLHw (envelope-from ) for ; Tue, 09 Jun 2020 12:18:16 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id AB7bLgh+314IbwAA1q6Kng (envelope-from ) for ; Tue, 09 Jun 2020 12:18:16 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1791C9404D5 for ; Tue, 9 Jun 2020 12:18:15 +0000 (UTC) Received: from localhost ([::1]:51348 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jidCn-0001KK-Gk for larch@yhetil.org; Tue, 09 Jun 2020 08:18:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jidCc-0001Jx-Nt for bug-guix@gnu.org; Tue, 09 Jun 2020 08:18:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:47653) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jidCc-0004Cz-E3 for bug-guix@gnu.org; Tue, 09 Jun 2020 08:18:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jidCc-000737-AD for bug-guix@gnu.org; Tue, 09 Jun 2020 08:18:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#41746: [PATCH] gnu: grub: Support graphical gfxterm on all systems. Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 09 Jun 2020 12:18:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41746 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: Mathieu Othacehe Received: via spool by 41746-submit@debbugs.gnu.org id=B41746.159170503227041 (code B ref 41746); Tue, 09 Jun 2020 12:18:02 +0000 Received: (at 41746) by debbugs.gnu.org; 9 Jun 2020 12:17:12 +0000 Received: from localhost ([127.0.0.1]:59199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jidBo-000725-3K for submit@debbugs.gnu.org; Tue, 09 Jun 2020 08:17:12 -0400 Received: from vsmx011.vodafonemail.xion.oxcs.net ([153.92.174.89]:20525) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jidBm-00071r-K1 for 41746@debbugs.gnu.org; Tue, 09 Jun 2020 08:17:11 -0400 Received: from vsmx003.vodafonemail.xion.oxcs.net (unknown [192.168.75.197]) by mta-5-out.mta.xion.oxcs.net (Postfix) with ESMTP id 4679B59D113; Tue, 9 Jun 2020 12:17:04 +0000 (UTC) Received: from macbook-pro.kuh-wiese.my-router.de (unknown [2.206.141.235]) by mta-7-out.mta.xion.oxcs.net (Postfix) with ESMTPA id DA0E6539A88; Tue, 9 Jun 2020 12:16:58 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Stefan In-Reply-To: <874krkppqq.fsf@gnu.org> Date: Tue, 9 Jun 2020 14:16:59 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <3769C832-C378-4C83-A9C2-A2DE19D97F13@vodafonemail.de> References: <62F29C87-CB4C-404B-AC39-562FBFB2350E@vodafonemail.de> <874krkppqq.fsf@gnu.org> X-Mailer: Apple Mail (2.3124) X-VADE-STATUS: LEGIT X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.7 (-) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 41746@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -0.51 X-TUID: xgSd8Wc6uMBQ * gnu/bootloaders/grub.scm (eye-candy): Use gfxterm depending only on (bootloader-configuration (terminal-outputs =E2=80=A6)), which defaults = to '(gfxterm). This makes the system argument obsolete. --- gnu/bootloader/grub.scm | 46 ++++++++++++----------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index d4dbb57131..e3b8416d6d 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -135,41 +135,25 @@ file with the resolution provided in CONFIG." (_ #f))))) =20 (define* (eye-candy config store-device store-mount-point - #:key store-directory-prefix system port) + #:key store-directory-prefix port) "Return a gexp that writes to PORT (a port-valued gexp) the = 'grub.cfg' part concerned with graphics mode, background images, colors, and all that. STORE-DEVICE designates the device holding the store, and = STORE-MOUNT-POINT is its mount point; these are used to determine where the background image = and -fonts must be searched for. SYSTEM must be the target system = string---e.g., -\"x86_64-linux\". STORE-DIRECTORY-PREFIX is a directory prefix to = prepend to -any store file name." - (define setup-gfxterm-body - (let ((gfxmode - (or (and-let* ((theme (bootloader-configuration-theme = config)) - (gfxmode (grub-theme-gfxmode theme))) - (string-join gfxmode ";")) - "auto"))) - - ;; Intel and EFI systems need to be switched into graphics mode, = whereas - ;; most other modern architectures have no other mode and = therefore - ;; don't need to be switched. - - ;; XXX: Do we really need to restrict to x86 systems? We could = imitate - ;; what the GRUB default configuration does and decide based on = whether - ;; a user provided 'gfxterm' in the terminal-outputs field of = their - ;; bootloader-configuration record. - (if (string-match "^(x86_64|i[3-6]86)-" system) - (format #f " - set gfxmode=3D~a - insmod all_video - insmod gfxterm~%" gfxmode) - ""))) - +fonts must be searched for. STORE-DIRECTORY-PREFIX is a directory = prefix to +prepend to any store file name." (define (setup-gfxterm config font-file) (if (memq 'gfxterm (bootloader-configuration-terminal-outputs = config)) - #~(format #f "if loadfont ~a; then - setup_gfxterm -fi~%" #+font-file) + #~(format #f " +if loadfont ~a; then + set gfxmode=3D~a + insmod all_video + insmod gfxterm +fi~%" + #$font-file + #$(string-join + (grub-theme-gfxmode (bootloader-theme config)) + ";")) "")) =20 (define (theme-colors type) @@ -190,8 +174,6 @@ fi~%" #+font-file) =20 (and image #~(format #$port " -function setup_gfxterm {~a} - # Set 'root' to the partition that contains /gnu/store. ~a =20 @@ -206,7 +188,6 @@ else set menu_color_normal=3Dcyan/blue set menu_color_highlight=3Dwhite/blue fi~%" - #$setup-gfxterm-body #$(grub-root-search store-device font-file) #$(setup-gfxterm config font-file) #$(grub-setup-io config) @@ -380,7 +361,6 @@ menuentry ~s { device mount-point #:store-directory-prefix store-directory-prefix - #:system system #:port #~port))) =20 (define keyboard-layout-config --=20 2.26.0