These targets allow the kernel to be configured in a wide range of different ways.
Table 11.3. Configuration targets
Target
|
Description
|
config
|
Updates the current kernel configuration by using a
line-oriented program.
|
menuconfig
|
Updates the current kernel configuration by using a text
based menu program.
|
xconfig
|
Updates the current kernel configuration by using a QT-based graphical program.
|
gconfig
|
Updates the current kernel configuration by using a GTK+-based graphical program.
|
oldconfig
|
Updates the current kernel configuration by using the
current .config file and prompting for any new options that have been
added to the kernel.
|
silentoldconfig
|
Just like oldconfig, but prints nothing to the screen except when a question needs to be
answered.
|
randconfig
|
Generates a new kernel configuration with random answers
to all of the different options.
|
defconfig
|
Generates a new kernel configuration with the default
answer being used for all options. The default
values are taken from a file located in the
arch/$ARCH/defconfig file, where
$ARCH refers to the specific architecture
for which
the kernel is being built.
|
allmodconfig
|
Generates a new kernel configuration in which modules
are enabled whenever possible.
|
allyesconfig
|
Generates a new kernel configuration with all options
set to yes.
|
allnoconfig
|
Generates a new kernel configuration with all options
set to no.
|
Note that the allyesconfig,
allmodconfig,
allnoconfig, and
randconfig targets also take advantage of the
environment variable KCONFIG_ALLCONFIG. If that
variable points to a file, that file will be used as a list of
configuration values that you require to be set to a specific
value. In other words, the file overrides the normal behavior of the
make
targets.
For example, if the file ~/linux/must_be_set contains
the following variables:
$
cat ~/linux/must_be_set
CONFIG_SWAP=y
CONFIG_DEBUG_FS=y
and you enter
make allnoconfig
with the proper
KCONFIG_ALLCONFIG environment variable in effect:
$
KCONFIG_ALLCONFIG=../must_be_set make allnoconfig
$
grep CONFIG_SWAP .config
CONFIG_SWAP=y
then the results include:
$
grep CONFIG_DEBUG_FS .config
CONFIG_DEBUG_FS=y
This variable would not have normally been set to y
otherwise.
If the KCONFIG_ALLCONFIG variable is not set, the build
system checks for files in the top-level build directory named:
-
allmod.config
-
allno.config
-
allrandom.config
-
allyes.config
If any of those files are present, the build uses them as lists of configuration values that must be
forced to the specified values. If none of those files are found, the build
system finally looks for a file called all.config for a
list of forced configuration values.
You can use these different files to set up a known good base
configuration that will always work. Then the other configuration options
can be used to generate different testing configurations for the needed
situation.