From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QK6bOZFhcGL4bAEAbAwnHQ (envelope-from ) for ; Tue, 03 May 2022 00:56:18 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UALZOJFhcGK5kAAAG6o9tA (envelope-from ) for ; Tue, 03 May 2022 00:56:17 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 618071794F for ; Tue, 3 May 2022 00:56:17 +0200 (CEST) Received: from localhost ([::1]:44388 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlexk-0004aE-5X for larch@yhetil.org; Mon, 02 May 2022 18:56:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlexe-0004Zq-DR for guix-patches@gnu.org; Mon, 02 May 2022 18:56:10 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44366) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlexW-0004uF-Iw for guix-patches@gnu.org; Mon, 02 May 2022 18:56:10 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nlexW-0002aC-GQ for guix-patches@gnu.org; Mon, 02 May 2022 18:56:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55231] [PATCH v1] initrd: Allow extra search paths with =?UTF-8?Q?=E2=80=98initrd-extra-module-paths=E2=80=99?= Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 02 May 2022 22:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55231 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: 55231@debbugs.gnu.org Received: via spool by 55231-submit@debbugs.gnu.org id=B55231.16515321209880 (code B ref 55231); Mon, 02 May 2022 22:56:02 +0000 Received: (at 55231) by debbugs.gnu.org; 2 May 2022 22:55:20 +0000 Received: from localhost ([127.0.0.1]:38263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlewq-0002ZI-0d for submit@debbugs.gnu.org; Mon, 02 May 2022 18:55:20 -0400 Received: from coleridge.kublai.com ([166.84.7.167]:57300 helo=mail.spork.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nlewo-0002ZA-5i for 55231@debbugs.gnu.org; Mon, 02 May 2022 18:55:18 -0400 Received: from ditto (unknown [IPv6:2001:470:1f07:1b9:8650:a942:ec5e:856b]) by mail.spork.org (Postfix) with ESMTPSA id BCCE755FF; Mon, 2 May 2022 18:55:07 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1651532117; bh=NO9Rci0bsXvPsmtn24mKPzumpNi0MfZAYg/H9ioZ7hQ=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=MlfUQYH7c3Of4W9f651wQaFR3xpo2bmYvqYpkXcevQcv7BM3/cmTHklp7VZBUWgJo 7bt/L/9iMuiMn/tN4Jkn2BUvNYArIvagqjYOp9p2TDPbDe4Edd0iBZoQPxYgV08+OB NkwZOMRWImo0FwDStO0RXqvqhQgGuN2YpY4zhpxg= References: <87wnf3pv87.fsf@ditto.jhoto.spork.org> User-agent: mu4e 1.6.10; emacs 28.1 Date: Mon, 02 May 2022 18:53:31 -0400 In-reply-to: Message-ID: <87sfprpmt3.fsf@ditto.jhoto.spork.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Brian Cully X-ACL-Warn: , Brian Cully via Guix-patches From: Brian Cully via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651532177; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=bmaWngzS3ZJ676qprxDDRUr1S3XonCqBqFgwBpmX8/M=; b=Q9scTHSY29iHn8uv0gxmavlLAkVRVfgOh8vaKqIAOv8fUnaMmzpIzOcrXkhYfVYnO8xq9i crFhfdVEROIC7KXqI5jPjW2YrAmLlm/zfuFFAFm5bLTaLiWQ7DAPblptq2kXsusZ7vC53E 9ShPw/UG+IyJtzv056FVQbNELtPW3UPqTbWdzxUZapSE2LRoDRY4wQ9SO/4YznXMOPbXzT SBlJiGIdTdup8cmMJBWsKe3QCs2uknSuf9aCrgHZAjLjawis6QZEbRaiaV/rtBmFsirHVq FGQVC1ldj/ZDRrzjCDj7eNvJtXmOz7/6yJj/bih/WT8B6UUAYvYa61mHuejIlw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651532177; a=rsa-sha256; cv=none; b=X2rD1uTP6b+3XwSSNvyrfw962rXxIcOdzq/2i1onk/gMA0W8eFSj2b5yB1LD9Bi2lSrEGJ weAP1vXZPo2IgQ54xFdZbmnvZAKUeFgikTyxm28QHuFXLVxuNXFqSt2SinmiEJ1MukcwnN KCkdaFOMQfiVRIPh9HCSt5Jas/FOzds93HzT/cw8uo81jFiCOUXgiulvjGCaxWpvWmUCg0 dK6VCZOC00p/JqoCFx8UwHKCZrzjdFwFrBYjn+k4Y/WYNHrd7Y58wxhM4FDaxKKCExadzo dXIJbyNskHEuyE7l1l702MjDcviV7kDNHjz0nrna49NMQgGX/mCcBqAqLJtkkw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=MlfUQYH7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -2.78 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=MlfUQYH7; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 618071794F X-Spam-Score: -2.78 X-Migadu-Scanner: scn0.migadu.com X-TUID: QhssDdT6CCIK Maxime Devos writes: > This needs some information in the manual -- when does the field=20 > need > to be set? For what kernel modules? Is this required by=20 > 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=E2=80=99s 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}. =20 +@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=20 Linux +kernel modules. + +The items in this may be either file-like objects (usually=20 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=20 customization and @@ -35516,6 +35526,19 @@ file system, you would write: (initrd-modules (cons "megaraid_sas" %base-initrd-modules))) @end lisp =20 +If a module listed in @code{initrd-modules} is not included in=20 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=20 file +system exists on a ZFS pool, then your configuration might look=20 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=20 default. @end defvr @@ -35629,13 +35652,15 @@ here is how to use it and customize it=20 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]=20 [#:volatile-root? #f] Return a derivation that builds a raw initrd. @var{file-systems}=20 is a list of file systems to be mounted by the initrd, possibly in=20 addition to the root file system specified on the kernel command line via=20 @option{root}. @var{linux-modules} is a list of kernel modules to be loaded at=20 boot time. +@var{linux-extra-module-paths} is a list of file-like objects to=20 be searched +for kernel modules. @var{mapped-devices} is a list of device mappings to realize=20 before @var{file-systems} are mounted (@pxref{Mapped Devices}). @var{helper-packages} is a list of packages to be copied in the=20 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=20 file-systems to be -mounted by the initrd, possibly in addition to the root file=20 system specified -on the kernel command line via @option{root}.=20 @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=20 modules taken +from @var{linux} and @var{linux-extra-module-paths}.=20 @var{file-systems} +is a list of file-systems to be mounted by the initrd, possibly=20 in +addition to the root file system specified on the kernel command=20 line +via @option{root}. @var{mapped-devices} is a list of device=20 mappings to +realize before @var{file-systems} are mounted. =20 When true, @var{keyboard-layout} is a @code{}=20 record denoting the desired console keyboard layout. This is done before=20 @var{mapped-devices} --=20 2.35.1