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 QBunB4za3F44aAAA0tVLHw (envelope-from ) for ; Sun, 07 Jun 2020 12:16:12 +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 uN+bA4za3F6DUgAA1q6Kng (envelope-from ) for ; Sun, 07 Jun 2020 12:16:12 +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 6EF6B94051C for ; Sun, 7 Jun 2020 12:16:11 +0000 (UTC) Received: from localhost ([::1]:60768 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jhuDh-00044d-M8 for larch@yhetil.org; Sun, 07 Jun 2020 08:16:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48132) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhuDa-00042H-Ai for bug-guix@gnu.org; Sun, 07 Jun 2020 08:16:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41900) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jhuDa-0007Op-0t for bug-guix@gnu.org; Sun, 07 Jun 2020 08:16:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jhuDZ-00025s-TM for bug-guix@gnu.org; Sun, 07 Jun 2020 08:16:01 -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: Sun, 07 Jun 2020 12:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41746 X-GNU-PR-Package: guix X-GNU-PR-Keywords: patch To: 41746@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15915321177985 (code B ref -1); Sun, 07 Jun 2020 12:16:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jun 2020 12:15:17 +0000 Received: from localhost ([127.0.0.1]:53446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhuCq-00024j-Pz for submit@debbugs.gnu.org; Sun, 07 Jun 2020 08:15:17 -0400 Received: from lists.gnu.org ([209.51.188.17]:33952) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jhuCo-00024Z-JJ for submit@debbugs.gnu.org; Sun, 07 Jun 2020 08:15:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhuCm-0003VR-Mj for bug-guix@gnu.org; Sun, 07 Jun 2020 08:15:13 -0400 Received: from mx009.vodafonemail.xion.oxcs.net ([153.92.174.39]:41546) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jhuCk-000714-Kh for bug-guix@gnu.org; Sun, 07 Jun 2020 08:15:11 -0400 Received: from vsmx002.vodafonemail.xion.oxcs.net (unknown [192.168.75.192]) by mta-6-out.mta.xion.oxcs.net (Postfix) with ESMTP id C2F206057CB; Sun, 7 Jun 2020 12:15:04 +0000 (UTC) Received: from macbook-pro.kuh-wiese.my-router.de (unknown [145.254.41.70]) by mta-6-out.mta.xion.oxcs.net (Postfix) with ESMTPA id 60391605950; Sun, 7 Jun 2020 12:15:00 +0000 (UTC) From: Stefan Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 7 Jun 2020 14:14:59 +0200 Message-Id: <62F29C87-CB4C-404B-AC39-562FBFB2350E@vodafonemail.de> Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-VADE-STATUS: LEGIT Received-SPF: pass client-ip=153.92.174.39; envelope-from=stefan-guix@vodafonemail.de; helo=mx009.vodafonemail.xion.oxcs.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/06/07 08:15:05 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -2.3 (--) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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: wjLpX9aaGAV/ * 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 2d9a39afc3..544847b9cd 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) @@ -358,7 +339,6 @@ when booting a root file system on a Btrfs = subvolume." (menu-entry-device (first all-entries)) (menu-entry-device-mount-point (first all-entries)) #:store-directory-prefix store-directory-prefix - #:system system #:port #~port)) =20 (define keyboard-layout-config --=20 2.26.0