CONFIG(8) — MAINTENANCE COMMANDS
NAME
config − build system configuration files
SYNOPSIS
/usr/etc/config [ −fgnp ] [ −o obj_dir ] config_file
DESCRIPTION
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.
You use config as follows. Run config from the conf subdirectory of the system source. In a typical Solbourne environment, this is either /usr/kvm/sys/kbus/conf (for Series 4, 5, or 5E) or /usr/kvm/sys/idt/conf (for the S4000).
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; 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.
OPTIONS
−f Set up the makefile for fast builds. This is done by building a vmunix.o file which includes all the .o files which have no source. This reduces the number of files which have to be stated during a system build. This is done by prelinking all the files for which no source exists into another file which is then linked in place of all these files when the kernel is made. This makefile is faster because it does not stat the object files during the build.
−g Get the current version of a missing source file from its SCCS history, if possible.
−n Do not do the ‘make depend’. Normally config will do the ‘make depend’ automatically. If this option is used config will print ‘Don’t forget to do a "make depend"’ before completing as a reminder.
−p Configure the system for profiling (see kgmon(8) and gprof(1)).
−o obj_dir
Use ../obj_dir instead of ../OBJ as the directory to find the object files when the corresponding source file is not present in order to generate the files necessary to compile and link your kernel.
USAGE
Input Grammar
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:
machine "type"
This is system is to run on the machine type specified. Only one machine type can appear in the config file. Note: the double quotes around type are part of the syntax, and must be included.
cpu "type"
This system is to run on the cpu type specified. More than one cpu type can appear in the config file.
ncpus number
The maximum expected number of CPUs in the system.
ident name
Give the system identifier — a name for the machine or machines that run this kernel. Note that name must be enclosed in double quotes if it contains both letters and digits. Also, note that if name is GENERIC, you need not include the ‘options GENERIC’ clause in order to specify ‘swap generic’.
maxusers number
The maximum expected number of simultaneously active user on this system is number. This number is used to size several system data structures.
options optlist
Compile the listed options into the system. Options in this list are separated by commas. A line of the form:
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.
makeoptions optlist
Options in this list are added directly to the kernel makefile.
config sysname config_clauses...
Generate a system with name sysname and configuration as specified in config-clauses. The sysname is used to name the resultant binary image and per-system swap configuration files. The config_clauses indicate the location for the root file system, one or more disk partitions for swapping and paging, and a disk partition to which system dumps should be made. All but the root device specification may be omitted; config will assign default values as described below.
root A root device specification is of the form ‘root on sd0d’. If a specific partition is omitted — for example, if only root on sd0 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 To specify a swap partition, use a clause of the form: ‘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 sd0b 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
The location to which system dumps are sent may be specified with a clause of the form ‘dumps on sd1’. 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. 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, a SCSI RF 3500 Disk Controller at address 0x5000 in the VMEbus accress space). These lines have the following format:
dev_type dev_name at con_dev more_info
dev_type is either controller, disk, tape, device, or pseudo-device. These types have the following meanings:
controller A disk or tape controller.
disk or tape Devices connected to a controller.
device Something “attached” to the main system bus, like a cartridge tape interface.
pseudo-device A software subsystem or driver treated like a device driver, but without any associated hardware. Current examples are the pseudo-tty driver and various network subsystems. For pseudo-devices, more_info may be specified as an integer, that gives the value of the symbol defined in the header file created for that device, and is generally used to indicate the number of instances of the pseudo-device to create.
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, sr0 is the dev_name for the first SCSI controller in a system; st0 names the first quarter-inch 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 different possible bus types are:
kbmem On board memory
kbio I/O devices on the Kbus
kbslot Slot dependent devices on the Kbus
vme16d16 (vme16)
16 bit VMEbus/ 16 bit data
vme24d16 (vme24)
24 bit VMEbus/ 16 bit data
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 autoconfiguration 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 Kbus and VMEbus bus types are always wildcarded.
more_info is a sequence of the following:
csr address Specify the address of the csr (command and status registers) for a device. The csr addresses specified for the device are the addresses within the bus type specified.
The csr address must be specified for all controllers, and for all devices connected to a main system bus.
drive number For a disk or tape, specify which drive this is.
flags number These flags are made available to the device driver, and are usually read at system initialization time.
priority level For devices which interrupt, specify the interrupt level at which the device operates.
vector intr number [ intr number . . . ]
For devices which use vectored interrupts on VMEbus systems, intr specify the vectored interrupt routine and number the corresponding vector to be used (0x40-0xFF).
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.
FILES
Files in /usr/kvm/sys/type/conf are used for developing the config_file used by config. The type is either kbus (for Series 4, 5, and 5E) or idt (for the S4000).
GENERIC Generic configuration file for Solbourne systems, containing all possible device description lines for the particular architecture.
README File describing how to make a new kernel.
As shipped from Solbourne, the files used by /usr/etc/config as input are in the /usr/kvm/sys/type/conf directory:
config_file System-specific configuration file
Makefile.src Generic prototype makefile
files List of common files required to build a basic kernel
devices Name to major device mapping file
/usr/etc/config places its output files in the ../config_file directory:
ioconf.c Describes I/O devices attached to the system
param.c Controls system parameters
Makefile Used with make(1) to build the system
device_name.h a set of header files (various device_name’s) containing devices which can be compiled into the system
SEE ALSO
gprof(1), make(1), kgmon(8), savecore(8)
The SYNOPSIS portion of each device entry in Section 4 of this manual.
System and Network Administration
Solbourne Computer, Inc. — 2 February 1990