]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/usr.sbin/config/config.8
Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
[FreeBSD/FreeBSD.git] / 6 / usr.sbin / config / config.8
1 .\" Copyright (c) 1980, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
6 .\" are met:
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\"    notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\"    notice, this list of conditions and the following disclaimer in the
11 .\"    documentation and/or other materials provided with the distribution.
12 .\" 4. Neither the name of the University nor the names of its contributors
13 .\"    may be used to endorse or promote products derived from this software
14 .\"    without specific prior written permission.
15 .\"
16 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
17 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
20 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26 .\" SUCH DAMAGE.
27 .\"
28 .\"     @(#)config.8    8.2 (Berkeley) 4/19/94
29 .\" $FreeBSD$
30 .\"
31 .Dd December 16, 2004
32 .Dt CONFIG 8
33 .Os
34 .Sh NAME
35 .Nm config
36 .Nd build system configuration files
37 .Sh SYNOPSIS
38 .Nm
39 .Op Fl Vgp
40 .Op Fl d Ar destdir
41 .Ar SYSTEM_NAME
42 .Sh DESCRIPTION
43 .\" This is the old version of the
44 .\" .Nm
45 .\" utility.
46 .\" It understands the old autoconfiguration scheme
47 .\" used on the HP300, i386, DECstation, and derivative platforms.
48 .\" The new version of
49 .\" .Nm
50 .\" is used with the
51 .\" SPARC platform.
52 .\" Only the version of
53 .\" .Nm
54 .\" applicable to the architecture that you are running
55 .\" will be installed on your machine.
56 .\" .Pp
57 The
58 .Nm
59 utility builds a set of system configuration files from the file
60 .Ar SYSTEM_NAME
61 which describes
62 the system to configure.
63 A second file
64 tells
65 .Nm
66 what files are needed to generate a system and
67 can be augmented by configuration specific set of files
68 that give alternate files for a specific machine
69 (see the
70 .Sx FILES
71 section below).
72 .Pp
73 Available options and operands:
74 .Bl -tag -width ".Ar SYSTEM_NAME"
75 .It Fl V
76 Print the
77 .Nm
78 version number.
79 .It Fl d Ar destdir
80 Use
81 .Ar destdir
82 as the output directory, instead of the default one.
83 Note that
84 .Nm
85 does not append
86 .Ar SYSTEM_NAME
87 to the directory given.
88 .It Fl g
89 Configure a system for debugging.
90 .It Fl p
91 Configure a system for profiling; for example,
92 .Xr kgmon 8
93 and
94 .Xr gprof 1 .
95 If two or more
96 .Fl p
97 options are supplied,
98 .Nm
99 configures a system for high resolution profiling.
100 .It Ar SYSTEM_NAME
101 Specify the name of the system configuration file
102 containing device specifications, configuration options
103 and other system parameters for one system configuration.
104 .El
105 .Pp
106 The
107 .Nm
108 utility should be run from the
109 .Pa conf
110 subdirectory of the system source (usually
111 .Pa /sys/ Ns Va ARCH Ns Pa /conf ) ,
112 where
113 .Va ARCH
114 represents one of the architectures supported by
115 .Fx .
116 The
117 .Nm
118 utility creates the directory
119 .Pa ../compile/ Ns Ar SYSTEM_NAME
120 or the one given with the
121 .Fl d
122 option
123 as necessary and places all output files there.
124 The output of
125 .Nm
126 consists of a number of files; for the
127 .Tn i386 ,
128 they are:
129 .Pa Makefile ,
130 used by
131 .Xr make 1
132 in building the system;
133 header files,
134 definitions of
135 the number of various devices that will be compiled into the system.
136 .Pp
137 After running
138 .Nm ,
139 it is necessary to run
140 .Dq Li make depend
141 in the directory where the new makefile
142 was created.
143 The
144 .Nm
145 utility prints a reminder of this when it completes.
146 .Pp
147 If any other error messages are produced by
148 .Nm ,
149 the problems in the configuration file should be corrected and
150 .Nm
151 should be run again.
152 Attempts to compile a system that had configuration errors
153 are likely to fail.
154 .Pp
155 If the
156 .Cd "options INCLUDE_CONFIG_FILE"
157 is used in the configuration file the
158 entire input file is embedded in the new kernel.
159 This means that
160 .Xr strings 1
161 can be used to extract it from a kernel:
162 to extract the configuration information, use the command
163 .Pp
164 .Dl "strings -n 3 kernel | sed -n 's/^___//p'"
165 .Sh DEBUG KERNELS
166 Traditional
167 .Bx
168 kernels are compiled without symbols due to the heavy load on the
169 system when compiling a
170 .Dq debug
171 kernel.
172 A debug kernel contains complete symbols for all the source files, and
173 enables an experienced kernel programmer to analyse the cause of a problem.
174 The
175 debuggers available prior to
176 .Bx 4.4 Lite
177 were able to find some information
178 from a normal kernel;
179 .Xr gdb 1
180 provides very little support for normal kernels, and a debug kernel is needed
181 for any meaningful analysis.
182 .Pp
183 For reasons of history, time and space, building a debug kernel is not the
184 default with
185 .Fx :
186 a debug kernel takes up to 30% longer to build and
187 requires about 30 MB of disk storage in the build directory, compared to about 6
188 MB for a non-debug kernel.
189 A debug kernel is about 11 MB in size, compared to
190 about 2 MB for a non-debug kernel.
191 This space is used both in the root file
192 system and at run time in memory.
193 Use the
194 .Fl g
195 option to build a debug kernel.
196 With this option,
197 .Nm
198 causes two kernel files to be built in the kernel build directory:
199 .Bl -bullet
200 .It
201 .Pa kernel.debug
202 is the complete debug kernel.
203 .It
204 .Pa kernel
205 is a copy of the kernel with the debug symbols stripped off.
206 This is equivalent
207 to the normal non-debug kernel.
208 .El
209 .Pp
210 There is currently little sense in installing and booting from a debug kernel,
211 since the only tools available which use the symbols do not run on-line.
212 There
213 are therefore two options for installing a debug kernel:
214 .Bl -bullet
215 .It
216 .Dq Li "make install"
217 installs
218 .Pa kernel
219 in the root file system.
220 .It
221 .Dq Li "make install.debug"
222 installs
223 .Pa kernel.debug
224 in the root file system.
225 .El
226 .Sh FILES
227 .Bl -tag -width ".Pa /sys/ Ns Va ARCH Ns Pa /compile/ Ns Ar SYSTEM_NAME" -compact
228 .It Pa /sys/conf/files
229 list of common files system is built from
230 .It Pa /sys/conf/Makefile. Ns Va ARCH
231 generic makefile for the
232 .Va ARCH
233 .It Pa /sys/conf/files. Ns Va ARCH
234 list of
235 .Va ARCH
236 specific files
237 .It Pa /sys/ Ns Va ARCH Ns Pa /compile/ Ns Ar SYSTEM_NAME
238 default kernel build directory for system
239 .Ar SYSTEM_NAME
240 on
241 .Va ARCH .
242 .El
243 .Sh SEE ALSO
244 .Xr config 5
245 .Pp
246 The
247 .Sx SYNOPSIS
248 portion of each device in section 4.
249 .Rs
250 .%T "Building 4.3 BSD UNIX System with Config"
251 .Re
252 .Sh HISTORY
253 The
254 .Nm
255 utility appeared in
256 .Bx 4.1 .
257 .Sh BUGS
258 The line numbers reported in error messages are usually off by one.