[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Kernel modules in initrd
From: |
Danny Milosavljevic |
Subject: |
Re: Kernel modules in initrd |
Date: |
Mon, 26 Feb 2018 17:26:47 +0100 |
Hi Ludo,
On Mon, 26 Feb 2018 16:20:08 +0100
address@hidden (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...
- Re: Kernel modules in initrd, (continued)
- Re: Kernel modules in initrd, Danny Milosavljevic, 2018/02/22
- Re: Kernel modules in initrd, Mark H Weaver, 2018/02/22
- Re: Kernel modules in initrd, Danny Milosavljevic, 2018/02/22
- Re: Kernel modules in initrd, Danny Milosavljevic, 2018/02/23
- Re: Kernel modules in initrd, Andreas Enge, 2018/02/23
- Re: Kernel modules in initrd, Danny Milosavljevic, 2018/02/25
- Re: Kernel modules in initrd, Ludovic Courtès, 2018/02/26
- Re: Kernel modules in initrd,
Danny Milosavljevic <=
- Re: Kernel modules in initrd, Ludovic Courtès, 2018/02/27
- Re: Kernel modules in initrd, Danny Milosavljevic, 2018/02/27
- Re: Kernel modules in initrd, Danny Milosavljevic, 2018/02/27
- Re: Kernel modules in initrd, Ludovic Courtès, 2018/02/28
Re: Kernel modules in initrd, Ludovic Courtès, 2018/02/23