From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MPrxJAkHm2A1GAAAgWs5BA (envelope-from ) for ; Wed, 12 May 2021 00:36:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 0PGQIAkHm2A4DAAAbx9fmQ (envelope-from ) for ; Tue, 11 May 2021 22:36:57 +0000 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 06B20181EC for ; Wed, 12 May 2021 00:36:57 +0200 (CEST) Received: from localhost ([::1]:39374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lgazn-0003dn-Te for larch@yhetil.org; Tue, 11 May 2021 18:36:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:32870) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lgayw-0003KS-Oy for bug-guix@gnu.org; Tue, 11 May 2021 18:36:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54443) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lgayw-0007i4-HF for bug-guix@gnu.org; Tue, 11 May 2021 18:36:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lgayw-0002Ch-Eq for bug-guix@gnu.org; Tue, 11 May 2021 18:36:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48266: support dynamic loading of modules from initrd Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 11 May 2021 22:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48266 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 48266-submit@debbugs.gnu.org id=B48266.16207725188417 (code B ref 48266); Tue, 11 May 2021 22:36:02 +0000 Received: (at 48266) by debbugs.gnu.org; 11 May 2021 22:35:18 +0000 Received: from localhost ([127.0.0.1]:37756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgayE-0002Bg-Ii for submit@debbugs.gnu.org; Tue, 11 May 2021 18:35:18 -0400 Received: from cascadia.aikidev.net ([173.255.214.101]:59446) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lgayD-0002BS-5u for 48266@debbugs.gnu.org; Tue, 11 May 2021 18:35:17 -0400 Received: from localhost (97-120-1-76.ptld.qwest.net [97.120.1.76]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id DEB901ACAA; Tue, 11 May 2021 15:35:10 -0700 (PDT) From: Vagrant Cascadian In-Reply-To: <87sg2tugfg.fsf@gnu.org> References: <87pmy3shrq.fsf@yucca> <87sg2tugfg.fsf@gnu.org> Date: Tue, 11 May 2021 15:35:07 -0700 Message-ID: <87lf8krjac.fsf@yucca> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 48266@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620772617; 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: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; bh=2PJKYk5S4kZfxJ6XkDXB2ThYrBWDbyaHy2szgK04ovo=; b=Jy8AL+u0kHSqbhDzrjNKdBfoy2DU1zK6HtwRtLXlNWFnOpIbpCqqb3HXKZBLZgTQhEVPrT PpxfCW92lzoco1uEuqp4BOi5JF/yQC5JZ3Ff7tLo3xD1nyWJw1BGmWwCHHZtTq2YRc8Zc4 zeJkeXtz769lFARQd3Q9HbE5jGf153IUEOp47QaPm3cB5ueivPcCwSRUvP8s0mhDsWTtBZ yfeYTz6wp/yd/dMEZl86b9Yd1onAtzYl+Cww0TCSVpM/aY/NXarXt5raAoyH4dVIrUTEzX qQ00IlksTZHaZEB5KI0apomhc30ci3GpIo6DUl/FK66p8MvJxFO/pRd+3tC8CA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620772617; a=rsa-sha256; cv=none; b=Dls38vyRvGWC1W/mkrbeR95c40A8Obg8F3PyMfVYsSyg3gcA5+tz5YwPZo7jJCbP8z++zD U8lB9ZYYwDGuPeixYvHHgknAIyyQXnQu+EKYUvpwdWIbez4d2hfKeYY7YkUDXYWmgLWlkH ueHskBX4sSATozxA3CRe9uJUe7SvtYahSv6hKdnj9GEue0rS0bk84QWjAcyYiSMG3GJ5my tSoMZ86cN4Azx2/Gax+MV10s0S9NCPFLOAirbqW/Gh/N2HUrXpTSTbl7yApAcYnl02PlYO UVH5BVlF0aVttxYkQL57g8j6SlQw/U2Laqh2X5T4TgUv/PwDSUJbc3BKyDACCg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -4.05 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 06B20181EC X-Spam-Score: -4.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: 4nhnR1uALViv --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-05-11, Ludovic Court=C3=A8s wrote: > Vagrant Cascadian skribis: > >> Initially, I tried adding just the obviously mmc related modules, but >> this gave me guile prompt from the initramfs as it failed to find the >> rootfs. Notably, even with the above list, I still need to explore >> additional modules to load in order to get the display and keyboard to >> work from the initramfs, in case I wanted to use this with encrypted >> rootfs... >> >> The above list of modules could almost certainly be trimmed, but even >> getting a bootable system for pinebook pro took about 20 tries, and the >> process of defining the modules is further complicated by several >> factors... >> >> * The filesystem names of the modules (e.g. dw_mmc-pltfm) do not >> necessarily match the runtime name from lsmod (e.g. dw_mmc_pltfm). >> This becomes a good deal of trial and error to figure out which >> modules to add. >> >> * One needs to manually resolve the soft and hard dependencies of the >> modules, and ensure they are loaded, and include them in the list. >> >> * If upstream changes the module name (which does happen from time to >> time), you have to update the system config.scm to the new module >> names. >> >> * If some functionality changes from a module to a built-in, or >> vice-versa, the system config.scm needs manual updating. >> >> * Switching system between two different arm boards potentially requires >> entirely different lists of modules. > > Note that =E2=80=98guix system init=E2=80=99, =E2=80=98reconfigure=E2=80= =99, and =E2=80=98deploy=E2=80=99 error out if > drivers for a storage device are missing (see > =E2=80=98check-device-initrd-modules=E2=80=99). Yes, I often have to tell it to skip those checks when using 'guix system init', as I'm installing to a microSD card by way of a usb-to-microSD adapter, and it guesses all the wrong modules. > Now, that doesn=E2=80=99t help if you=E2=80=99re using =E2=80=98guix syst= em image=E2=80=99, which > perhaps is what you were doing? I wonder how we could take advantage of > that code in such a scenario. I sometimes do 'guix system image' for the initial pass, and then follow-up with init or reconfigure... >> Rather than handling modules one at a time, I would propose to at least >> add an option that can add whole directory trees of modules to the >> initrd (e.g. kernel/drivers/usb/)... and then use modprobe (or udev?) >> to handle the dependencies. Maybe opt-in at first, but longer-term, >> explore making it default? > > I remember Danny and I worked on something along these lines in the past > but it didn=E2=80=99t completely materialize (some of the machinery is al= ready > here, though). That said, we still wouldn=E2=80=99t want to include too = much in > the initrd, would we? Notably, at the moment it loads various virtio modules on all my baremetal systems, which is a bit uneccesary. :) Honestly, when debugging support for a new arm system, I'm of the opinion that more is better than less, as it takes way too many iterations to get to a working modular configuration. So at least an option to include even the kitchen sink drivers would be nice. :) live well, vagrant --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYJsGmwAKCRDcUY/If5cW qsxNAP9tuIdRlpCHQID0+HpLkNiT5mU5WSvQcXgdZykNU3rdxgD+Ko9ZmpXOh4qr LICpdD1eaO0tT6uGcfyBkplYf0urrQE= =CFt4 -----END PGP SIGNATURE----- --=-=-=--