[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[WIP PATCH] linux-initrd: Allow own set of kernel modules.
From: |
Tomáš Čech |
Subject: |
[WIP PATCH] linux-initrd: Allow own set of kernel modules. |
Date: |
Thu, 28 Jul 2016 12:42:24 +0200 |
* gnu/system/linux-initrd.scm(base-initrd): Add `linux-modules'
parameter. Rename former `linux-modules' to
`default-linux-modules'. Introduce used-linux-modules to make the code
more readable.
---
gnu/system/linux-initrd.scm | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/gnu/system/linux-initrd.scm b/gnu/system/linux-initrd.scm
index bbaa5c0..4934c92 100644
--- a/gnu/system/linux-initrd.scm
+++ b/gnu/system/linux-initrd.scm
@@ -138,6 +138,7 @@ MODULES and taken from LINUX."
qemu-networking?
(virtio? #t)
volatile-root?
+ (linux-modules #f)
(extra-modules '()))
"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
@@ -174,7 +175,7 @@ loaded at boot time in the order in which they appear."
(lambda (fs)
(string=? (file-system-type fs) type)))
- (define linux-modules
+ (define default-linux-modules
;; Modules added to the initrd and loaded from the initrd.
`("ahci" ;for SATA controllers
"usb-storage" "uas" ;for the installation image etc.
@@ -220,8 +221,13 @@ loaded at boot time in the order in which they appear."
(open source target)))
mapped-devices))
+ (define used-linux-modules
+ (if (equal? linux-modules #f)
+ default-linux-modules
+ linux-modules))
+
(mlet %store-monad ((kodir (flat-linux-module-directory linux
- linux-modules)))
+ used-linux-modules)))
(expression->initrd
(with-imported-modules '((guix build bournish)
(guix build utils)
@@ -251,7 +257,7 @@ loaded at boot time in the order in which they appear."
(boot-system #:mounts '#$(map file-system->spec file-systems)
#:pre-mount (lambda ()
(and address@hidden))
- #:linux-modules '#$linux-modules
+ #:linux-modules '#$used-linux-modules
#:linux-module-directory '#$kodir
#:qemu-guest-networking? #$qemu-networking?
#:volatile-root? '#$volatile-root?)))
--
2.9.2