all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: Kernel modules in initrd
Date: Mon, 26 Feb 2018 17:26:47 +0100	[thread overview]
Message-ID: <20180226172647.22d9e56b@scratchpost.org> (raw)
In-Reply-To: <87y3jfvkuv.fsf@gnu.org>

Hi Ludo,

On Mon, 26 Feb 2018 16:20:08 +0100
ludo@gnu.org (Ludovic Courtès) wrote:

> I suppose the bits I’ve promised to detect necessary modules based on
> modules.alias and /sys should be useful here?

Definitely!

I've posted a working patch series (v3, "Load Linux module only when supported
hardware is present") of the current kmod-based autoloader to guix-patches.
It's using an old-ish kmod - but otherwise it works fine.

So what we would need next is something like modprobe written in guile.

I think that ./gnu/build/linux-modules.scm load-linux-module* already does that.

The only part missing is to replace %modprobe-wrapper by a guile script
which imports ./gnu/build/linux-modules.scm load-linux-module*, interprets
some of the modprobe options and then masquerades as modprobe without invoking
modprobe.

The reason is that the kernel calls us back when it needs a module (for
example when you mount something and it needs a charset converter or something).

(the name of the executable invoked is configured via /proc/sys/kernel/modprobe)

This can happen quite early in the boot process - and it took me some time
to get the order and also the environment variables right.  We should be able
to reuse that for the pure Guile modprobe.

After the patch we don't *manually* load any of the modules - and all the
tests work.  I booted my system with it - that also works.

P.S. How come glibc is in the initrd?  Shouldn't guile have statically linked it?
glibc is like 50000 kiB.  In that case saving 800 kiB is not really worth it...

  reply	other threads:[~2018-02-26 16:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-22 21:17 Kernel modules in initrd Andreas Enge
2018-02-22 21:29 ` Jan Nieuwenhuizen
2018-02-22 21:44   ` Danny Milosavljevic
2018-02-22 21:34 ` Danny Milosavljevic
2018-02-22 21:50   ` [PATCH] linux-initrd: Add ATA and SAS modules to the default set of modules Danny Milosavljevic
2018-02-27 15:03     ` Ludovic Courtès
2018-02-22 21:53   ` Kernel modules in initrd Andreas Enge
2018-02-22 22:01 ` Mark H Weaver
2018-02-23  1:00   ` Danny Milosavljevic
2018-02-23 14:28     ` Danny Milosavljevic
2018-02-23 23:02       ` Andreas Enge
2018-02-25 11:43         ` Danny Milosavljevic
2018-02-26 15:20           ` Ludovic Courtès
2018-02-26 16:26             ` Danny Milosavljevic [this message]
2018-02-27 15:02               ` Ludovic Courtès
2018-02-27 19:32                 ` Danny Milosavljevic
2018-02-27 20:52                   ` Danny Milosavljevic
2018-02-28 21:49                     ` Ludovic Courtès
2018-02-23 22:39   ` Ludovic Courtès
2018-02-24  8:28     ` ng0
2018-02-27 15:04       ` Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=20180226172647.22d9e56b@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.