2003-07-06 01:52:26 +00:00
|
|
|
.\" Copyright (c) 2003 Joseph Koshy
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR 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 AUTHOR 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.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2021-10-28 18:15:08 +00:00
|
|
|
.Dd October 28, 2021
|
2003-07-06 01:52:26 +00:00
|
|
|
.Dt CONFIG 5
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm config
|
|
|
|
.Nd kernel configuration file format
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
A kernel configuration file specifies the configuration of a
|
|
|
|
.Fx
|
|
|
|
kernel.
|
|
|
|
It is processed by
|
|
|
|
.Xr config 8
|
|
|
|
to create a build environment where a kernel may be built using
|
|
|
|
.Xr make 1 .
|
|
|
|
.Ss Lexical Structure
|
|
|
|
A kernel configuration file comprises a sequence of specification
|
|
|
|
directives.
|
|
|
|
.Pp
|
|
|
|
A specification directive starts with a keyword at the beginning
|
|
|
|
of the line and is followed by additional parameters.
|
|
|
|
.Pp
|
|
|
|
A specification directive may be terminated by a semicolon
|
|
|
|
.Ql \&;
|
|
|
|
or by a newline.
|
|
|
|
Long input lines may be broken into shorter lines by starting the
|
|
|
|
second and subsequent lines with a white space character.
|
|
|
|
.Pp
|
|
|
|
Case is significant,
|
|
|
|
.Dq Li machine
|
|
|
|
and
|
|
|
|
.Dq Li MACHINE
|
|
|
|
are different tokens.
|
|
|
|
.Pp
|
|
|
|
A double quote character
|
|
|
|
.Ql \[dq]
|
|
|
|
starts a quoted string.
|
|
|
|
All characters up to the next quote character form the value
|
|
|
|
of the quoted string.
|
|
|
|
A
|
|
|
|
.Ql \[dq]
|
|
|
|
character may be inserted into a quoted string by
|
|
|
|
using the sequence
|
|
|
|
.Ql \e\[dq] .
|
|
|
|
.Pp
|
|
|
|
Numbers are specified using
|
|
|
|
.Tn C Ns -style
|
|
|
|
syntax.
|
|
|
|
.Pp
|
|
|
|
A
|
|
|
|
.Ql #
|
|
|
|
character starts a comment; all characters from the
|
|
|
|
.Ql #
|
|
|
|
character till the end of the current line are ignored.
|
|
|
|
.Pp
|
|
|
|
Whitespace between tokens is ignored, except inside quoted strings.
|
|
|
|
Whitespace following a comment line is ignored.
|
|
|
|
.Ss Configuration Directives
|
|
|
|
Kernel configuration directives may appear in any order
|
|
|
|
in a kernel configuration file.
|
|
|
|
Directives are processed in order of appearance with subsequent
|
|
|
|
directive lines overriding the effect of prior ones.
|
|
|
|
.Pp
|
|
|
|
The list of keywords and their meanings are as follows:
|
2010-10-09 11:43:00 +00:00
|
|
|
.Pp
|
2005-12-03 20:07:32 +00:00
|
|
|
.Bl -tag -width indent -compact
|
2003-07-06 01:52:26 +00:00
|
|
|
.\" -------- CPU --------
|
|
|
|
.It Ic cpu Ar cputype
|
|
|
|
Specify the CPU this kernel will run on.
|
|
|
|
There can be more than one
|
|
|
|
.Ic cpu
|
|
|
|
directive in a configuration file.
|
|
|
|
The allowed list of CPU names is architecture specific and is
|
|
|
|
defined in the file
|
2020-12-19 13:11:44 +00:00
|
|
|
.Pa sys/conf/options . Ns Aq Ar arch .
|
2003-07-06 01:52:26 +00:00
|
|
|
.\" -------- DEVICE --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2005-02-10 14:26:21 +00:00
|
|
|
.It Ic device Ar name Op , Ar name Op ...
|
|
|
|
.It Ic devices Ar name Op , Ar name Op ...
|
|
|
|
Configures the specified devices
|
2003-07-06 01:52:26 +00:00
|
|
|
for inclusion into the kernel image.
|
|
|
|
Devices that are common to all architectures are
|
|
|
|
defined in the file
|
|
|
|
.Pa sys/conf/files .
|
|
|
|
Devices that are specific to architecture
|
|
|
|
.Ar arch
|
|
|
|
are defined in the file
|
2020-12-19 13:11:44 +00:00
|
|
|
.Pa sys/conf/files . Ns Aq Ar arch .
|
2003-07-06 01:52:26 +00:00
|
|
|
.\" -------- ENV --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Ic env Ar filename
|
|
|
|
Specifies a filename containing a kernel environment definition.
|
kern_environment: use any provided environments, evict hintmode/envmode
At the moment, hintmode and envmode are used to indicate whether static
hints or static env have been provided in the kernel config(5) and the
static versions are mutually exclusive with loader(8)-provided environment.
hintmode *can* be reconfigured later to pull from the dynamic environment,
thus taking advantage of the loader(8) or post-kmem environment setting.
This changeset fixes both problems at once to move us from a semi-confusing
state to a consistent state: if an environment file, hints file, or
loader(8) environment are provided, we use them in a well-known order of
precedence:
- loader(8) environment
- static environment
- static hints file
Once the dynamic environment is setup this becomes a moot point. The
loader(8) and static environments are merged (respecting the above order of
precedence), and the static hints are merged in on an as-needed basis after
the dynamic environment has been setup.
Hints lookup are changed to respect all of the above. Before the dynamic
environment is setup, lookups use the above-mentioned order and fallback to
the next environment if a matching hint is not found. Once the dynamic
environment is setup, that is used on its own since it captures all of the
above information plus any dynamic kenv settings that came up later in boot.
The following tangentially related changes were made to res_find:
- A hintp cookie is now passed in so that related searches continue using
the chain of environments (or dynamic environment) without relying on
global state
- All three environments will be searched if they actually have valid hints
to use, rather than just choosing the first environment that actually had
a hint and rolling with that only
The hintmode sysctl has been ripped out. static_{env,hints}.disabled are
still honored and will disable their respective environments from being used
for hint lookups and from being merged into the dynamic environment, as
expected.
MFC after: 1 month (maybe)
Differential Revision: https://reviews.freebsd.org/D15953
2018-07-05 16:30:32 +00:00
|
|
|
.Pp
|
|
|
|
The kernel will augment this compiled-in environment with the environment
|
|
|
|
prepared for it at boot time by
|
2003-07-06 01:52:26 +00:00
|
|
|
.Xr loader 8 .
|
kern_environment: use any provided environments, evict hintmode/envmode
At the moment, hintmode and envmode are used to indicate whether static
hints or static env have been provided in the kernel config(5) and the
static versions are mutually exclusive with loader(8)-provided environment.
hintmode *can* be reconfigured later to pull from the dynamic environment,
thus taking advantage of the loader(8) or post-kmem environment setting.
This changeset fixes both problems at once to move us from a semi-confusing
state to a consistent state: if an environment file, hints file, or
loader(8) environment are provided, we use them in a well-known order of
precedence:
- loader(8) environment
- static environment
- static hints file
Once the dynamic environment is setup this becomes a moot point. The
loader(8) and static environments are merged (respecting the above order of
precedence), and the static hints are merged in on an as-needed basis after
the dynamic environment has been setup.
Hints lookup are changed to respect all of the above. Before the dynamic
environment is setup, lookups use the above-mentioned order and fallback to
the next environment if a matching hint is not found. Once the dynamic
environment is setup, that is used on its own since it captures all of the
above information plus any dynamic kenv settings that came up later in boot.
The following tangentially related changes were made to res_find:
- A hintp cookie is now passed in so that related searches continue using
the chain of environments (or dynamic environment) without relying on
global state
- All three environments will be searched if they actually have valid hints
to use, rather than just choosing the first environment that actually had
a hint and rolling with that only
The hintmode sysctl has been ripped out. static_{env,hints}.disabled are
still honored and will disable their respective environments from being used
for hint lookups and from being merged into the dynamic environment, as
expected.
MFC after: 1 month (maybe)
Differential Revision: https://reviews.freebsd.org/D15953
2018-07-05 16:30:32 +00:00
|
|
|
Environment variables specified in the
|
|
|
|
.Xr loader 8
|
|
|
|
environment will take precedence over environment variables specified in
|
|
|
|
.Ar filename ,
|
|
|
|
and environment variables specified in the dynamic environment take precedence
|
|
|
|
over both of these.
|
|
|
|
.Pp
|
2018-07-12 02:51:50 +00:00
|
|
|
.Va loader_env.disabled=1
|
|
|
|
may be specified in the static environment to disable the
|
|
|
|
.Xr loader 8
|
|
|
|
environment.
|
|
|
|
Disabling the
|
|
|
|
.Xr loader 8
|
|
|
|
should be done with caution and due consideration for whether or not it supplies
|
|
|
|
environment variables needed for properly booting the system.
|
|
|
|
.Pp
|
kern_environment: use any provided environments, evict hintmode/envmode
At the moment, hintmode and envmode are used to indicate whether static
hints or static env have been provided in the kernel config(5) and the
static versions are mutually exclusive with loader(8)-provided environment.
hintmode *can* be reconfigured later to pull from the dynamic environment,
thus taking advantage of the loader(8) or post-kmem environment setting.
This changeset fixes both problems at once to move us from a semi-confusing
state to a consistent state: if an environment file, hints file, or
loader(8) environment are provided, we use them in a well-known order of
precedence:
- loader(8) environment
- static environment
- static hints file
Once the dynamic environment is setup this becomes a moot point. The
loader(8) and static environments are merged (respecting the above order of
precedence), and the static hints are merged in on an as-needed basis after
the dynamic environment has been setup.
Hints lookup are changed to respect all of the above. Before the dynamic
environment is setup, lookups use the above-mentioned order and fallback to
the next environment if a matching hint is not found. Once the dynamic
environment is setup, that is used on its own since it captures all of the
above information plus any dynamic kenv settings that came up later in boot.
The following tangentially related changes were made to res_find:
- A hintp cookie is now passed in so that related searches continue using
the chain of environments (or dynamic environment) without relying on
global state
- All three environments will be searched if they actually have valid hints
to use, rather than just choosing the first environment that actually had
a hint and rolling with that only
The hintmode sysctl has been ripped out. static_{env,hints}.disabled are
still honored and will disable their respective environments from being used
for hint lookups and from being merged into the dynamic environment, as
expected.
MFC after: 1 month (maybe)
Differential Revision: https://reviews.freebsd.org/D15953
2018-07-05 16:30:32 +00:00
|
|
|
.Va static_env.disabled=1
|
|
|
|
may be specified in the
|
|
|
|
.Xr loader 8
|
2018-07-12 02:51:50 +00:00
|
|
|
environment to disable use of the static environment.
|
kern_environment: use any provided environments, evict hintmode/envmode
At the moment, hintmode and envmode are used to indicate whether static
hints or static env have been provided in the kernel config(5) and the
static versions are mutually exclusive with loader(8)-provided environment.
hintmode *can* be reconfigured later to pull from the dynamic environment,
thus taking advantage of the loader(8) or post-kmem environment setting.
This changeset fixes both problems at once to move us from a semi-confusing
state to a consistent state: if an environment file, hints file, or
loader(8) environment are provided, we use them in a well-known order of
precedence:
- loader(8) environment
- static environment
- static hints file
Once the dynamic environment is setup this becomes a moot point. The
loader(8) and static environments are merged (respecting the above order of
precedence), and the static hints are merged in on an as-needed basis after
the dynamic environment has been setup.
Hints lookup are changed to respect all of the above. Before the dynamic
environment is setup, lookups use the above-mentioned order and fallback to
the next environment if a matching hint is not found. Once the dynamic
environment is setup, that is used on its own since it captures all of the
above information plus any dynamic kenv settings that came up later in boot.
The following tangentially related changes were made to res_find:
- A hintp cookie is now passed in so that related searches continue using
the chain of environments (or dynamic environment) without relying on
global state
- All three environments will be searched if they actually have valid hints
to use, rather than just choosing the first environment that actually had
a hint and rolling with that only
The hintmode sysctl has been ripped out. static_{env,hints}.disabled are
still honored and will disable their respective environments from being used
for hint lookups and from being merged into the dynamic environment, as
expected.
MFC after: 1 month (maybe)
Differential Revision: https://reviews.freebsd.org/D15953
2018-07-05 16:30:32 +00:00
|
|
|
This option has no effect if specified in any environment after the
|
|
|
|
.Xr loader 8
|
|
|
|
environment is processed.
|
2018-07-12 02:51:50 +00:00
|
|
|
This option is not usable in conjunction with
|
|
|
|
.Va loader_env.disabled .
|
2003-07-06 01:52:26 +00:00
|
|
|
.Pp
|
|
|
|
This directive is useful for setting kernel tunables in
|
|
|
|
embedded environments that do not start from
|
|
|
|
.Xr loader 8 .
|
2018-06-26 03:56:10 +00:00
|
|
|
.Pp
|
|
|
|
All
|
|
|
|
.Ic env
|
|
|
|
and
|
|
|
|
.Ic envvar
|
2018-06-26 04:02:25 +00:00
|
|
|
directives will be processed and added to the static environment in reversed
|
|
|
|
order of appearance so that later specified variables properly override earlier
|
|
|
|
specified variables.
|
2018-06-26 03:56:10 +00:00
|
|
|
Note that within
|
|
|
|
.Ar filename ,
|
|
|
|
the first appearance of a given variable will be the first one seen by the
|
|
|
|
kernel, effectively shadowing any later appearances of the same variable within
|
|
|
|
.Ar filename .
|
2018-06-25 17:17:47 +00:00
|
|
|
.\" -------- ENVVAR --------
|
|
|
|
.Pp
|
|
|
|
.It Ic envvar Ar setting
|
|
|
|
Specifies an individual environment setting to be added to the kernel's
|
|
|
|
compiled-in environment.
|
|
|
|
.Ar setting
|
|
|
|
must be of the form
|
|
|
|
.Dq Va name=value .
|
|
|
|
Optional quotes are supported in both name and value.
|
2018-06-26 03:56:10 +00:00
|
|
|
.Pp
|
|
|
|
All
|
2018-06-25 17:17:47 +00:00
|
|
|
.Ic env
|
2018-06-26 03:56:10 +00:00
|
|
|
and
|
|
|
|
.Ic envvar
|
2018-06-26 04:02:25 +00:00
|
|
|
directives will be processed and added to the static environment in reversed
|
|
|
|
order of appearance so that later specified variables properly override earlier
|
|
|
|
specified variables.
|
2004-05-13 21:55:53 +00:00
|
|
|
.\" -------- FILES --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2004-05-13 21:55:53 +00:00
|
|
|
.It Ic files Ar filename
|
|
|
|
Specifies a file containing a list of files specific to that kernel
|
2004-06-16 08:33:57 +00:00
|
|
|
configuration file (a la
|
2020-12-19 13:11:44 +00:00
|
|
|
.Pa files . Ns Aq Ar arch ) .
|
2003-07-06 01:52:26 +00:00
|
|
|
.\" -------- HINTS --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Ic hints Ar filename
|
|
|
|
Specifies a file to load a static device configuration specification
|
|
|
|
from.
|
|
|
|
From
|
|
|
|
.Fx 5.0
|
|
|
|
onwards, the kernel reads the system's device configuration at boot
|
|
|
|
time (see
|
|
|
|
.Xr device.hints 5 ) .
|
|
|
|
This directive configures the kernel to use the static device configuration
|
|
|
|
listed in
|
kern_environment: use any provided environments, evict hintmode/envmode
At the moment, hintmode and envmode are used to indicate whether static
hints or static env have been provided in the kernel config(5) and the
static versions are mutually exclusive with loader(8)-provided environment.
hintmode *can* be reconfigured later to pull from the dynamic environment,
thus taking advantage of the loader(8) or post-kmem environment setting.
This changeset fixes both problems at once to move us from a semi-confusing
state to a consistent state: if an environment file, hints file, or
loader(8) environment are provided, we use them in a well-known order of
precedence:
- loader(8) environment
- static environment
- static hints file
Once the dynamic environment is setup this becomes a moot point. The
loader(8) and static environments are merged (respecting the above order of
precedence), and the static hints are merged in on an as-needed basis after
the dynamic environment has been setup.
Hints lookup are changed to respect all of the above. Before the dynamic
environment is setup, lookups use the above-mentioned order and fallback to
the next environment if a matching hint is not found. Once the dynamic
environment is setup, that is used on its own since it captures all of the
above information plus any dynamic kenv settings that came up later in boot.
The following tangentially related changes were made to res_find:
- A hintp cookie is now passed in so that related searches continue using
the chain of environments (or dynamic environment) without relying on
global state
- All three environments will be searched if they actually have valid hints
to use, rather than just choosing the first environment that actually had
a hint and rolling with that only
The hintmode sysctl has been ripped out. static_{env,hints}.disabled are
still honored and will disable their respective environments from being used
for hint lookups and from being merged into the dynamic environment, as
expected.
MFC after: 1 month (maybe)
Differential Revision: https://reviews.freebsd.org/D15953
2018-07-05 16:30:32 +00:00
|
|
|
.Ar filename .
|
|
|
|
.Pp
|
|
|
|
Hints provided in this static device configuration will be overwritten in the
|
|
|
|
order in which they're encountered.
|
|
|
|
Hints in the compiled-in environment takes precedence over compiled-in hints,
|
|
|
|
and hints in the environment prepared for the kernel by
|
|
|
|
.Xr loader 8
|
|
|
|
takes precedence over hints in the compiled-in environment.
|
|
|
|
.Pp
|
|
|
|
Once the dynamic environment becomes available, all compiled-in hints will be
|
|
|
|
added to the dynamic environment if they do not already have an override in
|
|
|
|
the dynamic environment.
|
|
|
|
The dynamic environment will then be used for all searches of hints.
|
|
|
|
.Pp
|
|
|
|
.Va static_hints.disabled=1
|
|
|
|
may be specified in either a compiled-in environment or the
|
|
|
|
.Xr loader 8
|
|
|
|
environment to disable use of these hints files.
|
|
|
|
This option has no effect if specified in any environment after the
|
|
|
|
.Xr loader 8
|
|
|
|
environment is processed.
|
|
|
|
.Pp
|
2003-07-06 01:52:26 +00:00
|
|
|
The file
|
|
|
|
.Ar filename
|
|
|
|
must conform to the syntax specified by
|
|
|
|
.Xr device.hints 5 .
|
2006-10-24 00:44:40 +00:00
|
|
|
Multiple hints lines are allowed.
|
2018-06-26 04:02:25 +00:00
|
|
|
The resulting hints will be the files concatenated in reverse order of
|
|
|
|
appearance so that hints in later files properly override hints in earlier
|
|
|
|
files.
|
2003-07-06 01:52:26 +00:00
|
|
|
.\" -------- IDENT --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Ic ident Ar name
|
|
|
|
Set the kernel name to
|
|
|
|
.Ar name .
|
|
|
|
At least one
|
|
|
|
.Ic ident
|
|
|
|
directive is required.
|
|
|
|
.\" -------- INCLUDE --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Ic include Ar filename
|
|
|
|
Read subsequent text from file
|
|
|
|
.Ar filename
|
|
|
|
and return to the current file after
|
|
|
|
.Ar filename
|
|
|
|
is successfully processed.
|
|
|
|
.\" -------- MACHINE --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2006-10-24 00:44:40 +00:00
|
|
|
.It Ic machine Ar arch Op Ar cpuarch
|
2003-07-06 01:52:26 +00:00
|
|
|
Specifies the architecture of the machine the kernel is being
|
|
|
|
compiled for.
|
|
|
|
Legal values for
|
|
|
|
.Ar arch
|
|
|
|
include:
|
|
|
|
.Pp
|
|
|
|
.Bl -tag -width ".Cm powerpc" -compact
|
2020-02-10 17:16:54 +00:00
|
|
|
.It Cm arm64
|
|
|
|
The 64-bit ARM application architecture.
|
2006-10-24 00:44:40 +00:00
|
|
|
.It Cm arm
|
2020-02-10 17:16:54 +00:00
|
|
|
The ARM architecture
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Cm amd64
|
|
|
|
The AMD x86-64 architecture.
|
|
|
|
.It Cm i386
|
|
|
|
The Intel x86 based PC architecture.
|
2006-10-24 00:44:40 +00:00
|
|
|
.It Cm mips
|
|
|
|
The MIPS architecture.
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Cm powerpc
|
|
|
|
The IBM PowerPC architecture.
|
2020-02-10 17:16:54 +00:00
|
|
|
.It Cm riscv
|
|
|
|
The RISC-V architecture.
|
2003-07-06 01:52:26 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
2006-02-12 07:56:11 +00:00
|
|
|
If argument
|
2006-10-24 00:44:40 +00:00
|
|
|
.Ar cpuarch
|
2006-02-12 07:56:11 +00:00
|
|
|
is specified, it points
|
|
|
|
.Xr config 8
|
2006-10-24 00:44:40 +00:00
|
|
|
to the cpu architecture of the machine.
|
|
|
|
When
|
|
|
|
.Ar cpuarch
|
|
|
|
is not specified, it is assumed to be the same as
|
|
|
|
.Ar arch .
|
2010-10-09 11:43:00 +00:00
|
|
|
.Ar arch
|
2006-10-24 00:44:40 +00:00
|
|
|
corresponds to MACHINE.
|
2010-10-09 11:43:00 +00:00
|
|
|
.Ar cpuarch
|
2006-10-24 00:44:40 +00:00
|
|
|
corresponds to MACHINE_ARCH.
|
2006-02-12 07:56:11 +00:00
|
|
|
.Pp
|
2003-07-06 01:52:26 +00:00
|
|
|
A kernel configuration file may have only one
|
|
|
|
.Ic machine
|
2020-02-23 23:36:56 +00:00
|
|
|
directive, unless the second one matches the
|
|
|
|
machine argument in the first one exactly.
|
2003-07-06 01:52:26 +00:00
|
|
|
.\" -------- MAKEOPTION --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
|
|
|
.It Ic makeoption Ar options
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Ic makeoptions Ar options
|
|
|
|
Add
|
|
|
|
.Ar options
|
|
|
|
to the generated makefile.
|
|
|
|
.Pp
|
|
|
|
The
|
|
|
|
.Ar options
|
|
|
|
argument is a comma separated list of one or more option
|
|
|
|
specifications.
|
|
|
|
Each option specification has the form
|
|
|
|
.Pp
|
|
|
|
.D1 Ar MakeVariableName Ns Op = Ns Ar Value
|
2008-11-22 21:12:47 +00:00
|
|
|
.D1 Ar MakeVariableName Ns += Ns Ar Value
|
2003-07-06 01:52:26 +00:00
|
|
|
.Pp
|
|
|
|
and results in the appropriate
|
|
|
|
.Xr make 1
|
|
|
|
variable definition being inserted into the generated makefile.
|
|
|
|
If only the name of the
|
|
|
|
.Xr make 1
|
|
|
|
variable is specified,
|
|
|
|
.Ar value
|
|
|
|
is assumed to be the empty string.
|
|
|
|
.Pp
|
|
|
|
Example:
|
|
|
|
.Bd -literal -offset indent -compact
|
2008-11-22 21:12:47 +00:00
|
|
|
makeoptions MYMAKEOPTION="foo"
|
|
|
|
makeoptions MYMAKEOPTION+="bar"
|
2003-07-06 01:52:26 +00:00
|
|
|
makeoptions MYNULLMAKEOPTION
|
|
|
|
.Ed
|
|
|
|
.\" -------- MAXUSERS --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Ic maxusers Ar number
|
|
|
|
This optional directive is used to configure the size
|
|
|
|
of some kernel data structures.
|
|
|
|
The parameter
|
|
|
|
.Ar number
|
|
|
|
can be 0 (the default) or an integer greater than or equal to 2.
|
|
|
|
A value of 0 indicates that the kernel should configure
|
|
|
|
its data structures according to the size of available
|
|
|
|
physical memory.
|
2003-07-13 09:11:10 +00:00
|
|
|
If auto configuration is requested, the kernel will set
|
2021-10-28 18:15:08 +00:00
|
|
|
this tunable to a value between 32 and 384 for 32-bit systems,
|
|
|
|
or scale the value higher based on available memory for 64-bit
|
|
|
|
systems.
|
2003-07-06 01:52:26 +00:00
|
|
|
.Pp
|
|
|
|
As explained in
|
|
|
|
.Xr tuning 7 ,
|
|
|
|
this tunable can also be set at boot time using
|
|
|
|
.Xr loader 8 .
|
2005-12-03 20:07:32 +00:00
|
|
|
.\" -------- NOCPU --------
|
|
|
|
.Pp
|
|
|
|
.It Ic nocpu Ar cputype
|
|
|
|
Remove the specified CPU
|
|
|
|
from the list of previously selected CPUs.
|
|
|
|
This directive can be used to cancel the effect of
|
|
|
|
.Ic cpu
|
|
|
|
directives in files included using
|
|
|
|
.Ic include .
|
2005-02-10 14:26:21 +00:00
|
|
|
.\" -------- NODEVICE --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2005-02-10 14:26:21 +00:00
|
|
|
.It Ic nodevice Ar name Op , Ar name Op ...
|
|
|
|
.It Ic nodevices Ar name Op , Ar name Op ...
|
|
|
|
Remove the specified devices
|
|
|
|
from the list of previously selected devices.
|
|
|
|
This directive can be used to cancel the effects of
|
|
|
|
.Ic device
|
|
|
|
or
|
|
|
|
.Ic devices
|
|
|
|
directives in files included using
|
|
|
|
.Ic include .
|
2003-07-06 01:52:26 +00:00
|
|
|
.\" -------- NOMAKEOPTION --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2003-07-06 01:52:26 +00:00
|
|
|
.It Ic nomakeoption Ar name
|
2005-12-03 20:07:32 +00:00
|
|
|
.It Ic nomakeoptions Ar name
|
2003-07-06 01:52:26 +00:00
|
|
|
Removes previously defined
|
|
|
|
.Xr make 1
|
|
|
|
option
|
|
|
|
.Ar name
|
|
|
|
from the kernel build.
|
|
|
|
This directive can be used to cancel the effects of
|
|
|
|
.Ic makeoption
|
|
|
|
directives in files included using
|
|
|
|
.Ic include .
|
|
|
|
.\" -------- NOOPTION --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2005-02-10 14:26:21 +00:00
|
|
|
.It Ic nooption Ar name Op , Ar name Op ...
|
|
|
|
.It Ic nooptions Ar name Op , Ar name Op ...
|
|
|
|
Remove the specified kernel options
|
2003-07-06 01:52:26 +00:00
|
|
|
from the list of previously defined options.
|
|
|
|
This directive can be used to cancel the effects of
|
2005-02-10 14:26:21 +00:00
|
|
|
.Ic option
|
|
|
|
or
|
2003-07-06 01:52:26 +00:00
|
|
|
.Ic options
|
|
|
|
directives in files included using
|
|
|
|
.Ic include .
|
|
|
|
.\" -------- OPTIONS --------
|
2005-12-03 20:07:32 +00:00
|
|
|
.Pp
|
2005-02-10 14:26:21 +00:00
|
|
|
.It Ic option Ar optionspec Op , Ar optionspec Op ...
|
|
|
|
.It Ic options Ar optionspec Op , Ar optionspec Op ...
|
2003-07-06 01:52:26 +00:00
|
|
|
Add compile time kernel options to the kernel build.
|
|
|
|
Each option specification has the form
|
|
|
|
.Pp
|
2005-02-10 14:26:21 +00:00
|
|
|
.D1 Ar name Ns Op = Ns Ar value
|
2003-07-06 01:52:26 +00:00
|
|
|
.Pp
|
|
|
|
If
|
2005-02-10 14:26:21 +00:00
|
|
|
.Ar value
|
2003-07-06 01:52:26 +00:00
|
|
|
is not specified, it is assumed to be
|
|
|
|
.Dv NULL .
|
|
|
|
Options common to all architectures are specified in
|
|
|
|
the file
|
|
|
|
.Pa sys/conf/options .
|
|
|
|
Options specific to architecture
|
|
|
|
.Ar arch
|
|
|
|
are specified in the file
|
2020-12-19 13:11:44 +00:00
|
|
|
.Pa sys/conf/options . Ns Aq Ar arch .
|
2003-07-06 01:52:26 +00:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width ".Pa sys/conf/Makefile. Ns Ar arch" -compact
|
|
|
|
.It Pa sys/compile/ Ns Ar NAME
|
|
|
|
Compile directory created from a kernel configuration.
|
2020-12-19 13:11:44 +00:00
|
|
|
.It Pa sys/conf/Makefile . Ns Ar arch
|
2003-07-06 01:52:26 +00:00
|
|
|
.Pa Makefile
|
|
|
|
fragments for architecture
|
|
|
|
.Ar arch .
|
|
|
|
.It Pa sys/conf/files
|
|
|
|
Devices common to all architectures.
|
2020-12-19 13:11:44 +00:00
|
|
|
.It Pa sys/conf/files . Ns Ar arch
|
2003-07-06 01:52:26 +00:00
|
|
|
Devices for architecture
|
|
|
|
.Ar arch .
|
|
|
|
.It Pa sys/conf/options
|
|
|
|
Options common to all architectures.
|
2020-12-19 13:11:44 +00:00
|
|
|
.It Pa sys/conf/options . Ns Ar arch
|
2003-07-06 01:52:26 +00:00
|
|
|
Options for architecture
|
|
|
|
.Ar arch .
|
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr kenv 1 ,
|
|
|
|
.Xr make 1 ,
|
|
|
|
.Xr device.hints 5 ,
|
|
|
|
.Xr loader.conf 5 ,
|
|
|
|
.Xr config 8 ,
|
|
|
|
.Xr kldload 8 ,
|
|
|
|
.Xr loader 8
|
|
|
|
.Rs
|
|
|
|
.%T "Building 4.4BSD Kernels with Config"
|
|
|
|
.%A "Samuel J. Leffler"
|
|
|
|
.%A "Michael J. Karels"
|
|
|
|
.Re
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Xr config 8
|
|
|
|
utility first appeared in
|
|
|
|
.Bx 4.1 ,
|
|
|
|
and was subsequently revised in
|
|
|
|
.Bx 4.4 .
|
|
|
|
.Pp
|
|
|
|
The kernel configuration mechanism changed further in
|
|
|
|
.Fx 4.0
|
|
|
|
and
|
|
|
|
.Fx 5.0 ,
|
2003-07-08 01:39:02 +00:00
|
|
|
moving toward an architecture supporting dynamic kernel
|
2003-07-06 01:52:26 +00:00
|
|
|
configuration.
|