Re: Device drivers != Modules

Grant R. Guenther (grant@torque.net)
Sat, 13 Jun 1998 16:30:31 -0400 (EDT)


> Are there any projects of making it possible for adding some kind of
> support for "hooks" in the kernel, where you could add a device driver
> for some piece of equipment without even messing with the kernel?

This is already entirely possible.

> This is not the same as modules, though, since the kernel have to know
> which module is which, in *compile time*.

No, that's not true.

> I'm talking about adding drivers to the kernel in *run-time*.

Most new drivers are developed in just that way.

All the hooks into the kernel are done with calls to "register" functions.

The only time that changes in other parts of the kernel are required is
to bind in non-modular drivers (and arrange for parameter passing).

If you are thinking of building a _block_ device you might get the
impression that you have to include some things in the blk.h file - which
is apparently shared by all block devices. But, there is a way to code even
a block device driver so that it requires no changes in any other part of
the kernel.

You don't even have to obtain an officially allocated device major number,
there is a pool of permanently reserved numbers for experimental or
transient drivers.

--------------------------------------------------------------------------
Grant R. Guenther grant@torque.net
--------------------------------------------------------------------------

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu