image: Add bootloader installation support.

* gnu/build/image.scm (initialize-root-partition): Add bootloader-package and
bootloader-installer arguments. Run the bootloader-installer if defined.
* gnu/system/image.scm (system-disk-image): Adapt the partition initializer
call accordingly.
This commit is contained in:
Mathieu Othacehe 2020-05-23 19:09:53 +02:00
parent 7202895e5a
commit 9c1adb2400
No known key found for this signature in database
GPG key ID: 8354763531769CA6
2 changed files with 8 additions and 1 deletions

View file

@ -155,6 +155,8 @@ (define* (initialize-root-partition root
#:key #:key
bootcfg bootcfg
bootcfg-location bootcfg-location
bootloader-package
bootloader-installer
(deduplicate? #t) (deduplicate? #t)
references-graphs references-graphs
(register-closures? #t) (register-closures? #t)
@ -178,6 +180,9 @@ (define* (initialize-root-partition root
#:deduplicate? deduplicate?)) #:deduplicate? deduplicate?))
references-graphs)) references-graphs))
(when bootloader-installer
(display "installing bootloader...\n")
(bootloader-installer bootloader-package #f root))
(when bootcfg (when bootcfg
(install-boot-config bootcfg bootcfg-location root))) (install-boot-config bootcfg bootcfg-location root)))

View file

@ -235,7 +235,9 @@ (define (partition-image partition)
#:deduplicate? #f #:deduplicate? #f
#:system-directory #$os #:system-directory #$os
#:bootloader-package #:bootloader-package
#$(bootloader-package bootloader) #+(bootloader-package bootloader)
#:bootloader-installer
#+(bootloader-installer bootloader)
#:bootcfg #$bootcfg #:bootcfg #$bootcfg
#:bootcfg-location #:bootcfg-location
#$(bootloader-configuration-file bootloader))))) #$(bootloader-configuration-file bootloader)))))