mirror of
https://codeberg.org/hako/Rosenthal.git
synced 2026-03-04 17:04:21 +00:00
bootloader: limine: Delay bootloader installation.
* modules/rosenthal/bootloader/limine.scm (limine-configuration-file): Install bootloader after installing UKIs and generating the configuration file.
This commit is contained in:
parent
11d821da23
commit
088bc2bf51
@ -56,7 +56,7 @@
|
|||||||
(limine-directory (in-vicinity directory "EFI/BOOT"))
|
(limine-directory (in-vicinity directory "EFI/BOOT"))
|
||||||
(guix-directory (in-vicinity directory "EFI/Guix")))
|
(guix-directory (in-vicinity directory "EFI/Guix")))
|
||||||
(for-each mkdir-p (list limine-directory guix-directory))
|
(for-each mkdir-p (list limine-directory guix-directory))
|
||||||
(install-file #$limine limine-directory)
|
;; Install unified kernel images and generate Limine configuration.
|
||||||
(call-with-output-file (in-vicinity limine-directory "limine.conf.tmp")
|
(call-with-output-file (in-vicinity limine-directory "limine.conf.tmp")
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(let* ((ukify #$(file-append ukify "/bin/ukify"))
|
(let* ((ukify #$(file-append ukify "/bin/ukify"))
|
||||||
@ -78,6 +78,7 @@
|
|||||||
current-label)
|
current-label)
|
||||||
(unless (null? old-labels)
|
(unless (null? old-labels)
|
||||||
(format port "~%/GNU system, old configurations...~%"))
|
(format port "~%/GNU system, old configurations...~%"))
|
||||||
|
(false-if-exception
|
||||||
(let loop ((count 1)
|
(let loop ((count 1)
|
||||||
(labels old-labels)
|
(labels old-labels)
|
||||||
(args old-args))
|
(args old-args))
|
||||||
@ -86,7 +87,8 @@
|
|||||||
(with-exception-handler
|
(with-exception-handler
|
||||||
(lambda _
|
(lambda _
|
||||||
(false-if-exception (delete-file image-name))
|
(false-if-exception (delete-file image-name))
|
||||||
(exit))
|
;; Exit loop.
|
||||||
|
(loop 0 '() '()))
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(when (< (free-disk-space ".") minbytes)
|
(when (< (free-disk-space ".") minbytes)
|
||||||
(raise-exception 'insuffcient-disk-space))
|
(raise-exception 'insuffcient-disk-space))
|
||||||
@ -101,9 +103,11 @@
|
|||||||
count)))
|
count)))
|
||||||
(loop (1+ count)
|
(loop (1+ count)
|
||||||
(cdr labels)
|
(cdr labels)
|
||||||
(cdr args)))))))))
|
(cdr args))))))))
|
||||||
(rename-file (in-vicinity limine-directory "limine.conf.tmp")
|
(rename-file (in-vicinity limine-directory "limine.conf.tmp")
|
||||||
(in-vicinity limine-directory "limine.conf")))))))
|
(in-vicinity limine-directory "limine.conf"))
|
||||||
|
;; Finally, install Limine.
|
||||||
|
(install-file #$limine limine-directory))))))))
|
||||||
|
|
||||||
(define install-limine-efi
|
(define install-limine-efi
|
||||||
#~(lambda (bootloader target mount-point)
|
#~(lambda (bootloader target mount-point)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user