CONFIGURE(ADM) UNIX System V
Name
configure - kernel configuration program
Syntax
/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 move to the /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
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 functions 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 that looks something like this:
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
Select a parameter category to reconfigure by typing a
number from 1 to 14, or type 'q' to quit:
To choose a category, enter its number (e.g., ``1'' for
``Disk Buffers''), then press Return.
Each category contains a number of configurable resources.
Each resource is presented by displaying its true name, a
short description, and its current value. For example, for
the ``Disk 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 not, configure warns you
that the value is inappropriate and will 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 system configuration files. After configure has
completed, the kernel is ready for linking.
To link the kernel, enter:
/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
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, remove driver definitions from the configuration
files, and modify some driver attributes, 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 master_file [ dfile ]
-g dev_name handler | dev_name
-h dev_name
-j [ prefix ] [ NEXTMAJOR ]
-l priority_level
-m major_dev_number
-o
-s
-t
-v interrupt_vector [ interrupt_vector2... ]
-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 interrupt_scheme
-U number_of_subdevices
-V interrupt_vector
-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 configuring a character driver, -c must
appear. Both are used when configuring 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 initialization, 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 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 characters long.
-j
When followed by a prefix used by a driver, the major device
number is displayed. When followed by NEXTMAJOR, the
smallest 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 in new
drivers is not recommended.
-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 suppresses
warning messages.
-o
This is the override flag. When invoked non-interactively,
this option overrides the minimum and maximum values that
are otherwise enforced. No warnings are given. This option
has no effect on interactive commands.
-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). However, it has a return value of 1 if a driver
corresponding to the given combination of -m, -b, -c and
options is already configured, and returns 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 indicates whether or not the device uses an
interrupt, even though an interrupt is specified in the
sdevice entry. 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 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
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
This option, followed by a vector value, returns the name of
the device 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 configuration field 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. 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 option is 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
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 configured ``foo'' driver, a hypothetical character
driver at major device #17:
configure -a foopoll fooinit -c -m 17
Delete the ``foo'' driver:
configure -m 17 -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 10
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
idconfig(ADM), link_unix(ADM), majorsinuse(ADM),
routines(ADM), vectorsinuse(ADM), mdevice(F), mtune(F),
sdevice(F), stune(F), event(M), ``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.
(printed 4/27/90) CONFIGURE(ADM)