aboutsummaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2017-05-15 22:24:18 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2017-05-16 14:41:01 +0200
commitb09a8da4a2e50845a297e041762f3ff9e649c047 (patch)
tree41111b45d2af2ec06c0a7262f390bfd5e91639c1 /guix
parentce92d269fea0a2bfac0ac20414f77127d2f07500 (diff)
downloadgnu-guix-b09a8da4a2e50845a297e041762f3ff9e649c047.tar
gnu-guix-b09a8da4a2e50845a297e041762f3ff9e649c047.tar.gz
bootloader: Add extlinux support.
* gnu/bootloader.scm: New file. * gnu/bootloader/extlinux.scm: New file. * gnu/bootloader/grub.scm: New file. * gnu/local.mk: Build new files. * gnu/system.scm: Adapt to new bootloader api. * gnu/scripts/system.scm: Adapt to new bootloader api. * gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu bootloader grub) modules. * gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm. * gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader). * gnu/tests.scm: Ditto. * gnu/tests/nfs.scm: Ditto.
Diffstat (limited to 'guix')
-rw-r--r--guix/scripts/system.scm20
1 files changed, 12 insertions, 8 deletions
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 9c09767508..5fd0d7600c 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -38,10 +38,10 @@
#:use-module (guix build utils)
#:use-module (gnu build install)
#:use-module (gnu system)
+ #:use-module (gnu bootloader)
#:use-module (gnu system file-systems)
#:use-module (gnu system linux-container)
#:use-module (gnu system vm)
- #:use-module (gnu system grub)
#:use-module (gnu services)
#:use-module (gnu services shepherd)
#:use-module (gnu services herd)
@@ -598,8 +598,12 @@ output when building a system derivation, such as a disk image."
#:image-size image-size
#:full-boot? full-boot?
#:mappings mappings))
- (grub (package->derivation (grub-configuration-grub
- (operating-system-bootloader os))))
+ (bootloader (let ((bootloader (bootloader-package
+ (bootloader-configuration-bootloader
+ (operating-system-bootloader os)))))
+ (if bootloader
+ (package->derivation bootloader)
+ (return #f))))
(grub.cfg (if (eq? 'container action)
(return #f)
(operating-system-bootcfg os
@@ -611,8 +615,8 @@ output when building a system derivation, such as a disk image."
;; --no-grub is passed, because GRUB.CFG because we then use it as a GC
;; root. See <http://bugs.gnu.org/21068>.
(drvs -> (if (memq action '(init reconfigure))
- (if bootloader?
- (list sys grub.cfg grub)
+ (if (and bootloader? bootloader)
+ (list sys grub.cfg bootloader)
(list sys grub.cfg))
(list sys)))
(% (if derivations-only?
@@ -628,8 +632,8 @@ output when building a system derivation, such as a disk image."
drvs)
;; Make sure GRUB is accessible.
- (when bootloader?
- (let ((prefix (derivation->output-path grub)))
+ (when (and bootloader? bootloader)
+ (let ((prefix (derivation->output-path bootloader)))
(setenv "PATH"
(string-append prefix "/bin:" prefix "/sbin:"
(getenv "PATH")))))
@@ -832,7 +836,7 @@ resulting from command-line parsing."
((first second) second)
(_ #f)))
(device (and bootloader?
- (grub-configuration-device
+ (bootloader-configuration-device
(operating-system-bootloader os)))))
(with-store store