From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UO9MAB6Ml2JCGgEAbAwnHQ (envelope-from ) for ; Wed, 01 Jun 2022 17:56:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WH4uAB6Ml2K7eAEAauVa8A (envelope-from ) for ; Wed, 01 Jun 2022 17:56:14 +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 9457F3C97A for ; Wed, 1 Jun 2022 17:56:13 +0200 (CEST) Received: from localhost ([::1]:38154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nwQhg-0003DV-3P for larch@yhetil.org; Wed, 01 Jun 2022 11:56:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwQhW-0003B9-7G for guix-patches@gnu.org; Wed, 01 Jun 2022 11:56:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57787) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nwQhV-0001lt-RN for guix-patches@gnu.org; Wed, 01 Jun 2022 11:56:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nwQhV-00044s-Ok for guix-patches@gnu.org; Wed, 01 Jun 2022 11:56:01 -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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 01 Jun 2022 15:56:01 +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: Brian Cully Cc: 55231@debbugs.gnu.org, Brian Cully Received: via spool by 55231-submit@debbugs.gnu.org id=B55231.165409890515597 (code B ref 55231); Wed, 01 Jun 2022 15:56:01 +0000 Received: (at 55231) by debbugs.gnu.org; 1 Jun 2022 15:55:05 +0000 Received: from localhost ([127.0.0.1]:51684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwQgb-00043U-4U for submit@debbugs.gnu.org; Wed, 01 Jun 2022 11:55:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57780) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nwQgZ-00042s-B2 for 55231@debbugs.gnu.org; Wed, 01 Jun 2022 11:55:03 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37564) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwQgS-0001Sn-IP; Wed, 01 Jun 2022 11:54:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=4FgHx67M7wzGDu2tGyxd76n6DPVnCywDO6cw7VtaKwc=; b=qCy0LOoq+kOwoyNjjE+b Frfvzgl9Pch3nR1sScXcRQaBGNTe34ciTLHidCYq2RCJb4L4KZl23JuUchdB+HOEvpdYLic3qIhdX pD3rW67NRm79xfxZp7bNzKknLmor8mq9xzNcC1LYy6qF5fTbTb7BGqSVIJpRg//jlW9H/qEkAic3f 0dk8grnQbeN8ofHfP9nJqCeAJzugniC4MT5VIzOxhyoVK/eb+gC+QRGNeI5sPvanVl4QJ4dmtzf/W cQ4CVOXCmPE2YI/nIakyzGsofMSDTza0q1vnwY8AKAP51iw4O628Be8CW4/jWnie8rIupNnUV500a Akr6qLHqQd9Pyg==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=53194 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nwQgS-0007fD-3i; Wed, 01 Jun 2022 11:54:56 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87wnf3pv87.fsf@ditto.jhoto.spork.org> <2053c4ab42dfe2719cfc377934ac2fb9bcb500a9.1653160364.git.bjc@spork.org> Date: Wed, 01 Jun 2022 17:54:54 +0200 In-Reply-To: <2053c4ab42dfe2719cfc377934ac2fb9bcb500a9.1653160364.git.bjc@spork.org> (Brian Cully's message of "Sat, 21 May 2022 15:12:45 -0400") Message-ID: <87ilpkwf8x.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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" 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=1654098973; h=from:from:sender:sender: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=4FgHx67M7wzGDu2tGyxd76n6DPVnCywDO6cw7VtaKwc=; b=nqqmKEEo1qmC82s/yFZ4LHVwPzgxmZZLUU3U9InUprZPWQX7iY+aRPhZCn+KIv8QGbHqaI EaGGjXZW6DtYpaXHmlbn3Li+jMel8fZZRB7vXYx3aTIzMAhIsuLwKOWJH18StkPVjp2sJ7 twQ4mN7kIR1Sp8yV4C95I7iSw7NrTwihUjg8WFIndlpUOpsMy+0NF6e16UVNLMofFJ1kyr hcqrC8Y8Xt5DDaNcbJqG0nzyC6I3iRSvQMC5RMVZYCLtkxTk8IFhDJEjOjeVyRw0o3Fvx7 8Wpnk43P1M0LXmXRCp/9Bfv9MkzC1S8iUdjqUuE1yyRBo2dFxJW54zj+r5hfNQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1654098973; a=rsa-sha256; cv=none; b=nnDNTokz8rmeL/VWkG7nHhTYnZJlGhVW5EULuff21oe95/vFM004TGEH89SvCULXBCIr8V TFL7nNK4sePnTgNCaCXDNzqHhz5ntzxA+EB7R9Q05dPwIfY20mJjS8ueRQZSxfHIXwt2Fv W9y2SJMNC7gb85kc2nFZMCoBSYuOXSKfpl0gXc+doUhcZ7OXRds5wRM62rfYBtpgl2c9Ij 3aL/afgJipRoyPTvIABqqfnmv6aQEasUVHndvPYL3pzSLXYvFSkzPLmmVkWnqwVBZT3UVj eJVw1HbYMF2smYGXvtFXHXgJOyiPWNJiTIa6F3WVmWH7SxU4J/5vbImH/H29JQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qCy0LOoq; 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: -3.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=qCy0LOoq; 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: 9457F3C97A X-Spam-Score: -3.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: t4fGoSDebPqy Hello Brian, Brian Cully skribis: > From: Brian Cully > > This patch allows copying of out-of-tree kernel modules to the Linux > initrd. > > For out-of-tree modules to found, an extra slot has been added to > =E2=80=98operating-system=E2=80=99: =E2=80=98initrd-extra-module-paths=E2= =80=99, which contains a list > containing items of either FILE-LIKE or (FILE-LIKE OUTPUT) which will be > searched for modules in addition to the standard Linux module path. The > required modules can then be added to =E2=80=98initrd-modules=E2=80=99 as= normal and all paths > will be searched for it, including for any modules depended on. > > * doc: Update documentation for =E2=80=98initrd-extra-module-paths=E2=80= =99. > * gnu/build/linux-modules.scm (find-module-file): change DIRECTORY argume= nt to > DIRECTORIES. Now takes a list of directories to search, rather than a sin= gle > one. > * gnu/system.scm : Add INITRD-EXTRA-MODULE-PATHS > field and accessor. Takes a list of file-like objects. > * gnu/system/linux-initrd.scm (flat-linux-module-directory): change LINUX > argument to PACKAGES. Now contains a list of file-likes to search for mod= ules. > (raw-initrd): Add LINUX-EXTRA-MODULE-PATHS keyword argument. Pass it > to (flat-linux-extra-module-paths) along with the selected LINUX package. > (base-initrd): Add LINUX-EXTRA-MODULE-PATHS keyword argument. Pass it > to (raw-initrd). Nice, it looks like a welcome addition. > +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 I wonder if we could reuse the =E2=80=98kernel-loadable-modules=E2=80=99 fi= eld for this purpose instead of introducing a new field. We=E2=80=99d need to pass it t= o the initrd procedures and have them search in there in addition to the kernel package, pretty much like this patch already does actually. WDYT? Nitpick: the GNU convention is to use =E2=80=9Cpath=E2=80=9D to denote =E2= =80=9Csearch paths=E2=80=9D, and other =E2=80=9Cfile=E2=80=9D, =E2=80=9Cfile name=E2=80=9D, or similar. = In this case, that=E2=80=99d be =E2=80=9Ckernel module=E2=80=9D or =E2=80=9CLinux module=E2=80=9D. Thank you! Ludo=E2=80=99.