From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AJu4H8fA6V+FQgAA0tVLHw (envelope-from ) for ; Mon, 28 Dec 2020 11:25:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4DKBG8fA6V9mWwAAbx9fmQ (envelope-from ) for ; Mon, 28 Dec 2020 11:25:59 +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 0FB539401CD for ; Mon, 28 Dec 2020 11:25:59 +0000 (UTC) Received: from localhost ([::1]:37116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ktqez-0005Wx-R6 for larch@yhetil.org; Mon, 28 Dec 2020 06:25:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60834) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ktqe7-0005WZ-CO for guix-patches@gnu.org; Mon, 28 Dec 2020 06:25:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51054) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ktqe5-0000he-UU for guix-patches@gnu.org; Mon, 28 Dec 2020 06:25:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ktqe5-0007uE-L0 for guix-patches@gnu.org; Mon, 28 Dec 2020 06:25:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45225] [PATCH] gnu: grub: Use installed unicode font, fix loading when booting over TFTP. Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 28 Dec 2020 11:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45225 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= , Danny Milosavljevic , 45225@debbugs.gnu.org Received: via spool by 45225-submit@debbugs.gnu.org id=B45225.160915466530322 (code B ref 45225); Mon, 28 Dec 2020 11:25:01 +0000 Received: (at 45225) by debbugs.gnu.org; 28 Dec 2020 11:24:25 +0000 Received: from localhost ([127.0.0.1]:34367 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktqdV-0007t0-JC for submit@debbugs.gnu.org; Mon, 28 Dec 2020 06:24:25 -0500 Received: from smtpout2.vodafonemail.de ([145.253.239.133]:33782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ktqdT-0007sj-9P for 45225@debbugs.gnu.org; Mon, 28 Dec 2020 06:24:24 -0500 Received: from smtp.vodafone.de (unknown [10.2.0.34]) by smtpout2.vodafonemail.de (Postfix) with ESMTP id AAB2A1237AD; Mon, 28 Dec 2020 12:24:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-smtpout-mb-15sep; t=1609154657; bh=b8XuUwjIa7rYwt7YEJoVoH44z6itP2UUyEIGFhw4wy4=; h=Subject:From:In-Reply-To:Date:References:To; b=ZHkuCCaspGtgzSanpOgKqzYhbDbPCMD+JPQAnNnXvu/Ck6sailyWyXEsCmUcPLHOv ixtR5CO3bSNrCj0joUgTZVRacFFXCunyCUennwz/rK7L4+AQ6+VvySuPc9HwqBEI1G HHakDNWZ0Z5LwrjyZktskQf82LmbPR9fVutHB1Ks= Received: from macbook-pro.kuh-wiese.my-router.de (dslb-002-206-141-133.002.206.pools.vodafone-ip.de [2.206.141.133]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 6BC7614253B; Mon, 28 Dec 2020 11:24:17 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Stefan In-Reply-To: <877dpa2c6t.fsf@gnu.org> Date: Mon, 28 Dec 2020 12:24:16 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <5BC2CE26-5F2D-4250-A9E5-D04BB85DD942@vodafonemail.de> <87blen6wmy.fsf@gnu.org> <4043C397-47B2-4DA5-B873-86DABE169ED0@vodafonemail.de> <877dpa2c6t.fsf@gnu.org> X-Mailer: Apple Mail (2.3124) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 3275 X-purgate-ID: 155817::1609154657-00003440-77F264B8/0/0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.82 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=vodafonemail.de header.s=vfde-smtpout-mb-15sep header.b=ZHkuCCas; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 0FB539401CD X-Spam-Score: -0.82 X-Migadu-Scanner: scn1.migadu.com X-TUID: zpyAqZ0F/Jkz * gnu/bootloader/grub.scm (setup-gfxterm): Removed parameter font-file. Refer to the installed font, not into the store. (font-file): Removed obsolete function. (install-grub): When populating a disk-image, install the unicode font, = too. --- gnu/bootloader/grub.scm | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm index 29c81ae641..13ee695909 100644 --- a/gnu/bootloader/grub.scm +++ b/gnu/bootloader/grub.scm @@ -168,15 +168,14 @@ 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. STORE-DIRECTORY-PREFIX is a directory = prefix to prepend to any store file name." - (define (setup-gfxterm config font-file) + (define (setup-gfxterm config) (if (memq 'gfxterm (bootloader-configuration-terminal-outputs = config)) #~(format #f " -if loadfont ~a; then +if loadfont unicode; then set gfxmode=3D~a insmod all_video insmod gfxterm fi~%" - #+font-file #$(string-join (grub-theme-gfxmode (bootloader-theme config)) ";")) @@ -188,13 +187,6 @@ fi~%" (string-append (symbol->string (assoc-ref colors 'fg)) "/" (symbol->string (assoc-ref colors 'bg))))) =20 - (define font-file - (let* ((bootloader (bootloader-configuration-bootloader config)) - (grub (bootloader-package bootloader))) - (normalize-file (file-append grub "/share/grub/unicode.pf2") - store-mount-point - store-directory-prefix))) - (define image (normalize-file (grub-background-image config) store-mount-point @@ -216,8 +208,8 @@ else set menu_color_normal=3Dcyan/blue set menu_color_highlight=3Dwhite/blue fi~%" - #$(grub-root-search store-device font-file) - #$(setup-gfxterm config font-file) + #$(grub-root-search store-device image) + #$(setup-gfxterm config) #$(grub-setup-io config) =20 #$image @@ -545,9 +537,13 @@ fi~%")))) (invoke/quiet grub "--no-floppy" "--target=3Di386-pc" "--boot-directory" install-dir device)) - ;; When creating a disk-image, only install GRUB modules. - (copy-recursively (string-append bootloader "/lib/") - install-dir))))) + ;; When creating a disk-image, only install a font and GRUB = modules. + (let* ((fonts (string-append install-dir "/grub/fonts"))) + (mkdir-p fonts) + (copy-file (string-append bootloader = "/share/grub/unicode.pf2") + (string-append fonts "/unicode.pf2")) + (copy-recursively (string-append bootloader "/lib/") + install-dir)))))) =20 (define install-grub-disk-image #~(lambda (bootloader root-index image) --=20 2.29.2