Re: Suggestion for handling of boot-time driver options

Michael Elizabeth Chastain (mec@shout.net)
Sun, 14 Dec 1997 11:43:02 -0600


Dominik Kubla writes:

> What if we could compile drivers as monolithic and modular at the same
> time? I thought that it should be possible to put the startup code into
> different ELF segments - eg .start0 and .start1 - and then have the linker
> strip of the unwanted part.

Interesting idea.

> 1. We could avoid the well-known problem of "this driver doesn't compile
> as module" ?

No. The driver still has to contain init_module and cleanup_module
functions; they still have to work properly; and they still have to
be marked somehow in the source. You would just change the method of
marking them.

> 2. Distributors could provide their customers with a kernel link kit as
> found on commercial Unices, allowing them to link a custom kernel
> as they need it without the need of a full recompile. (Some people
> simply won't use kerneld for their own reasons, like it or not.)

Distributors could ship a tree with resident .o files right now, if they
wanted to. Although the GPL does require that the .c files and .h files
be available.

> 3. This allows the use of binary-only drivers with monolithic kernels.
> (are there such beasts?)

That definitely runs into GPL problems. Plus it seems useless to me.
The author of a binary-only module could release two files anyways,
one compiled with -DMODULE and one compiled without.

> Is this an idea that warrants further investigation or am i really the
> lunatic many people believe me to be? <g>

To me, it looks like a solution that doesn't correspond to a real
problem. I think its major value would be the learning experience
in implementing it.

Michael Chastain
<mailto:mec@shout.net>
"love without fear"