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>
This commit is contained in:
parent
06ab894867
commit
b57056a9fd
@ -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
|
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
|
fonts must be searched for. STORE-DIRECTORY-PREFIX is a directory prefix to
|
||||||
prepend to any store file name."
|
prepend to any store file name."
|
||||||
(define (setup-gfxterm config font-file)
|
(define (setup-gfxterm config)
|
||||||
(if (memq 'gfxterm (bootloader-configuration-terminal-outputs config))
|
(if (memq 'gfxterm (bootloader-configuration-terminal-outputs config))
|
||||||
#~(format #f "
|
#~(format #f "
|
||||||
if loadfont ~a; then
|
if loadfont unicode; then
|
||||||
set gfxmode=~a
|
set gfxmode=~a
|
||||||
insmod all_video
|
insmod all_video
|
||||||
insmod gfxterm
|
insmod gfxterm
|
||||||
fi~%"
|
fi~%"
|
||||||
#+font-file
|
|
||||||
#$(string-join
|
#$(string-join
|
||||||
(grub-theme-gfxmode (bootloader-theme config))
|
(grub-theme-gfxmode (bootloader-theme config))
|
||||||
";"))
|
";"))
|
||||||
@ -188,13 +187,6 @@ fi~%"
|
|||||||
(string-append (symbol->string (assoc-ref colors 'fg)) "/"
|
(string-append (symbol->string (assoc-ref colors 'fg)) "/"
|
||||||
(symbol->string (assoc-ref colors 'bg)))))
|
(symbol->string (assoc-ref colors 'bg)))))
|
||||||
|
|
||||||
(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
|
(define image
|
||||||
(normalize-file (grub-background-image config)
|
(normalize-file (grub-background-image config)
|
||||||
store-mount-point
|
store-mount-point
|
||||||
@ -216,8 +208,8 @@ else
|
|||||||
set menu_color_normal=cyan/blue
|
set menu_color_normal=cyan/blue
|
||||||
set menu_color_highlight=white/blue
|
set menu_color_highlight=white/blue
|
||||||
fi~%"
|
fi~%"
|
||||||
#$(grub-root-search store-device font-file)
|
#$(grub-root-search store-device image)
|
||||||
#$(setup-gfxterm config font-file)
|
#$(setup-gfxterm config)
|
||||||
#$(grub-setup-io config)
|
#$(grub-setup-io config)
|
||||||
|
|
||||||
#$image
|
#$image
|
||||||
@ -545,9 +537,13 @@ fi~%"))))
|
|||||||
(invoke/quiet grub "--no-floppy" "--target=i386-pc"
|
(invoke/quiet grub "--no-floppy" "--target=i386-pc"
|
||||||
"--boot-directory" install-dir
|
"--boot-directory" install-dir
|
||||||
device))
|
device))
|
||||||
;; When creating a disk-image, only install GRUB modules.
|
;; When creating a disk-image, only install a font and GRUB modules.
|
||||||
(copy-recursively (string-append bootloader "/lib/")
|
(let* ((fonts (string-append install-dir "/grub/fonts")))
|
||||||
install-dir)))))
|
(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))))))
|
||||||
|
|
||||||
(define install-grub-disk-image
|
(define install-grub-disk-image
|
||||||
#~(lambda (bootloader root-index image)
|
#~(lambda (bootloader root-index image)
|
||||||
|
Loading…
Reference in New Issue
Block a user