Almost every device in the kernel has a corresponding
``node'' entry in the /dev
directory. These
nodes look like regular files, but are actually special
entries into the kernel which programs use to access the
device. The shell script /dev/MAKEDEV
, which is
executed when you first install the operating system,
creates nearly all of the device nodes supported.
However, it does not create all of them, so when
you add support for a new device, it pays to make sure
that the appropriate entries are in this directory, and
if not, add them. Here is a simple example:
Suppose you add the IDE CD-ROM support to the kernel. The line to add is:
controller wcd0
This means that you should look for some entries that
start with wcd0
in the /dev
directory,
possibly followed by a letter, such as `c', or preceded
by the letter 'r', which means a `raw' device. It turns
out that those files are not there, so I must change to
the /dev
directory and type:
# sh MAKEDEV wcd0
When this script finishes, you will find that there are
now wcd0c
and rwcd0c
entries in
/dev
so you know that it executed correctly.
For sound cards, the command:
# sh MAKEDEV snd0
creates the appropriate entries. Follow this simple
procedure for any other non-GENERIC devices which do not
have entries.
Note: All SCSI controllers use the same set of/dev
entries, so you do not need to create these. Also, network cards and SLIP/PPP pseudo-devices do not have entries in/dev
at all, so you do not have to worry about these either.