DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

configure(ADM)


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 configuration 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 change directory 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 section discusses how to use configure interactively. Command line options are discussed in the ``Command line 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, select the parameter category that you want to reconfigure by entering its number.

Each category contains a number of configurable resources. Each resource is presented by displaying its name, a short description, and its current value. To keep the current value, enter <Return>. Otherwise, enter a value for the resource followed by <Return>.

configure checks each value to make sure that it is within the range defined in mtune(F). 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
./link_unix

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.

Command line options

The command line options are designed for writers of device driver installation shell scripts.

You can configure drivers, query driver configurations, remove driver definitions from the configuration files, and modify certain 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 ... ]

-d [ func1 func2 ... ]
Each option is followed by a list of functions to add or delete, respectively. These are the names of the functions that appear within the block and character device switch tables (bdevsw or cdevsw), plus the names of the initialization, clock poll, probe, 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.

-b

-c

-m major_dev_number
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 configuring a character driver, -c must appear. Both are used when configuring a driver with both kinds of interfaces.


-f master_file [ dfile ]
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.

-g dev_name handler | dev_name
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.

-h dev_name
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 characters long.

-i
This option with -a or -d adds or deletes the characteristic that the device is a tty. The default is off (that is, not to set the characteristic).

-j [ prefix ] [ NEXTMAJOR ]
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.

-l priority_level
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.

-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. The default is not to set this characteristic.

-q
This option with -a or -d adds or deletes the characteristic that the device is a SCSI host adapter. The default is not to set this characteristic.

-r
Rewrite data files whether they have changed or not.

-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.

-t
This option displays nothing (except possibly error messages). However, it has a return value of 1 if a driver corresponding to the given combination of -m, -b and -c options is already configured, and 0 if no such driver is present.

-v interrupt_vector [ interrupt_vector2 ... ]
This option modifies the system notion of the vectors on which this device can interrupt.

-w
When specifying a parameter value, this option works in the same way as the -o option, but suppresses all warning messages, when a parameter is set outside the current maximum and minimum values.

-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 resource
The -y option displays the current value of the requested parameter.

-A address address
This option, followed by the values of two hexadecimal I/O addresses, returns the name of the device with the I/O address conflict.

-C channel
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 indicates 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 physical hardware. This distinguishes it from other drivers that support software only (pseudo devices). The default is to set this characteristic.

-I address address
This option is followed by two values that are the hexadecimal start and end I/O addresses. The default values are zero.

-J address address
This option is followed by two values that are the hexadecimal start and end controller memory addresses. The default values are zero.

-M maximum minimum
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, this option 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.

-Q
Indicates whether the device has a device.dat file when used with option -a or -d.

-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 interrupt_scheme
This option, when followed by an argument, states the type of interrupt 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 interrupt.

3
The device requires an interrupt line. If the device supports more than one controller, the controllers share the same interrupt. Multiple device drivers having the same interrupt priority level can share this interrupt.

The default is 0.



-U number_of_subdevices
This option, when followed by an integer, encodes a device-dependent numeric value in the sdevice file to indicate the number of subdevices 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 interrupt_vector
This option, followed by a vector value, returns the name of the device with the vector conflict.

-X offset
This option is used to add (-a) or delete (-d) an extended minor device 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.

-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 configuration field (config) of the driver's sdevice entry; specifying -d puts an ``N'' in this field. The default is to put a ``Y''.

-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 original 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 option is included to override them.

Some resources have values that are character strings. In this case, their values must be enclosed within a pair of 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 the current value of the number of system buffers (NBUF):

configure -y NBUF

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 configured ``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

link_unix(ADM), majorsinuse(ADM), mdevice(F), mtune(F), sdevice(F), stune(F), vectorsinuse(ADM)

``Configuring kernel parameters'' in the Performance Guide

``Kernel parameters that you can change using configure'' in the Performance Guide

Standards conformance

configure is not part of any currently supported standard; it is an extension of AT&T System V provided by The Santa Cruz Operation, Inc.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003