unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Vagrant Cascadian <vagrant@debian.org>
Cc: 48266@debbugs.gnu.org
Subject: bug#48266: support dynamic loading of modules from initrd
Date: Tue, 11 May 2021 23:08:35 +0200	[thread overview]
Message-ID: <87sg2tugfg.fsf@gnu.org> (raw)
In-Reply-To: <87pmy3shrq.fsf@yucca> (Vagrant Cascadian's message of "Thu, 06 May 2021 13:56:41 -0700")

Hi!

Vagrant Cascadian <vagrant@debian.org> 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 ‘guix system init’, ‘reconfigure’, and ‘deploy’ error out if
drivers for a storage device are missing (see
‘check-device-initrd-modules’).

Now, that doesn’t help if you’re using ‘guix system image’, which
perhaps is what you were doing?  I wonder how we could take advantage of
that code in such a scenario.

> 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’t completely materialize (some of the machinery is already
here, though).  That said, we still wouldn’t want to include too much in
the initrd, would we?

Thanks,
Ludo’.




  reply	other threads:[~2021-05-11 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 20:56 bug#48266: support dynamic loading of modules from initrd Vagrant Cascadian
2021-05-11 21:08 ` Ludovic Courtès [this message]
2021-05-11 22:35   ` Vagrant Cascadian

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=87sg2tugfg.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=48266@debbugs.gnu.org \
    --cc=vagrant@debian.org \
    /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).