summaryrefslogtreecommitdiff
path: root/gnu/system.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-02-27 11:42:09 +0100
committerLudovic Courtès <ludo@gnu.org>2018-03-02 13:53:10 +0100
commitbc499b113a598c0e7863da9887a4133472985713 (patch)
tree5783f2dec99c5b0cd18ef5805fbf07448f4c2143 /gnu/system.scm
parent615a89e3101b1a512008a3ca3239035674c7d098 (diff)
downloadpatches-bc499b113a598c0e7863da9887a4133472985713.tar
patches-bc499b113a598c0e7863da9887a4133472985713.tar.gz
system: Add 'initrd-modules' field.
* gnu/system.scm (<operating-system>)[initrd-modules]: New field. (operating-system-initrd-file): Pass #:linux-modules to 'make-initrd'. * gnu/system/linux-initrd.scm (default-initrd-modules): New procedure. (%base-initrd-modules): New macro. (base-initrd): Add #:linux-modules and honor it. * gnu/system/install.scm (embedded-installation-os): Use 'initrd-modules' instead of 'initrd'. * gnu/tests/install.scm (%raid-root-os): Likewise. * doc/guix.texi (operating-system Reference): Add 'initrd-modules'. (Initial RAM Disk): Document it. Adjust example to not use #:extra-modules.
Diffstat (limited to 'gnu/system.scm')
-rw-r--r--gnu/system.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/gnu/system.scm b/gnu/system.scm
index 71beee8259..1bcc1e1384 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -74,6 +74,7 @@
operating-system-kernel
operating-system-kernel-file
operating-system-kernel-arguments
+ operating-system-initrd-modules
operating-system-initrd
operating-system-users
operating-system-groups
@@ -154,6 +155,10 @@ booted from ROOT-DEVICE"
(initrd operating-system-initrd ; (list fs) -> M derivation
(default base-initrd))
+ (initrd-modules operating-system-initrd-modules ; list of strings
+ (thunked) ; it's system-dependent
+ (default %base-initrd-modules))
+
(firmware operating-system-firmware ; list of packages
(default %base-firmware))
@@ -846,6 +851,8 @@ hardware-related operations as necessary when booting a Linux container."
(mlet %store-monad ((initrd (make-initrd boot-file-systems
#:linux (operating-system-kernel os)
+ #:linux-modules
+ (operating-system-initrd-modules os)
#:mapped-devices mapped-devices)))
(return (file-append initrd "/initrd"))))