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