From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:58997) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilsNA-0007tF-0B for guix-patches@gnu.org; Mon, 30 Dec 2019 05:34:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ilsN8-0002OP-Jm for guix-patches@gnu.org; Mon, 30 Dec 2019 05:34:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:54538) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ilsN8-0002Ni-G4 for guix-patches@gnu.org; Mon, 30 Dec 2019 05:34:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ilsN8-00009n-D5 for guix-patches@gnu.org; Mon, 30 Dec 2019 05:34:02 -0500 Subject: [bug#38809] [PATCH] bootloader: grub: Add resolution override. Resent-Message-ID: Received: from eggs.gnu.org ([2001:470:142:3::10]:58866) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ilsMK-0007Vc-Hr for guix-patches@gnu.org; Mon, 30 Dec 2019 05:33:14 -0500 From: Jan Nieuwenhuizen Date: Mon, 30 Dec 2019 11:33:09 +0100 Message-ID: <87lfquhzmi.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 38809@debbugs.gnu.org --=-=-= Content-Type: text/plain Hi, With this patch I finally have a readable GRUB menu. I am not sure about the name and semantics of `resolution': Better to use `gfxmode', and/or use a list of strings '("1024x768x32" "auto"), ... WDYT? Greetings, janneke --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-bootloader-grub-Add-resolution-override.patch Content-Transfer-Encoding: quoted-printable >From dfceb5702b0de5787f79e1098b4787e9d3adbe4e Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Mon, 30 Dec 2019 11:25:40 +0100 Subject: [PATCH] bootloader: grub: Add resolution override. * gnu/bootloader/grub.scm (): Add `resolution' entry. (eye-candy): Use it. * doc/guix.texi (Bootloader Configuration): Document it. --- doc/guix.texi | 26 ++++++++++++++++++++++++-- gnu/bootloader/grub.scm | 11 +++++++---- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index efc59c1aaf..02cecae043 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -25923,9 +25923,20 @@ must @emph{not} be an OS device name such as @file= {/dev/sda1}. @end table @end deftp =20 +@cindex HDPI +@cindex resolution @c FIXME: Write documentation once it's stable. -For now only GRUB has theme support. GRUB themes are created using -the @code{grub-theme} form, which is not documented yet. +For now only GRUB has theme support. GRUB themes are created using +the @code{grub-theme} form, which is not fully documented yet. + +@deftp {Data Type} grub-theme +Data type representing the configuration of the GRUB theme. + +@table @asis +@item @code{resolution} (default: @code{"auto"}) +The @code{gfxmode} to set (@pxref{gfxmode,,, grub, GNU GRUB manual}). +@end table +@end deftp =20 @defvr {Scheme Variable} %default-theme This is the default GRUB theme used by the operating system if no @@ -25936,6 +25947,17 @@ It comes with a fancy background image displaying = the GNU and Guix logos. @end defvr =20 +For example, to override the default resolution, you may use something +like + +@lisp +(bootloader + (grub-configuration + ;; @dots{} + (theme (grub-theme + (inherit %default-theme) + (resolution "1024x786x32;auto"))))) +@end lisp =20 @node Invoking guix system @section Invoking @code{guix system} diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index fd62f627a0..70de3edeb5 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright =C2=A9 2016 Chris Marusich ;;; Copyright =C2=A9 2017 Leo Famulari ;;; Copyright =C2=A9 2017 Mathieu Othacehe +;;; Copyright =C2=A9 2019 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; @@ -88,7 +89,9 @@ denoting a file name." (color-normal grub-theme-color-normal (default '((fg . cyan) (bg . blue)))) (color-highlight grub-theme-color-highlight - (default '((fg . white) (bg . blue))))) + (default '((fg . white) (bg . blue)))) + (resolution grub-resolution + (default "auto"))) =20 (define %background-image (grub-image @@ -149,8 +152,8 @@ system string---e.g., \"x86_64-linux\"." ;; most other modern architectures have no other mode and therefore do= n't ;; need to be switched. (if (string-match "^(x86_64|i[3-6]86)-" system) - " - # Leave 'gfxmode' to 'auto'. + (string-append " + set gfxmode=3D" (grub-resolution (bootloader-configuration-theme config)= ) " insmod video_bochs insmod video_cirrus insmod gfxterm @@ -166,7 +169,7 @@ system string---e.g., \"x86_64-linux\"." insmod vbe insmod vga fi -" +") "")) =20 (define (setup-gfxterm config font-file) --=20 2.24.0 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com --=-=-=--