Copyright (C) 2000-2012 |
Whole document tree How do I set it up?First get the necessary parts: A suitable kernel and the latest modules package. Then you should install the module utilities as per the instructions included in the package. Pretty simple: Just unpack the sources and run make install. This compiles and installs the following programs in /sbin: genksysm, insmod, lsmod, modprobe, depmod and kerneld. I recommend you add some lines to your startup-scripts to do some necessary setup whenever you boot Linux. Add the following lines to your /etc/rc.d/rc.S file (if you are running Slackware), or to /etc/rc.d/rc.sysinit if you are running SysVinit, i.e. Debian, Corel, RedHat, Mandrake or Caldera:
These commands may already be installed in your SysV init scripts. The first part starts kerneld itself. The second calls depmod -a at startup to build a list of all available modules and analyzes their inter-dependencies. The depmod map then tells kerneld if one module needs to have another loaded before it will itself load.
Next, unpack the kernel sources, configure and build a kernel to your liking. If you have never done this before, you should definitely read the README file at the top level of the Linux sources. When you run make xconfig to configure the kernel, you should pay attention to some questions that appear early on:
You need to select the loadable module support, or there will be no modules for kerneld to load! Just say Yes.
This, of course, is also necessary. Then, a lot of the things in the kernel can be built as modules - you will see questions like
where you can answer with an M for "Module". Generally, only the drivers necessary for you to boot up your system should be built into the kernel; the rest can be built as modules.
When you have gone through the make config, compile and install the new kernel and the modules with make dep clean bzlilo modules modules_install. Phew.
Trying out kerneldNow reboot with the new kernel. When the system comes back up, you can run ps ax, and you should see a line for kerneld:
One of the nice things with kerneld is that once you have the kernel and the daemon installed, very little setup is needed. For a start, try using one of the drivers that you built as a module; it is more likely than not that it will work without further configuration. If I build the floppy driver as a module, I could put a DOS floppy in the drive and type
The floppy driver works! It gets loaded automatically by kerneld when I try to use the floppy disk. To see that the floppy module is indeed loaded, you can run /sbin/lsmod to list all currently loaded modules:
The "(autoclean)" means that the module will automatically be removed by kerneld when it has not been used for more than one minute. So the 11 pages of memory (= 44kB, one page is 4 kB) will only be used while I access the floppy drive - if I don't use the floppy for more than a minute, they are freed. Quite nice, if you are short of memory for your applications! |