summaryrefslogtreecommitdiff
path: root/gnu/bootloader
diff options
context:
space:
mode:
authorStefan <stefan-guix@vodafonemail.de>2020-12-28 12:24:16 +0100
committerDanny Milosavljevic <dannym@scratchpost.org>2021-01-17 15:47:59 +0100
commitb57056a9fd83c61efb5343853948a798da6e975e (patch)
tree7457147d8329e9f6b1d701b6d7f69c10aeb87f6f /gnu/bootloader
parent06ab89486715a0817aa355186b16958a93626dcc (diff)
gnu: grub: Use installed unicode font.
* gnu/bootloader/grub.scm (setup-gfxterm): Remove parameter font-file. Refer to the installed font in /boot, not in the store. (font-file): Delete obsolete function. (install-grub): When populating a disk-image, install the unicode font, too. Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
Diffstat (limited to 'gnu/bootloader')
-rw-r--r--gnu/bootloader/grub.scm26
1 files changed, 11 insertions, 15 deletions
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index 29c81ae641e..13ee695909e 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
168its mount point; these are used to determine where the background image and 168its mount point; these are used to determine where the background image and
169fonts must be searched for. STORE-DIRECTORY-PREFIX is a directory prefix to 169fonts must be searched for. STORE-DIRECTORY-PREFIX is a directory prefix to
170prepend to any store file name." 170prepend to any store file name."
171 (define (setup-gfxterm config font-file) 171 (define (setup-gfxterm config)
172 (if (memq 'gfxterm (bootloader-configuration-terminal-outputs config)) 172 (if (memq 'gfxterm (bootloader-configuration-terminal-outputs config))
173 #~(format #f " 173 #~(format #f "
174if loadfont ~a; then 174if loadfont unicode; then
175 set gfxmode=~a 175 set gfxmode=~a
176 insmod all_video 176 insmod all_video
177 insmod gfxterm 177 insmod gfxterm
178fi~%" 178fi~%"
179 #+font-file
180 #$(string-join 179 #$(string-join
181 (grub-theme-gfxmode (bootloader-theme config)) 180 (grub-theme-gfxmode (bootloader-theme config))
182 ";")) 181 ";"))
@@ -188,13 +187,6 @@ fi~%"
188 (string-append (symbol->string (assoc-ref colors 'fg)) "/" 187 (string-append (symbol->string (assoc-ref colors 'fg)) "/"
189 (symbol->string (assoc-ref colors 'bg))))) 188 (symbol->string (assoc-ref colors 'bg)))))
190 189
191 (define font-file
192 (let* ((bootloader (bootloader-configuration-bootloader config))
193 (grub (bootloader-package bootloader)))
194 (normalize-file (file-append grub "/share/grub/unicode.pf2")
195 store-mount-point
196 store-directory-prefix)))
197
198 (define image 190 (define image
199 (normalize-file (grub-background-image config) 191 (normalize-file (grub-background-image config)
200 store-mount-point 192 store-mount-point
@@ -216,8 +208,8 @@ else
216 set menu_color_normal=cyan/blue 208 set menu_color_normal=cyan/blue
217 set menu_color_highlight=white/blue 209 set menu_color_highlight=white/blue
218fi~%" 210fi~%"
219 #$(grub-root-search store-device font-file) 211 #$(grub-root-search store-device image)
220 #$(setup-gfxterm config font-file) 212 #$(setup-gfxterm config)
221 #$(grub-setup-io config) 213 #$(grub-setup-io config)
222 214
223 #$image 215 #$image
@@ -545,9 +537,13 @@ fi~%"))))
545 (invoke/quiet grub "--no-floppy" "--target=i386-pc" 537 (invoke/quiet grub "--no-floppy" "--target=i386-pc"
546 "--boot-directory" install-dir 538 "--boot-directory" install-dir
547 device)) 539 device))
548 ;; When creating a disk-image, only install GRUB modules. 540 ;; When creating a disk-image, only install a font and GRUB modules.
549 (copy-recursively (string-append bootloader "/lib/") 541 (let* ((fonts (string-append install-dir "/grub/fonts")))
550 install-dir))))) 542 (mkdir-p fonts)
543 (copy-file (string-append bootloader "/share/grub/unicode.pf2")
544 (string-append fonts "/unicode.pf2"))
545 (copy-recursively (string-append bootloader "/lib/")
546 install-dir))))))
551 547
552(define install-grub-disk-image 548(define install-grub-disk-image
553 #~(lambda (bootloader root-index image) 549 #~(lambda (bootloader root-index image)