Linux Device Registry (DevReg)
This patch is now obsolete
The Linux Device Registry (devreg) is a kernel patch that adds a
device database to the /proc filesystem. It collects all
information about the physical devices, creates persistent device ids for
them and manages the relations between the physical devices and their
drivers.
Devreg has three purposes:
- Collect all configuration data so the user can browse his hardware
configuration.
- Allow an application to display all devices that provide a
certain interface (for example all printers) so the user
can choose one.
- Allow an application to find the device that the user has selected
after a reboot or a hotplug action: the device files in /dev
do not offer stable names, they depend on the order in that the devices
have been plugged in or powered on.
Warning! The patch is experimental and only few devices are supported.
Status:
Patch works for PCI, SCSI and USB devices, the following drivers will register
types and/or device files:
hid/USB, hub/USB, printer/USB, emu10k1/PCI,
es1371/PCI, sd/SCSI, mice/PS/2.
The following PCI drivers should work, but are untested (soundcards only):
via82cxxx, trident, sonicvibes, maestro3, maestro, i810_audio, esssolo1,
es1370, cs46xx, cs4281, btaudio
Overview |
Download the patch for Linux
2.4.9, devreg version 0.3.3
from 2001/10/9 |
Open issues (please read before complaining) |
Download source 0.3.3 with build scripts and ChangeLog
(for development, note that it is still for 2.4.9!) |
CHANGES, version history |
Kernel-API for device and bus drivers that
support DevReg |
Libdevreg user-space library:
C API and
C++ API |
Download libdevreg 0.3.2 from 2001/8/8 |
Patch containing only devreg 0.3.1's proc fs changes |
Example output of all devreg files and their values |
Installation:
- Prepare a regular kernel in /usr/src/linux, make sure that
DevFS is installed, see
http://www.atnf.csiro.au/~rgooch/linux/docs/devfs.html.
- Patch your kernel source:
cd /usr/src/linux
patch -p1 < ../devreg-2.4.9-0.3.3.diff
- Select CONFIG_DEVREG (if you use menuconfig or xconfig: it
is in file systems -> /dev file system -> device registry)
- Compile your kernel and ALL modules and install them like usual.
Some external drivers have to be patched, too. For NVIDIA drivers use this
DevFS patch. If you use
Alsa you will get several
compile errors: add a "NULL" as last argument to all function invocations
that fail.
- After booting the new kernel you should see the /proc/devreg directory
Similar facilities in other OSes
Last update: December 1st 2001 - contact me at
tim@tjansen.de -
GnuPG Public Key