[klibc] klibc insmod for recent kernels

Rusty Russell rusty@rustcorp.com.au
Sat, 04 Jan 2003 17:39:21 +1100

In message <200301031726.42706.arnd@bergmann-dalldorf.de> you write:
> --------------Boundary-00=_ICC5RTAS62ISKWMJ8RPQ
> Content-Type: text/plain;
>   charset="iso-8859-1"
> Content-Transfer-Encoding: 8bit
> On Wednesday 25 December 2002 22:29, H. Peter Anvin wrote:
> > That's not necessarily true.  Remember that an initramfs can be
> > synthetically constructed, and it should be possible to inject a new
> > driver at boot time, which may need to have dependencies resolved.
> Right. So we actually need the full set of module-init-tools (or a fork
> of them) to compile against klibc.

If I were you, I'd cut down depmod to just the dependency parts, put
that logic inside a cutdown modprobe (it takes about 0.5 seconds for
600 modules, so it's pretty quick), and offer that.  Put the modules
in a flat directory (say, everything in /modules which ends in .ko is
a module), and allow a .options file for each module, which if it
exists, contains the insmod options.

My guess is you'd end up around 250 lines of code (including both 64
and 32-bit support), and you could drop modules in at random.

If you're interested I could certainly write such a thing...
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.