NetBSD/sys/lkm
kleink 20b33f1d4c When creating new device nodes based on the major number of the LKM slot we
have been assigned, try to remove any existing ones first; otherwise loading
the LKM could fail with EEXIST.  Fixes PR kern/3868.

Why was this call dropped between v3-2alpha7 and v3-2beta1?
1997-07-19 22:42:18 +00:00
..
compat copyright assigned to TNF 1997-05-19 22:11:12 +00:00
netinet When creating new device nodes based on the major number of the LKM slot we 1997-07-19 22:42:18 +00:00
vfs New adosfs lkm, which will only be build on the Amiga. 1997-07-08 16:46:24 +00:00
Makefile add netinet... 1997-01-07 10:48:19 +00:00
README Add the lkm stuff I've been working on to the tree. 1996-08-22 20:18:07 +00:00
TODO Update TODO list for lkm stuff 1996-11-05 02:34:24 +00:00

README

$NetBSD: README,v 1.1 1996/08/22 20:18:10 explorer Exp $

Based on some examples in /usr/share/lkm, I have started adding
loadable modules for some portions of NetBSD I don't think should
require a kernel rebuild to install.

So far, I have added the following:

	cd9660
	fdesc
	kernfs	(slightly different than in /usr/share/lkm)
	msdosfs
	mfs
	nullfs
	portal
	procfs
	umapfs
	union

Building and Testing
--------------------

mkdir /usr/lkm (if it's not there)
	make depend && make && make install

Then, to install cd9660, for example, type:
	modload -v -e cd9660_lkmentry -o /var/run/lkm.cd9660 /usr/lkm/cd9660.o
	(or "make load" in the correct directory)

To remove it from memory, type:
	modunload -n cd9660
	(or "make unload" in the correct directory)

Notes
-----

Currently there is no symbol table management so the in-kernel debugger will
loose.

The LKM interface will (hopefully) be changing into something more usable.
If you use these files as a reference, you might have to change your
code if you want to use the new interface.  I expect the old one to be
supported if it is possible to do so.

COMPAT modules
--------------

The FreeBSD module DOES load, but it will not work without other kernel
modifications.

The Linux module compiles, and also requires other kernel modifications
to run.  It has not been tested.

VFS modules
-----------

These are somewhat tested.  Since this whole system is still under
development use these at your own risk.

Type    Id  Off Loadaddr Size Info     Rev Module Name
VFS       0  21 f873d000 0020 f8744000   1 msdosfs
VFS       1  20 f8746000 000c f8748000   1 procfs
VFS       2  19 f8839000 0008 f883a000   1 kernfs
VFS       3  18 f883b000 0008 f883c000   1 nullfs
VFS       4  17 f8840000 000c f8842000   1 fdesc
VFS       5  16 f8843000 0008 f8844000   1 portal
VFS       6  15 f8845000 000c f8847000   1 umapfs
VFS       7  14 f8848000 0014 f884c000   1 union
VFS       8  13 f884d000 0008 f884e000   1 mfs

--Michael <explorer@flame.org>