[klibc] klibc insmod for recent kernels

H. Peter Anvin hpa@zytor.com
Fri, 03 Jan 2003 11:48:55 -0800

Arnd Bergmann wrote:
> 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.
> The attached patch against module-init-tools-0.9.7 gets us somewhat closer 
> there. It removes the need for the 'index' and 'syscall' functions,
> replacing them with 'strchr' and '_syscall#', which are part of 
> klibc.
> I also added another Makefile because klibc's MCONFIG does not
> work well with automake.
> The other patch adds the functions system, strerror, fgetc and fgets
> to klibc. This might not be a good idea, since the fgets implementation
> is about as slow as it gets and someone might be tempted to use it,
> but it does the job for module-init-tools.

Not a good idea is probably a good way to sum it up, especially for 
system().  Why on earth does module-init-tools need system()?  Requiring 
a shell to install modules seems, ahem, daft?