configure(ADM) 19 June 1992 configure(ADM) Name configure - kernel configuration program Syntax cd /etc/conf/cf.d configure [ options ] [ resource=value ... ] Description The configure program determines and alters different kernel resources. For end users, using configure is easier than modifying the system con- figuration files directly. For device driver writers, configure avoids the difficulties of editing configuration files that have already been edited by an earlier driver configuration script. You must move to /etc/conf/cf.d to execute configure. Resources are modified interactively or with command-line arguments. Adding or deleting device driver components requires the command-line options. The next paragraphs discuss how to use configure interactively. Command-line options are discussed in the ``Options'' section. Before using configure to modify the system configuration files, use the following command to make a backup copy of the kernel: cp /unix /unix.old Interactive Usage configure operates interactively when no options (including resource=value) are given or when -f is the only option specified on the command line. When you invoke configure interactively, you first see a category menu similar to the following: _________________________________________________________________________ 1. Disk and Buffers 2. Character Buffers 3. Files, Inodes, and Filesystems 4. Processes, Memory Management and Swapping 5. Clock 6. MultiScreens 7. Message Queues 8. Semaphores 9. Shared Data 10. System Name 11. Streams Data 12. Event Queues and Devices 13. Hardware Dependent Parameters 14. Remote File sharing Parameters 15. Security Parameters Select a parameter category to reconfigure by typing a number from 1 to 15, or type 'q' to quit: _________________________________________________________________________ To choose a category, enter its number (for example, ``1'' for ``Disk and Buffers''), then press <Return>. Each category contains a number of configurable resources. Each resource is presented by displaying its name, a short description, and its current value. For example, for the ``Disk and Buffers'' category you might see: NBUF: total disk buffers. Currently determined at system start up: NSABUF: system-addressable (near) disk buffers. Currently 10: NHBUF: hash buffers (for disk block sorting). Currently 128: To keep the current value, simply press <Return>. Otherwise, enter an appropriate value for the resource, then press <Return>. configure checks each value to make sure that it is within an appropriate range. If it is not, configure warns you that the value is inappropriate and asks you to confirm that you want to override the recommended value. To exit from configure, enter q at the category menu prompt. If any changes are made, configure asks if it should update the configuration files with the changes. To keep the old configuration values, enter n at this prompt, and no changes are made. Otherwise, enter y and configure updates the required configuration files. After configure has completed, the kernel is ready for linking. To link the kernel, enter: cd /etc/conf/cf.d ./linkunix Linking may take a few minutes. After the kernel is linked, enter the following command to reboot the system to run the new kernel: /etc/shutdown Follow the prompts for shutting the system off. Next, you see the boot prompt: Boot : Press <Return>. The system is now running the new kernel. Options The command line options are designed for writers of driver-installation shell scripts. You can configure drivers, query driver configurations, remove driver definitions from the configuration files, and modify cer- tain driver attributes, plus query and alter kernel parameters, all from the command line. There are also options for querying the current driver configuration. configure uses the following options: -a [ func1 func2 ... ] -b -c -d [ func1 func2 ... ] -f masterfile [ dfile ] -g devname handler | devname -h devname -i -j [ prefix ] [ NEXTMAJOR ] -l prioritylevel -m majordevnumber -o -p -q -s -t -v interruptvector [ interruptvector2... ] -w -x -y resource -A address address -C channel -D -G -H -I address address -J address address -M maximum minimum -O -P -R -S -T interruptscheme -U numberofsubdevices -V interruptvector -X offset -Y -Z -m, -b, and -c These options are used to define which driver is being referenced. Following -m must be the major device number of the driver. If you are configuring a block driver, -b must appear; if you are configur- ing a character driver, -c must appear. Both are used when config- uring a driver with both kinds of interfaces. -s When adding or deleting a streams module, use this option with the -h option and instead of -m, -b, and -c. For a streams driver, use it with -m and -c. -a and -d Each option is followed by a list of functions to add or delete, respectively. These are the names of the functions that appear within bdevsw or cdevsw, as appropriate, plus the names of the ini- tialization, clock poll, halt, and interrupt routines, if present, plus the name of the tty structure pointer. configure enforces the rules that all of a driver's routines must have a common prefix, and that the prefix must be 2-4 characters long. -h This option is used to give the driver or streams module name when the name is different from the prefix or when no prefix is specified as in the case of the streams module. The name can be 1-8 charac- ters long. -i This option with -a or -d adds or deletes the characteristic that the device is a tty. The default is off. -j When followed by a prefix used by a driver, the major device number is displayed. When followed by the string NEXTMAJOR, the smallest unused major device number is displayed. -v This option modifies the system notion of the vectors on which this device can interrupt. -l This sets the interrupt priority level of the device, which is almost always the same as the type of spl call used: a driver that interlocks using spl5 almost always has an interrupt priority level of 5. Use of this option should not be required in new drivers. -f Much of the configuration data is maintained in two files, whose default names are mdevice and mtune. The -f option can be used to specify alternate names. Note that if -f is the only option present, the program is still interactive. -w When specifying a parameter value, this option works in the same way as the -o option, but suppresses all warning messages, when a param- eter is set outside the current maximum and minimum values. -o This is the override flag. When invoked non-interactively, this option overrides the minimum and maximum values that are otherwise enforced. This option has no effect on interactive commands. -p This option with -a or -d adds or deletes the characteristic that the device is a SCSI peripheral. Default is off. -q This option with -a or -d adds or deletes the characteristic that the device is a SCSI host adapter. Default is off. -x This dumps all the resource prompts known to configure. These reveal the name, description, and current value of each parameter capable of being reconfigured. Category prompts are not dumped. -y The -y option displays the current value of the requested parameter. -t This option displays nothing (except possibly error messages). How- ever, it has a return value of ``1'' if a driver corresponding to the given combination of -m, -b, -c options is already configured, and ``0'' if no such driver is present. -g This option is used to add or remove graphics input (GIN) device handlers. Devices such as mice, bitpads, and keyboards may have handlers to turn their input data into ``events''. The -g flag may be given one argument that is interpreted as a device name. That GIN device is removed from the configuration files. If the -g flag has two arguments, the second is a handler for that device, and the device is added to the files. If it was already present, its handler is updated and the user is informed. Multiple devices may be added or removed by specifying -g multiple times. -A This option, followed by two values that are taken to be hexadecimal I/O addresses, returns the name of the device with the I/O address conflict. -C Followed by an integer, this option used with -a indicates the DMA channel that the device uses. The default is not to use DMA. -D This option used with the -a option adds to the device driver the characteristic that the driver can share its DMA channel; -D used with the -d option deletes this characteristic. The default is not to share. -G This option with -a adds the ``G'' characteristic to the driver; -G with -d deletes the ``G'' characteristic. This characteristic indi- cates whether or not the device uses an interrupt, even though an interrupt is specified in the sdevice file. This is used when you want to associate a device to a specific device group. The default is not to set this characteristic. -H This option with -a or -d adds or deletes the characteristic that the driver supports hardware that distinguishes it from those that are entirely software (pseudo devices). The default is to set this characteristic. -I This option is followed by two values that are the hexadecimal start and end I/O addresses. The default values are zero. -J The option is followed by two values that are the hexadecimal start and end controller memory addresses. The default values are zero. -M This option followed by two integers states the maximum and minimum number of devices that can be specified in the sdevice file. The default is a maximum of 1 and a minimum of 0. -O This option with -a or-d indicates whether or not the IOA range of the device can overlap that of another device. The default is no. -P When used with -a or -d, adds or deletes an ignore ``I'' flag in the device mdevice entry. The ``I'' flag allows the configuration build utilities to ignore a devices pack.d directory (useful to the mpt/spt) driver. -R This option with -a or-d indicates whether or not the driver is required in the kernel all the time. The default is yes. -S This option with -a or -d indicates whether or not the driver has one sdevice entry only. The default is no. -T This option, when followed by an argument, states the type of inter- rupt scheme the device uses. The possible arguments are: 0 The device does not require an interrupt line. 1 The device requires an interrupt line. If the device supports more than one controller, each controller requires a separate interrupt. 2 The device requires an interrupt line. If the device supports more than one controller, the controllers share the same inter- rupt. 3 The device requires an interrupt line. If the device supports more than one controller, the controllers share the same inter- rupt. Multiple device drivers having the same interrupt prior- ity level can share this interrupt. The default is 0. -U This option, when followed by an integer, encodes a device-dependent numeric value in the sdevice file to indicate the number of subde- vices on a controller or a pseudo device. The integer must be a value that lies within the maximum and minimum number of devices specified in the mdevice file. The default is 1. -V This option, followed by a vector value, returns the name of the de- vice with the vector conflict. -Y This option with -a or -d indicates whether or not to configure a driver into the kernel. Specifying -a puts a ``Y'' in the configu- ration field of the driver's sdevice entry; specifying -d puts an ``N'' in this field. The default is to put a ``Y''. -X offset This option is used to add (-a) or delete (-d) an extended minor de- vice number entry from mdevice. The extended minor offset must be a multiple of 256. This option must be used in conjunction with -m, -b, or -c. -Z This option indicates that a device can have more than one entry in the mdevice file. The SCSI driver is an example of a driver that needs this feature. The option is usually used when adding a new entry or deleting a particular entry in the mdevice file. When an additional line is added, this option should also be run on the ori- ginal entry to set this characteristic in that entry. Using -d with -Z removes only the mdevice entry. Using -d without -Z removes the mdevice entry and the sdevice entry. Setting Command-Line Parameters Any number of arguments can be given on the command line of the form resource=value. These arguments can be given at the same time as an add or delete driver request, but must follow all the driver-configuration arguments on the command line. If one or more instances of resource=value are the only arguments on the command line, the changes are made non-interactively. If the values given are outside the permissible range for a parameter, no action is taken unless the -o or -w options are included to override them. Some resources have values that are character strings. In this case, their values must be enclosed within the characters \" . The quotes are syntactically necessary for them to be used as C-language strings, and the backslashes protect the quotes from being removed by the shell. Examples (Note: these examples are provided for illustrative purposes only. Do not attempt to follow them; the device numbers and vectors specified may already be in use on your system. If this is the case, an attempt to carry out these examples will result in unpredictable errors.) Print out the current value of NCLIST: configure -y NCLIST Return 1 if character major device 7 and vector 3 are already configured: configure -t -v 3 -m 7 -c Add a clock-time polling and initialization routine to the already con- figured ``foo'' driver, a hypothetical character driver at major device #99: configure -a foopoll fooinit -c -m 99 Delete the hypothetical ``foo'' driver: configure -m 99 -d -c Add a new ``hypo'' driver, a block driver with a character interface. It absorbs 3 different interrupt vectors, at priority 6: configure -a hypoopen hypoclose hyporead \ hypowrite hypoioctl hypostrategy hypoprint \ hypointr -b -c -l 6 -v 17 42 49 -m 99 Add a new streams module with prefix ``grb'' and name ``garble'': configure -s -a grbinit -h garble Files /etc/conf/cf.d/mdevice /etc/conf/cf.d/sdevice /etc/conf/cf.d/mtune /etc/conf/cf.d/stune /etc/conf/cf.d/mevent /etc/conf/cf.d/sevent See also linkunix(ADM), majorsinuse(ADM), mdevice(F), mtune(F), sdevice(F), stune(F), vectorsinuse(ADM), ``Tuning System Performance'' in the System Administrator's Guide Value added configure is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.