DOCUMENT ID:  1251-02

SYNOPSIS:     More explanation of add_drv function

OS RELEASE:   2.1, 2.3, 2.4

PRODUCT:      Solaris x86

KEYWORDS:     add_drv add driver


DESCRIPTION:

The add_drv function appears to be straight forward, however several
subtle points can cause mysterious results.  A command line "add_drv
drvx" appears to be the simplest form of the command.  Removing the
driver "bpp" using the line "rem_drv bpp" and adding it back using
"add_drv bpp" will not yield positive results.  The examples in the "man
page" display examples with optional parameters.  Some parameters are
not so optional.  Path names can also be a problem. 


SOLUTION:

Path requirements, knowledge of driver aliases, and several other
subtleties will be discussed. 

PATH

 The most common place to copy the driver is "/usr/kernel/drv". The next
 most common is "/kernel/drv". A custom path may be created as referenced
 in "writing device drivers". The custom path must be added to the "search"
 list in the file /etc/system. The add_drv function searches for the driver
 module first by the absolute path and next in the path "/usr/kernel/drv/".
 Using the function with a relative path i.e. "add_drv driver_name" requires
 the working directory be the "custom" or "/kernel/drv""
 Use the system call "modctl" with the parameter MODGETPATH to obtain other
 known paths to driver modules. The "-b option" determination of the path
 must be noted when detailing with disk clients.

ALIASES

 The "-i option" is usually required when the driver is referenced elsewhere
 by another name. This is the "bpp" case "SUNW,bpp". An invocation of 
 "sysdef -i | more " will sometimes yield an insight.

ADDITIONAL SUPPORTING FUNCTIONS

 Drvconfig is invoked for both server and client. The client invocation
 specifies a major number. The "server option" invokes "devlinks", "disks",
 "ports", and "tapes".


DATE APPROVED: 01/11/95