drvinstall(1M) — ADMINISTRATOR COMMANDS
NAME
drvinstall − install/uninstall a driver
SYNOPSIS
/usr/sbin/drvinstall [−m master] [−d object] [−s system]
[−e edt_data] [−i editdata]
[−o directory] [−c minor]
−v version [−ufbnx]
DESCRIPTION
The drvinstall command accepts an object file, master file, system file and EDT data as inputs, and creates the corresponding specially formatted file for use in the configuration of a new bootable operating system. In addition, the master, edt_data, and system files may be modified. The −u option is used for uninstalling a driver. Pathnames specified for the options below can be either relative or absolute pathnames.
−m master
specifies the path name of the master directory to be used. One or both of the −m or −d options must be specified, and at least one must specify a file name as the last component of the path name. If this flag is omitted, the /etc/master.d directory is used.
−d object
specifies the path name of the input object directory to be used. One or both of the −m or −d options must be specified, and at least one must specify a file name as the last component of the path name. If this flag is omitted, the /boot directory is used.
−s system
specifies the path name of the system file to be used. If this flag is omitted, the /stand/system file is used.
−e specifies the path name of the edt_data file to be updated. If this flag is omitted, /stand/edt_data is used. This flag is meaningful for hardware drives only.
−i Specifies a file containing EDT data for the driver (hardware only). This flag is required for hardware drivers and is invalid for anything else. The format of edtfile is the same as the edt_data file. Any attempt to install edt_data directives other than driver directives is considered an error. A driver directive in the edtfile may not reference a vector group in the edt_data file being updated.
−o directory
specifies the path name of the output bootable file. If this flag is omitted, the /boot directory is used.
−c minor
specifies the minor number to be inserted at the end of an INCLUDE statement for the driver. The INCLUDE statement is inserted in the system file. Minor is optional in an INCLUDE and specifies the quantity (default of 1) of minor devices to be controlled by the driver. If the driver is a hardware driver, −c is ignored.
−v version
specifies the version number of the drvinstall command compatible with the master file being used. The −v option is required on the command line and currently supports "1.0".
−u specifies that the named driver is to be uninstalled. A driver dependency check is made and if a dependency is found, a warning message is issued and the command is aborted. If no dependency is found, then drvinstall will:
•Remove corresponding entries in the edt_data file (hardware drivers only).
•Remove the bootable object file.
•Replace the major number with a "−" in the master file if the driver is a software driver.
•Delete the INCLUDE statement from the system file if the driver is not a hardware driver.
•Print the major number if the driver is a software or hardware driver.
−f when used with the −u option, disables the dependency check. This results in the driver being uninstalled regardless of dependencies.
−b inhibits generation of the object file. This option is ignored for uninstall.
−n Inhibits any edit of the system file.
−x Enables debugging output.
For any driver installed, drvinstall calls the mkboot command to produce a bootable object file. The resultant output file is placed into the directory determined by the −o argument.
If the driver to be installed is a software or hardware driver, drvinstall will:
•Assign a major number to that driver if there is a "−" entry in the major number field of the associated master file entry. The drvinstall command expects any unused field of the master file to be filled with a "−".
The drvinstall command determines the available major numbers by scanning all existing files in /etc/master.d for major numbers; it then assigns the first unused number in the above range (note that the directory specified by master on the command line is not searched for major numbers). This value replaces the corresponding "−" value in the major number field of the master file.
•For hardware drivers, drvinstall adds entries (install) or removes entries (uninstall) from edt_data. For uninstall, only those drivers’ entries in editfile that match by name and board number in edt_data are removed. The format of edtdata is the same as edt_data.
•Print the major number found or assigned in the master file.
If the driver to be installed is not a hardware driver (it is, e.g., a software driver or a loadable type of module), drvinstall will insert an INCLUDE statement for the driver in the system file.
SEE ALSO
cunix(1M), mkboot(1M), master(4), system(4)
DIAGNOSTICS
The major number assigned or found for a software driver is printed on stdout. A zero is returned for success and a non-zero is returned for failures.