[20080118]
|
Another stab at kernel modules
Currently, NetBSD supports loadable kernel modules via the LKM
interface. The interface supports a few types of kernel modules, e.g.
for file systems, system calls and executable file formats. Support
for loadable device drivers is currently limited, and source code for LKMs
needs to be adjusted to the interface, so the same code cannot be
used inside the kernel and as module. Andrew Doran has
done
some work
on improved support for kernel modules. His improvements include
- an in-kernel loader/linker so there's no need to rely on running
the ld(1), and rely on have a working userland, thus
- module dependencies so that one module can request to
load other modules automatically
- support to load modules from
the boot loader and provide them to the kernel
- use the same code for kernel modules and in-kernel
use, so things that are currently used inside the kernel can
be moved to a module easily, without changes in code.
The current state of the work is that this is a first version of the
code that needs quite some more work. For more information, see
Andrew's posting,
which also includes examples for testing, and future directions
that need to be done to replace LKMs. More thoughts on what
else needs to do are outlines in
Andrew's second mail on the subject.
[Tags: kernel, lkm]
|
|