The general format of a configuration file is quite simple.
Each line contains a keyword and one or more arguments. For
simplicity, most lines only contain one argument. Anything
following a #
is considered a comment and ignored.
The following sections describe each keyword, generally in the
order they are listed in GENERIC, although some related
keywords have been grouped together in a single section (such
as Networking) even though they are actually scattered
throughout the GENERIC file.
An exhaustive list of options and more detailed explanations
of the device lines is present in the LINT configuration file,
located in the same directory as GENERIC. If you are in doubt
as to the purpose or necessity of a line, check first in LINT.
The kernel is currently being moved to a better organization
of the option handling. Traditionally, each option in the
config file was simply converted into a -D
switch
for the CFLAGS
line of the kernel Makefile. Naturally,
this caused a creeping optionism, with nobody really knowing
which option has been referenced in what files.
In the new scheme, every #ifdef
that is intended to
be dependent upon an option gets this option out of an
opt_foo.h
declaration file created in the
compile directory by config
. The list of valid options
for config
lives in two files: options that do not
depend on the architecture are listed in
/sys/conf/options
, architecture-dependent ones
in /sys/arch/conf/options.arch
,
with arch being for example i386
.