Before a driver can be used, the system must be informed that it exists. The add_drv(1M) utility must be used to correctly install the device driver. Once the driver is installed, it can be loaded and unloaded from memory without using add_drv(1M) again.
Device drivers reside in different directories depending on the platform they run on and whether they are needed at boot time. Platform-dependent device drivers reside in the following locations:
/platform/`uname -i`/kernel/drv - Contains drivers that run only on a specific platform, such as the UltraTM 2
/platform/`uname -m`/kernel/drv - Contains drivers that run on a family of platforms, such as Ultra 1 and Ultra 2 platforms. This directory may not be present on all platforms.
Platform-independent drivers reside in either of these directories:
/usr/kernel/drv - Contains drivers not required for system booting
/kernel/drv - Contains drivers required for booting
To install a driver, the driver and its configuration file must be copied to a drv directory in the module path. For example, to copy a driver to /usr/kernel/drv, type:
$ su# cp xx /usr/kernel/drv# cp xx.conf /usr/kernel/drv
If the driver creates minor nodes that do not represent disks, tapes, or ports (terminal devices), /etc/devlink.tab can be modified to cause devlinks(1M) to create logical device names in /dev. See devlink.tab(4) for a description of the syntax of this file.
Alternatively, logical names can be created by a program run at driver installation time.
Run add_drv(1M) to install the driver in the system. If the driver installs successfully, add_drv(1M) will run disks(1M), tapes(1M), ports(1M), and devlinks(1M) to create the logical names in /dev.
# add_drv xx
This is a simple case in which the device identifies itself as xx and the device special files will have default ownership and permissions (0600 root sys). add_drv(1M) also allows additional names for the device (aliases) to be specified. See add_drv(1M) to determine how to add aliases and set file permissions explicitly.