linux-initrd: Allow extra modules to be passed to 'base-initrd'.

* gnu/system/linux-initrd.scm (base-initrd): Add #:extra-modules
  parameter.
This commit is contained in:
Ludovic Courtès 2014-07-13 23:43:00 +02:00
parent 3485716fd9
commit fa16f84502

View file

@ -206,6 +206,7 @@ (define* (base-initrd file-systems
qemu-networking? qemu-networking?
virtio? virtio?
volatile-root? volatile-root?
(extra-modules '())
guile-modules-in-chroot?) guile-modules-in-chroot?)
"Return a monadic derivation that builds a generic initrd. FILE-SYSTEMS is "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 a list of file-systems to be mounted by the initrd, possibly in addition to
@ -218,6 +219,11 @@ (define* (base-initrd file-systems
When VOLATILE-ROOT? is true, the root file system is writable but any changes When VOLATILE-ROOT? is true, the root file system is writable but any changes
to it are lost. to it are lost.
The initrd is automatically populated with all the kernel modules necessary
for FILE-SYSTEMS and for the given options. However, additional kernel
modules can be listed in EXTRA-MODULES. They will be added to the initrd, and
loaded at boot time in the order in which they appear.
When GUILE-MODULES-IN-CHROOT? is true, make core Guile modules available in When GUILE-MODULES-IN-CHROOT? is true, make core Guile modules available in
the new root. This is necessary is the file specified as '--load' needs the new root. This is necessary is the file specified as '--load' needs
access to these modules (which is the case if it wants to even just print an access to these modules (which is the case if it wants to even just print an
@ -252,7 +258,8 @@ (define linux-modules
'()) '())
,@(if volatile-root? ,@(if volatile-root?
'("fuse.ko") '("fuse.ko")
'()))) '())
,@extra-modules))
(define helper-packages (define helper-packages
;; Packages to be copied on the initrd. ;; Packages to be copied on the initrd.