1994-05-26 05:23:31 +00:00
|
|
|
.\" Copyright (c) 1980, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
|
|
.\" must display the following acknowledgement:
|
|
|
|
.\" This product includes software developed by the University of
|
|
|
|
.\" California, Berkeley and its contributors.
|
|
|
|
.\" 4. Neither the name of the University nor the names of its contributors
|
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" @(#)config.8 8.2 (Berkeley) 4/19/94
|
1999-08-18 05:55:22 +00:00
|
|
|
.\" $Id: config.8,v 1.14 1999/07/12 20:12:05 nik Exp $
|
1994-05-26 05:23:31 +00:00
|
|
|
.\"
|
|
|
|
.Dd April 19, 1994
|
|
|
|
.Dt CONFIG 8
|
|
|
|
.Os BSD 4
|
|
|
|
.Sh NAME
|
|
|
|
.Nm config
|
|
|
|
.Nd build system configuration files
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm config
|
1999-04-11 03:40:11 +00:00
|
|
|
.Op Fl gpr
|
1994-05-26 13:24:02 +00:00
|
|
|
.Ar SYSTEM_NAME
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
This is the old version of the
|
1997-09-15 06:37:10 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
program.
|
|
|
|
It understands the old autoconfiguration scheme
|
1994-05-26 13:24:02 +00:00
|
|
|
used on the HP300, i386, DECstation, and derivative platforms.
|
1994-05-26 05:23:31 +00:00
|
|
|
The new version of config is used with the
|
1994-05-26 13:24:02 +00:00
|
|
|
SPARC platform.
|
1994-05-26 05:23:31 +00:00
|
|
|
Only the version of
|
1997-09-15 06:37:10 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
applicable to the architecture that you are running
|
|
|
|
will be installed on your machine.
|
|
|
|
.Pp
|
|
|
|
.Nm Config
|
|
|
|
builds a set of system configuration files from the file
|
|
|
|
.Ar SYSTEM_NAME
|
|
|
|
which describes
|
|
|
|
the system to configure.
|
|
|
|
A second file
|
|
|
|
tells
|
1997-09-15 06:37:10 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
what files are needed to generate a system and
|
|
|
|
can be augmented by configuration specific set of files
|
1997-09-15 06:37:10 +00:00
|
|
|
that give alternate files for a specific machine
|
1994-05-26 05:23:31 +00:00
|
|
|
(see the
|
|
|
|
.Sx FILES
|
1997-09-15 06:37:10 +00:00
|
|
|
section below).
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
1995-02-22 15:37:32 +00:00
|
|
|
Available options and operands:
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
|
|
|
.Bl -tag -width SYSTEM_NAME
|
1994-05-26 13:24:02 +00:00
|
|
|
.It Fl g
|
1999-04-11 03:40:11 +00:00
|
|
|
Configure a system for debugging.
|
1994-05-26 05:23:31 +00:00
|
|
|
.It Fl p
|
1997-09-15 06:37:10 +00:00
|
|
|
Configure a system for profiling; for example,
|
1994-05-26 05:23:31 +00:00
|
|
|
.Xr kgmon 8
|
|
|
|
and
|
|
|
|
.Xr gprof 1 .
|
1995-12-29 15:30:05 +00:00
|
|
|
If two or more
|
|
|
|
.Fl p
|
|
|
|
options are supplied,
|
1997-09-15 06:37:10 +00:00
|
|
|
.Nm
|
1999-04-07 09:42:29 +00:00
|
|
|
configures a system for high resolution profiling.
|
1998-02-18 04:15:04 +00:00
|
|
|
.It Fl r
|
|
|
|
Remove the old compile directory (see below).
|
1994-05-26 05:23:31 +00:00
|
|
|
.It Ar SYSTEM_NAME
|
1997-09-15 06:37:10 +00:00
|
|
|
Specifies the name of the system configuration file
|
1994-05-26 05:23:31 +00:00
|
|
|
containing device specifications, configuration options
|
|
|
|
and other system parameters for one system configuration.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
.Nm Config
|
|
|
|
should be run from the
|
|
|
|
.Pa conf
|
|
|
|
subdirectory of the system source (usually
|
1999-04-11 03:40:11 +00:00
|
|
|
.Pa /sys/ARCH/conf ) ,
|
|
|
|
where
|
|
|
|
.Pa ARCH
|
|
|
|
represents one of the architectures supported by FreeBSD.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Nm Config
|
1999-04-11 03:40:11 +00:00
|
|
|
creates the directory
|
1994-05-26 13:24:02 +00:00
|
|
|
.Pa ../../compile/SYSTEM_NAME
|
1995-02-22 15:37:32 +00:00
|
|
|
as necessary and place all output files there.
|
1998-02-18 04:15:04 +00:00
|
|
|
If the directory already exists and the
|
|
|
|
.Fl r
|
|
|
|
flag was specified, it will be removed first.
|
1994-05-26 05:23:31 +00:00
|
|
|
The output of
|
1997-09-15 06:37:10 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
consists of a number of files; for the
|
1994-05-26 13:24:02 +00:00
|
|
|
.Tn i386 ,
|
1994-05-26 05:23:31 +00:00
|
|
|
they are:
|
|
|
|
.Pa ioconf.c ,
|
|
|
|
a description
|
|
|
|
of what I/O devices are attached to the system;
|
1994-05-26 13:24:02 +00:00
|
|
|
.Pa vector.h ,
|
1994-08-18 05:11:32 +00:00
|
|
|
definitions of
|
|
|
|
macros related to counting interrupts;
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pa Makefile ,
|
|
|
|
used by
|
|
|
|
.Xr make 1
|
|
|
|
in building the system;
|
|
|
|
header files,
|
|
|
|
definitions of
|
|
|
|
the number of various devices that will be compiled into the system;
|
1997-09-07 10:35:17 +00:00
|
|
|
so-called swap configuration files,
|
1994-05-26 05:23:31 +00:00
|
|
|
definitions for
|
1997-09-07 10:35:17 +00:00
|
|
|
the disk areas to be used for the root file system
|
|
|
|
and system dumps.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
|
|
|
After running
|
|
|
|
.Nm config ,
|
|
|
|
it is necessary to run
|
|
|
|
.Dq Li make depend
|
|
|
|
in the directory where the new makefile
|
|
|
|
was created.
|
|
|
|
.Nm Config
|
|
|
|
prints a reminder of this when it completes.
|
|
|
|
.Pp
|
|
|
|
If any other error messages are produced by
|
|
|
|
.Nm config ,
|
|
|
|
the problems in the configuration file should be corrected and
|
1997-09-15 06:37:10 +00:00
|
|
|
.Nm
|
1994-05-26 05:23:31 +00:00
|
|
|
should be run again.
|
|
|
|
Attempts to compile a system that had configuration errors
|
|
|
|
are likely to fail.
|
1996-06-08 23:27:16 +00:00
|
|
|
.Pp
|
|
|
|
If the option "INCLUDE_CONFIG_FILE" is used in the configuration file the
|
|
|
|
entire input file is embedded in the new kernel. This means that
|
|
|
|
.Xr strings 1
|
1999-04-11 03:40:11 +00:00
|
|
|
can be used to extract it from a kernel:
|
|
|
|
to extract the configuration information, use the command
|
|
|
|
.Bd -literal
|
|
|
|
strings kernel | grep ___
|
|
|
|
.Ed
|
1999-04-07 09:42:29 +00:00
|
|
|
.Sh DEBUG KERNELS
|
1999-04-11 03:40:11 +00:00
|
|
|
Traditional BSD kernels compiled without symbols due to the heavy load on the
|
|
|
|
system when compiling a
|
1999-04-07 09:42:29 +00:00
|
|
|
.if n "debug"
|
|
|
|
.if t ``debug''
|
|
|
|
kernel. A debug kernel contains complete symbols for all the source files, and
|
|
|
|
enables an experienced kernel programmer to analyse the cause of a problem. The
|
|
|
|
debuggers available prior to 4.4BSD-Lite were able to find some information
|
1999-04-11 03:40:11 +00:00
|
|
|
from a normal kernel;
|
1999-08-18 05:55:22 +00:00
|
|
|
.Xr gdb 1
|
1999-04-11 03:40:11 +00:00
|
|
|
provides very little support for normal kernels, and a debug kernel is needed
|
|
|
|
for any meaningful analysis.
|
1999-04-07 09:42:29 +00:00
|
|
|
.Pp
|
1999-04-11 03:40:11 +00:00
|
|
|
For reasons of history, time and space, building a debug kernel is not the
|
|
|
|
default with FreeBSD: a debug kernel takes up to 30% longer to build and
|
|
|
|
requires about 30 MB of disk storage in the build directory, compared to about 6
|
|
|
|
MB for a non-debug kernel. A debug kernel is about 11 MB in size, compared to
|
|
|
|
about 2 MB for a non-debug kernel. This space is used both in the root file
|
|
|
|
system and at run time in memory. Use the
|
|
|
|
.Fl g
|
|
|
|
option to build a debug kernel. With this option,
|
|
|
|
.Nm
|
|
|
|
causes two kernel files to be built in the kernel build directory:
|
|
|
|
.Bl -bullet
|
|
|
|
.It
|
|
|
|
.Nm kernel.debug
|
|
|
|
is the complete debug kernel.
|
|
|
|
.It
|
|
|
|
.Nm kernel
|
|
|
|
is a copy of the kernel with the debug symbols stripped off. This is equivalent
|
|
|
|
to the normal non-debug kernel.
|
|
|
|
.El
|
1999-04-07 09:42:29 +00:00
|
|
|
.Pp
|
|
|
|
There is currently little sense in installing and booting from a debug kernel,
|
|
|
|
since the only tools available which use the symbols do not run on-line. There
|
|
|
|
are therefore two options for installing a debug kernel:
|
|
|
|
.Bl -bullet
|
|
|
|
.It
|
|
|
|
.Nm make
|
|
|
|
.Ar install
|
1999-04-11 03:40:11 +00:00
|
|
|
installs
|
|
|
|
.Nm kernel
|
|
|
|
in the root file system.
|
1999-04-07 09:42:29 +00:00
|
|
|
.It
|
|
|
|
.Nm make
|
|
|
|
.Ar install.debug
|
1999-04-11 03:40:11 +00:00
|
|
|
installs
|
|
|
|
.Nm kernel.debug
|
|
|
|
in the root file system.
|
1999-04-07 09:42:29 +00:00
|
|
|
.El
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh FILES
|
1994-05-26 13:24:02 +00:00
|
|
|
.Bl -tag -width /sys/i386/conf/Makefile.i386 -compact
|
1994-05-26 05:23:31 +00:00
|
|
|
.It Pa /sys/conf/files
|
|
|
|
list of common files system is built from
|
1994-05-26 13:24:02 +00:00
|
|
|
.It Pa /sys/i386/conf/Makefile.i386
|
|
|
|
generic makefile for the
|
|
|
|
.Tn i386
|
|
|
|
.It Pa /sys/i386/conf/files.i386
|
1994-05-26 05:23:31 +00:00
|
|
|
list of
|
1994-05-26 13:24:02 +00:00
|
|
|
.Tn i386
|
1994-05-26 05:23:31 +00:00
|
|
|
specific files
|
1994-05-26 13:24:02 +00:00
|
|
|
.It Pa /sys/i386/conf/devices.i386
|
1994-05-26 05:23:31 +00:00
|
|
|
name to major device mapping file for the
|
1994-05-26 13:24:02 +00:00
|
|
|
.Tn i386
|
|
|
|
.It Pa /sys/i386/conf/files. Ns Em ERNIE
|
1994-05-26 05:23:31 +00:00
|
|
|
list of files specific to
|
|
|
|
.Em ERNIE
|
|
|
|
system
|
1999-04-11 03:40:11 +00:00
|
|
|
.It Pa /sys/compile/SYSTEM_NAME
|
|
|
|
kernel build directory for system
|
|
|
|
.Pa SYSTEM_NAME .
|
1994-05-26 05:23:31 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
The SYNOPSIS portion of each device in section 4.
|
|
|
|
.Rs
|
|
|
|
.%T "Building 4.3 BSD UNIX System with Config"
|
|
|
|
.Re
|
|
|
|
.Sh BUGS
|
|
|
|
The line numbers reported in error messages are usually off by one.
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command appeared in
|
|
|
|
.Bx 4.1 .
|