[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/03: system: Take kernel modules from the user-specified kernel.
From: |
Ludovic Courtès |
Subject: |
01/03: system: Take kernel modules from the user-specified kernel. |
Date: |
Sun, 05 Apr 2015 21:15:26 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 0d275f4aa3d1457658fa754e6a0c07fbcc4b88af
Author: Andy Wingo <address@hidden>
Date: Sun Apr 5 22:47:16 2015 +0200
system: Take kernel modules from the user-specified kernel.
* gnu/system/linux-initrd.scm (base-initrd): Add #:linux option to
specify the linux kernel to use.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Propagate
#:linux to base-initrd.
* gnu/system.scm (operating-system-initrd-file): Pass #:linux to
'make-initrd'.
Co-authored-by: Ludovic Courtès <address@hidden>
---
gnu/system.scm | 1 +
gnu/system/linux-initrd.scm | 13 +++++++------
gnu/system/vm.scm | 1 +
3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/gnu/system.scm b/gnu/system.scm
index 0d510b6..ece61ad 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -737,6 +737,7 @@ we're running in the final root."
(operating-system-initrd os))
(mlet %store-monad ((initrd (make-initrd boot-file-systems
+ #:linux (operating-system-kernel os)
#:mapped-devices mapped-devices)))
(return #~(string-append #$initrd "/initrd"))))
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index 9feb8f7..0e5334c 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -143,16 +143,17 @@ initrd code."
(define* (base-initrd file-systems
#:key
+ (linux linux-libre)
(mapped-devices '())
qemu-networking?
virtio?
volatile-root?
(extra-modules '()))
- "Return a monadic derivation that builds a generic initrd. FILE-SYSTEMS is
-a list of file-systems to be mounted by the initrd, possibly in addition to
-the root file system specified on the kernel command line via '--root'.
-MAPPED-DEVICES is a list of device mappings to realize before FILE-SYSTEMS are
-mounted.
+ "Return a monadic derivation that builds a generic initrd, with kernel
+modules taken from LINUX. FILE-SYSTEMS is a list of file-systems to be
+mounted by the initrd, possibly in addition to the root file system specified
+on the kernel command line via '--root'. MAPPED-DEVICES is a list of device
+mappings to realize before FILE-SYSTEMS are mounted.
When QEMU-NETWORKING? is true, set up networking with the standard QEMU
parameters. When VIRTIO? is true, load additional modules so the initrd can
@@ -224,7 +225,7 @@ loaded at boot time in the order in which they appear."
(open source target)))
mapped-devices))
- (mlet %store-monad ((kodir (flat-linux-module-directory linux-libre
+ (mlet %store-monad ((kodir (flat-linux-module-directory linux
linux-modules)))
(expression->initrd
#~(begin
diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm
index c93e26d..e194ed6 100644
--- a/gnu/system/vm.scm
+++ b/gnu/system/vm.scm
@@ -149,6 +149,7 @@ made available under the /xchg CIFS share."
(initrd (if initrd ; use the default initrd?
(return initrd)
(base-initrd %linux-vm-file-systems
+ #:linux linux
#:virtio? #t
#:qemu-networking? #t))))