unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Brian Cully via Guix-patches via <guix-patches@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: 55231@debbugs.gnu.org
Subject: [bug#55231] [PATCH v1] initrd: Allow extra search paths with ‘initrd-extra-module-paths’
Date: Mon, 02 May 2022 18:53:31 -0400	[thread overview]
Message-ID: <87sfprpmt3.fsf@ditto.jhoto.spork.org> (raw)
In-Reply-To: <c87a1c647289c0f0fb60773e2fd50916861b4d8b.camel@telenet.be>


Maxime Devos <maximedevos@telenet.be> writes:

> This needs some information in the manual -- when does the field 
> need
> to be set?  For what kernel modules?  Is this required by 
> v4l2loopback-
> linux-module and librem-ec-acpi-linux-module?  Things like that.
> As-is, this functionality is hard to discover.

I knew I missed something. How’s this look?

---
 doc/guix.texi | 42 ++++++++++++++++++++++++++++++++++--------
 1 file changed, 34 insertions(+), 8 deletions(-)

diff --git a/doc/guix.texi b/doc/guix.texi
index 5399584cb0..1ee2c1b4a3 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15173,6 +15173,16 @@ Window System.
 The list of Linux kernel modules that need to be available in the
 initial RAM disk.  @xref{Initial RAM Disk}.
 
+@item @code{initrd-extra-module-paths} (default: @code{'()})
+@cindex initrd
+@cindex initial RAM disk
+A list of paths outside of the Linux kernel tree to search for 
Linux
+kernel modules.
+
+The items in this may be either file-like objects (usually 
packages), or
+a list where the first element is a package and the second is an
+output--e.g. @code{(list (list zfs "module"))}.
+
 @item @code{initrd} (default: @code{base-initrd})
 A procedure that returns an initial RAM disk for the Linux
 kernel.  This field is provided to support low-level 
 customization and
@@ -35516,6 +35526,19 @@ file system, you would write:
   (initrd-modules (cons "megaraid_sas" %base-initrd-modules)))
 @end lisp
 
+If a module listed in @code{initrd-modules} is not included in 
the
+Linux-libre kernel, then the location to it must be added to the
+@code{initrd-extra-module-paths} list.  For example, if your root 
file
+system exists on a ZFS pool, then your configuration might look 
like the
+following:
+
+@lisp
+(operating-system
+  ;; @dots{}
+  (initrd-modules (cons "zfs" %base-initrd-modules))
+  (initrd-extra-module-paths (list (list zfs "module"))))
+@end lisp
+
 @defvr {Scheme Variable} %base-initrd-modules
 This is the list of kernel modules included in the initrd by 
 default.
 @end defvr
@@ -35629,13 +35652,15 @@ here is how to use it and customize it 
further.
 @cindex initrd
 @cindex initial RAM disk
 @deffn {Scheme Procedure} raw-initrd @var{file-systems} @
-       [#:linux-modules '()] [#:mapped-devices '()] @
-       [#:keyboard-layout #f] @
+       [#:linux-modules '()] [#:linux-extra-module-paths '()] @
+       [#:mapped-devices '()] [#:keyboard-layout #f] @
        [#:helper-packages '()] [#:qemu-networking? #f] 
        [#:volatile-root? #f]
 Return a derivation that builds a raw initrd.  @var{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 
 @option{root}.
 @var{linux-modules} is a list of kernel modules to be loaded at 
 boot time.
+@var{linux-extra-module-paths} is a list of file-like objects to 
be searched
+for kernel modules.
 @var{mapped-devices} is a list of device mappings to realize 
 before
 @var{file-systems} are mounted (@pxref{Mapped Devices}).
 @var{helper-packages} is a list of packages to be copied in the 
 initrd.
@@ -35660,12 +35685,13 @@ to it are lost.
 @deffn {Scheme Procedure} base-initrd @var{file-systems} @
        [#:mapped-devices '()] [#:keyboard-layout #f] @
        [#:qemu-networking? #f] [#:volatile-root? #f] @
-       [#:linux-modules '()]
-Return as a file-like object a generic initrd, with kernel
-modules taken from @var{linux}.  @var{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 @option{root}. 
 @var{mapped-devices} is a list of device
-mappings to realize before @var{file-systems} are mounted.
+       [#:linux-modules '()] [#:linux-extra-module-paths '()]
+Return as a file-like object a generic initrd, with kernel 
modules taken
+from @var{linux} and @var{linux-extra-module-paths}. 
@var{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 @option{root}.  @var{mapped-devices} is a list of device 
mappings to
+realize before @var{file-systems} are mounted.
 
 When true, @var{keyboard-layout} is a @code{<keyboard-layout>} 
 record denoting
 the desired console keyboard layout.  This is done before 
 @var{mapped-devices}
-- 
2.35.1




  reply	other threads:[~2022-05-02 22:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-02 19:11 [bug#55231] [PATCH v1] initrd: Allow extra search paths with ‘initrd-extra-module-paths’ Brian Cully via Guix-patches via
2022-05-02 22:03 ` Maxime Devos
2022-05-02 22:53   ` Brian Cully via Guix-patches via [this message]
2022-05-13 19:46 ` Kaelyn via Guix-patches via
2022-05-13 20:25 ` Maxime Devos
2022-05-21 19:12 ` [bug#55231] [PATCH v2] " Brian Cully via Guix-patches via
2022-06-01 15:54   ` [bug#55231] [PATCH v1] " Ludovic Courtès
2022-06-02 20:40     ` Brian Cully via Guix-patches via
2022-06-03  7:27       ` Ludovic Courtès
2022-05-30 20:14 ` Kaelyn via Guix-patches via
2022-06-02 21:23 ` Kaelyn via Guix-patches via
2022-06-17  1:51 ` [bug#55231] [PATCH v2 1/2] Allows copying of out-of-tree modules to the Linux initrd Brian Cully via Guix-patches via
2022-06-17 20:34   ` [bug#55231] [PATCH v1] initrd: Allow extra search paths with ‘initrd-extra-module-paths’ Ludovic Courtès
2022-06-18 19:11 ` [bug#55231] [PATCH v3 1/2] Allows copying of out-of-tree modules to the Linux initrd Brian Cully via Guix-patches via
2022-06-18 19:11   ` [bug#55231] [PATCH v3 2/2] doc: ‘initrd-modules’ will search ‘kernel-loadable-modules’ Brian Cully via Guix-patches via
2022-06-18 20:34     ` Maxime Devos
2022-06-18 20:43       ` Brian Cully via Guix-patches via
2022-06-18 22:34         ` Maxime Devos
2022-06-18 23:11           ` Brian Cully via Guix-patches via
2022-06-19 12:05             ` Maxime Devos
2022-06-21 12:34 ` [bug#55231] [PATCH v1] initrd: Allow extra search paths with ‘initrd-extra-module-paths’ Kaelyn via Guix-patches via
2022-06-24 13:28 ` [bug#55231] [PATCH v4 1/2] Allows copying of out-of-tree modules to the Linux initrd Brian Cully via Guix-patches via
2022-06-24 13:28   ` [bug#55231] [PATCH v4 2/2] doc: ‘initrd-modules’ will search ‘kernel-loadable-modules’ Brian Cully via Guix-patches via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfprpmt3.fsf@ditto.jhoto.spork.org \
    --to=guix-patches@gnu.org \
    --cc=55231@debbugs.gnu.org \
    --cc=bjc@spork.org \
    --cc=maximedevos@telenet.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).