Adding Device Nodes to the dev Directory


Adding Device Nodes to the /dev Directory

This section describes a step in the kernel building process that applies only to versions of FreeBSD prior to 5.0. If your version is 5.0 or later, you can safely skip this section because later versions use the DEVFS filesystem interface to the system's devices and build the /dev virtual filesystem dynamically at boot time.

Many devices will be missing an entry in /dev when you add them to the kernel configuration; devices in /dev include only those that have either been part of the base system or have been added afterward explicitly. You have to create device nodes for new devices that you add to the kernelthey're not generated automatically.

Fortunately, creating the device nodes is fairly simple. All you have to do, after you reboot with the new kernel, is go into the /dev director, and run the MAKEDEV shell script:

# ./MAKEDEV


All devices supported by the running kernel will be created as device nodes or "special files" in /dev. Afterward, you have a target you can use with your command-line tools to interact with each new device. A more efficient, direct solution is to make the device node only for the new device(s) you've installed (for instance, if you've enabled the snd0 sound driver). You can enable the device by running the MAKEDEV command on it alone:

# ./MAKEDEV snd0





FreeBSD 6 Unleashed
FreeBSD 6 Unleashed
ISBN: 0672328755
EAN: 2147483647
Year: 2006
Pages: 355
Authors: Brian Tiemann

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net