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.
|
|
|
|
.\" 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-28 01:35:59 +00:00
|
|
|
.\" $FreeBSD$
|
1994-05-26 05:23:31 +00:00
|
|
|
.\"
|
2004-12-16 09:52:41 +00:00
|
|
|
.Dd December 16, 2004
|
1994-05-26 05:23:31 +00:00
|
|
|
.Dt CONFIG 8
|
2001-07-10 15:12:08 +00:00
|
|
|
.Os
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm config
|
|
|
|
.Nd build system configuration files
|
|
|
|
.Sh SYNOPSIS
|
2000-11-20 20:10:44 +00:00
|
|
|
.Nm
|
2005-08-10 06:36:44 +00:00
|
|
|
.Op Fl Vgp
|
1999-10-30 10:55:48 +00:00
|
|
|
.Op Fl d Ar destdir
|
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
|
2002-07-14 14:47:15 +00:00
|
|
|
utility.
|
1994-05-26 05:23:31 +00:00
|
|
|
It understands the old autoconfiguration scheme
|
1994-05-26 13:24:02 +00:00
|
|
|
used on the HP300, i386, DECstation, and derivative platforms.
|
2001-10-26 11:16:18 +00:00
|
|
|
The new version of
|
|
|
|
.Nm
|
|
|
|
is used with the
|
1994-05-26 13:24:02 +00:00
|
|
|
SPARC platform.
|
2001-07-15 08:06:20 +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
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
2000-12-11 10:14:58 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility builds a set of system configuration files from the file
|
1994-05-26 05:23:31 +00:00
|
|
|
.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:
|
2001-10-26 11:16:18 +00:00
|
|
|
.Bl -tag -width ".Ar SYSTEM_NAME"
|
2005-08-10 06:36:44 +00:00
|
|
|
.It Fl V
|
|
|
|
Print the
|
|
|
|
.Nm
|
|
|
|
version number.
|
1999-10-30 10:55:48 +00:00
|
|
|
.It Fl d Ar destdir
|
|
|
|
Use
|
|
|
|
.Ar destdir
|
2000-03-01 14:09:25 +00:00
|
|
|
as the output directory, instead of the default one.
|
2001-10-26 11:16:18 +00:00
|
|
|
Note that
|
|
|
|
.Nm
|
|
|
|
does not append
|
1999-10-30 10:55:48 +00:00
|
|
|
.Ar SYSTEM_NAME
|
|
|
|
to the directory given.
|
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.
|
1994-05-26 05:23:31 +00:00
|
|
|
.It Ar SYSTEM_NAME
|
2000-01-23 20:16:21 +00:00
|
|
|
Specify 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
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
2000-12-11 10:14:58 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility should be run from the
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pa conf
|
|
|
|
subdirectory of the system source (usually
|
2001-10-26 11:16:18 +00:00
|
|
|
.Pa /sys/ Ns Va ARCH Ns Pa /conf ) ,
|
1999-04-11 03:40:11 +00:00
|
|
|
where
|
2001-10-26 11:16:18 +00:00
|
|
|
.Va ARCH
|
2000-11-14 11:20:58 +00:00
|
|
|
represents one of the architectures supported by
|
|
|
|
.Fx .
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
2000-12-11 10:14:58 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility creates the directory
|
2001-10-26 11:16:18 +00:00
|
|
|
.Pa ../compile/ Ns Ar SYSTEM_NAME
|
1999-10-30 10:55:48 +00:00
|
|
|
or the one given with the
|
|
|
|
.Fl d
|
2001-07-15 08:06:20 +00:00
|
|
|
option
|
1999-10-30 10:55:48 +00:00
|
|
|
as necessary and places all output files there.
|
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 Makefile ,
|
|
|
|
used by
|
|
|
|
.Xr make 1
|
|
|
|
in building the system;
|
|
|
|
header files,
|
|
|
|
definitions of
|
2000-01-08 15:57:22 +00:00
|
|
|
the number of various devices that will be compiled into the system.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
|
|
|
After running
|
2002-08-13 16:07:28 +00:00
|
|
|
.Nm ,
|
1994-05-26 05:23:31 +00:00
|
|
|
it is necessary to run
|
|
|
|
.Dq Li make depend
|
|
|
|
in the directory where the new makefile
|
|
|
|
was created.
|
2002-07-14 14:47:15 +00:00
|
|
|
The
|
2000-12-11 10:14:58 +00:00
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility prints a reminder of this when it completes.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Pp
|
|
|
|
If any other error messages are produced by
|
2002-08-13 16:07:28 +00:00
|
|
|
.Nm ,
|
1994-05-26 05:23:31 +00:00
|
|
|
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
|
2001-10-26 11:16:18 +00:00
|
|
|
If the
|
|
|
|
.Cd "options INCLUDE_CONFIG_FILE"
|
|
|
|
is used in the configuration file the
|
|
|
|
entire input file is embedded in the new kernel.
|
|
|
|
This means that
|
1996-06-08 23:27:16 +00:00
|
|
|
.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
|
2001-10-26 11:16:18 +00:00
|
|
|
.Pp
|
2003-02-18 21:04:55 +00:00
|
|
|
.Dl "strings -n 3 kernel | sed -n 's/^___//p'"
|
1999-04-07 09:42:29 +00:00
|
|
|
.Sh DEBUG KERNELS
|
2001-08-14 10:01:54 +00:00
|
|
|
Traditional
|
|
|
|
.Bx
|
2003-04-20 13:11:11 +00:00
|
|
|
kernels are compiled without symbols due to the heavy load on the
|
1999-04-11 03:40:11 +00:00
|
|
|
system when compiling a
|
2000-11-10 17:46:15 +00:00
|
|
|
.Dq debug
|
2001-10-26 11:16:18 +00:00
|
|
|
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
|
2001-08-14 10:01:54 +00:00
|
|
|
debuggers available prior to
|
|
|
|
.Bx 4.4 Lite
|
|
|
|
were able to find some information
|
2001-07-15 08:06:20 +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
|
2000-11-14 11:20:58 +00:00
|
|
|
default with
|
|
|
|
.Fx :
|
|
|
|
a debug kernel takes up to 30% longer to build and
|
1999-04-11 03:40:11 +00:00
|
|
|
requires about 30 MB of disk storage in the build directory, compared to about 6
|
2001-10-26 11:16:18 +00:00
|
|
|
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
|
1999-04-11 03:40:11 +00:00
|
|
|
.Fl g
|
2001-10-26 11:16:18 +00:00
|
|
|
option to build a debug kernel.
|
|
|
|
With this option,
|
1999-04-11 03:40:11 +00:00
|
|
|
.Nm
|
|
|
|
causes two kernel files to be built in the kernel build directory:
|
|
|
|
.Bl -bullet
|
|
|
|
.It
|
2001-10-26 11:16:18 +00:00
|
|
|
.Pa kernel.debug
|
1999-04-11 03:40:11 +00:00
|
|
|
is the complete debug kernel.
|
|
|
|
.It
|
2001-10-26 11:16:18 +00:00
|
|
|
.Pa kernel
|
|
|
|
is a copy of the kernel with the debug symbols stripped off.
|
|
|
|
This is equivalent
|
1999-04-11 03:40:11 +00:00
|
|
|
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,
|
2001-10-26 11:16:18 +00:00
|
|
|
since the only tools available which use the symbols do not run on-line.
|
|
|
|
There
|
1999-04-07 09:42:29 +00:00
|
|
|
are therefore two options for installing a debug kernel:
|
|
|
|
.Bl -bullet
|
|
|
|
.It
|
2001-10-26 11:16:18 +00:00
|
|
|
.Dq Li "make install"
|
1999-04-11 03:40:11 +00:00
|
|
|
installs
|
2001-10-26 11:16:18 +00:00
|
|
|
.Pa kernel
|
2002-12-12 17:26:04 +00:00
|
|
|
in the root file system.
|
1999-04-07 09:42:29 +00:00
|
|
|
.It
|
2001-10-26 11:16:18 +00:00
|
|
|
.Dq Li "make install.debug"
|
1999-04-11 03:40:11 +00:00
|
|
|
installs
|
2001-10-26 11:16:18 +00:00
|
|
|
.Pa kernel.debug
|
2002-12-12 17:26:04 +00:00
|
|
|
in the root file system.
|
1999-04-07 09:42:29 +00:00
|
|
|
.El
|
1994-05-26 05:23:31 +00:00
|
|
|
.Sh FILES
|
2001-10-26 11:16:18 +00:00
|
|
|
.Bl -tag -width ".Pa /sys/ Ns Va ARCH Ns Pa /compile/ Ns Ar SYSTEM_NAME" -compact
|
1994-05-26 05:23:31 +00:00
|
|
|
.It Pa /sys/conf/files
|
|
|
|
list of common files system is built from
|
2001-10-26 11:16:18 +00:00
|
|
|
.It Pa /sys/conf/Makefile. Ns Va ARCH
|
|
|
|
generic makefile for the
|
|
|
|
.Va ARCH
|
|
|
|
.It Pa /sys/conf/files. Ns Va ARCH
|
1994-05-26 05:23:31 +00:00
|
|
|
list of
|
2001-10-26 11:16:18 +00:00
|
|
|
.Va ARCH
|
1994-05-26 05:23:31 +00:00
|
|
|
specific files
|
2001-10-26 11:16:18 +00:00
|
|
|
.It Pa /sys/ Ns Va ARCH Ns Pa /compile/ Ns Ar SYSTEM_NAME
|
1999-10-30 10:55:48 +00:00
|
|
|
default kernel build directory for system
|
2001-10-26 11:16:18 +00:00
|
|
|
.Ar SYSTEM_NAME
|
2001-07-04 18:48:50 +00:00
|
|
|
on
|
2001-10-26 11:16:18 +00:00
|
|
|
.Va ARCH .
|
1994-05-26 05:23:31 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
2003-08-06 21:41:35 +00:00
|
|
|
.Xr config 5
|
|
|
|
.Pp
|
2000-01-23 20:16:21 +00:00
|
|
|
The
|
|
|
|
.Sx SYNOPSIS
|
|
|
|
portion of each device in section 4.
|
1994-05-26 05:23:31 +00:00
|
|
|
.Rs
|
|
|
|
.%T "Building 4.3 BSD UNIX System with Config"
|
|
|
|
.Re
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2002-07-14 14:47:15 +00:00
|
|
|
utility appeared in
|
1994-05-26 05:23:31 +00:00
|
|
|
.Bx 4.1 .
|
2005-01-18 20:02:45 +00:00
|
|
|
.Sh BUGS
|
|
|
|
The line numbers reported in error messages are usually off by one.
|