config does the preparation necessary for building a new system kernel with make.1 The config_file named on the command line describes the kernel to be made in terms of options you want in your system, size of tables, and device drivers to be included. When you run config, it uses several input files located in the current directory (typically the conf subdirectory of the system source including your config_file). The format of this file is described below.
If the directory named ../config_file does not exist, config will create one. One of config's output files is a makefile which you use with make.1 to build your system.
config
must be run from the
conf
subdirectory of the system source
(in a typical Sun environment, from
/usr/share/sys/sun{3,3x,4,4c,4m}/conf):
example# /usr/etc/config config_file Doing a "make depend" example# cd ../config_file example# make ...lots of output...
While config is running watch for any errors. Never use a kernel which config has complained about; the results are unpredictable. If config completes successfully, you can change directory to the ../config_file directory, where it has placed the new makefile, and use make to build a kernel. The output files placed in this directory include ioconf.c, which contains a description of I/O devices attached to the system; mbglue.s, which contains short assembly language routines used for vectored interrupts, a makefile, which is used by make to build the system; a set of header files (device_name.h) which contain the number of various devices that may be compiled into the system; and a set of swap configuration files which contain definitions for the disk areas to be used for the root file system, swapping, and system dumps.
Now you can install your new kernel and try it out.
In the following descriptions, a number can be a decimal integer, a whole octal number or a whole hexadecimal number. Hex and octal numbers are specified to config in the same way they are specified to the C compiler, a number starting with 0x is a hex number and a number starting with just a 0 is an octal number.
Comments are begin with a # character, and end at the next NEWLINE. Lines beginning with TAB characters are considered continuations of the previous line. Lines of the configuration file can be one of two basic types. First, there are lines which describe general things about your system:
options FUNNY,HAHA
yields
-DFUNNY -DHAHA
to the C compiler. An option may be given a value, by following its name with = (equal sign) then the value enclosed in (double) quotes. None of the standard options use such a value.
In addition, options can be used to bring in additional files if the option is listed in the files files. All options should be listed in upper case. In this case, no corresponding option.h will be created as it would be using the corresponding pseudo-device method.
root on xy0d
If a specific partition is omitted -- for example, if only
root on xy0
is specified -- the `a' partition is assumed. When a generic system is being built, no root specification should be given; the root device will be defined at boot time by prompting the console.
swap on partition
Swapping areas may be almost any size. Partitions used for swapping are sized at boot time by the system; to override dynamic sizing of a swap area the number of sectors in the swap area can be specified in the config file. For example,
swap on xy0b size 99999
would configure a swap partition with 99999 sectors. If swap generic or no partition is specified with on, partition b on the root device is used. For dataless clients, use:
swap on type nfs
dumps on xy1
If no dump device is specified, the first swap partition specified is used. If a device is specified without a particular partition, the `b' partition is assumed. If a generic configuration is to be built, no dump device should be specified; the dump device will be assigned to the swap device dynamically configured at boot time. Dumps are placed at the end of the partition specified. Their size and location is recorded in global kernel variables dumpsize and dumplo, respectively, for use by savecore.8
Device names specified in configuration clauses are mapped to block device major numbers with the file devices.machine, where machine is the machine type previously specified in the configuration file. If a device name to block device major number mapping must be overridden, a device specification may be given in the form:
major x minor y
The second group of lines in the configuration file describe which devices your system has and what they are connected to (for example, an IPI Channel Adaptor on the VMEbus). These lines have the following format:
dev_type is either controller, disk, tape, device, device-driver, or pseudo-device. These types have the following meanings:
dev_name is the standard device name and unit number (if the device is not a pseudo-device) of the device you are specifying. For example, idc0 is the dev_name for the first IPI disk controller in a system; st0 names the first SCSI tape controller.
con_dev is what the device you are specifying is connected to. It is either nexus?, a bus type, or a controller. There are several bus types which are used by config and the kernel.
The possible bus types are:
All of these bus types are declared to be connected to
nexus.
The devices are hung off these buses. If the bus is
wildcarded, then the autoconfiguation code will determine
if it is appropriate to probe for the device on the
machine that it is running on. If the bus is numbered,
then the autoconfiguation code will only look for that
device on machine type
N.
In general, the
VMEbus
bus types are always wildcarded.
more_info is a sequence of the following:
The csr address must be specified for all controllers, and for all devices connected to a main system bus.
A ? may be substituted for a number in two places and the system will figure out what to fill in for the ? when it boots. You can put question marks on a con_dev (for example, at virtual `?'), or on a drive number (for example, drive `?'). This allows redundancy, as a single system can be built which will boot on different hardware configurations.
The easiest way to understand
config
files it to look at a working
one and modify it to suit your system.
Good examples are provided in
[a manual with the abbreviation INSTALL].
Desktop SPARCsystems' usage is a good deal simpler than what is described above, due primarily to information provided by the PROM monitor that obviates the specific descriptions of csr and vector values. There is no need to declare a nexus, or a controller: all primary controllers and main I/O units are simply described by the device-driver keyword. That is, a complete specification of all UART controllers (see zs.4s for a desktop SPARCsystem is done by declaring:
device-driver zs
An additional keyword has been introduced for desktop SPARCsystems to describe SCSI disks and tapes that may be resident on the system: scsibus. Its usage is:
scsibusN at device-driver
which declares that there exists a SCSI bus supported by a device-driver previously declared.
After specifying that there is a SCSI bus, you then can specify disks and tapes that may be connected to this SCSI bus. For example, the declaration
disk sd0 at scsibus0 target 3 lun 0
states that there may be a disk (in this example,
sd0)
attached to
scsibus0,
at
SCSI
Target
ID
3,
SCSI
Logical unit
0.
SPARCsystem 600MP series machines have a combination of both the common input grammar (described above in `Input Grammar'), and the desktop SPARCsystem grammar (described above in `Desktop SPARCsystem Input Grammar'). For VMEbus devices, such as IPI, the grammar is similar to the common grammar. For sbus devices, such as SCSI, the grammar is similar to that of desktop SPARCsystems.
Files in /usr/share/sys/sun{3,3x,4,4c,4m}/conf which may be useful for developing the config_file used by config are:
As shipped from Sun, the files used by /usr/etc/config as input are in the /usr/include/sys/conf directory:
/usr/etc/config places its output files in the ../config_file directory:
The SYNOPSIS portion of each device entry in Section 4 of this manual.
[a manual with the abbreviation INSTALL]
[a manual with the abbreviation ADMIN]
Created by unroff & hp-tools. © somebody (See intro for details). All Rights Reserved. Last modified 11/5/97