FreeBSD Handbook : Configuring the FreeBSD Kernel : The Configuration File
Previous: Building and Installing a Custom Kernel
Next: Mandatory Keywords

5.3. The Configuration File

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.

5.3.1. Mandatory Keywords

5.3.2. General Options

5.3.3. Filesystem Options

5.3.4. Basic Controllers and Devices

5.3.5. SCSI Device Support

5.3.6. Console, Bus Mouse, and X Server Support

5.3.7. Serial and Parallel Ports

5.3.8. Networking

5.3.9. Sound cards

5.3.10. Pseudo-devices

5.3.11. Joystick, PC Speaker, Miscellaneous


FreeBSD Handbook : Configuring the FreeBSD Kernel : The Configuration File
Previous: Building and Installing a Custom Kernel
Next: Mandatory Keywords