docs: kbuild/kconfig: reformat/cleanup

This document was using headings in an odd way, causing the sidebar to be
quite messy. I've adding new headings and turned some of the old headings
into description lists.

The indentation was a mix of spaces and tabs; I've turned them all into
4 spaces so it always reads correctly regardless of tab settings.

Also use ``...`` instead of `...`; the difference is that `` is meant
for "inline literals" (and renders in a monospace font) while ` is for
"interpreted text" (and renders with italics).

Also changed the title of the document to be more descriptive.

Signed-off-by: Vegard Nossum <vegard.nossum@oracle.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Vegard Nossum 2024-01-12 13:58:30 +01:00 committed by Masahiro Yamada
parent 93c432e8c9
commit f6314b76d8

View File

@ -1,10 +1,10 @@
===================
Kconfig make config
===================
=================================
Configuration targets and editors
=================================
This file contains some assistance for using `make *config`.
This file contains some assistance for using ``make *config``.
Use "make help" to list all of the possible configuration targets.
Use ``make help`` to list all of the possible configuration targets.
The xconfig ('qconf'), menuconfig ('mconf'), and nconfig ('nconf')
programs also have embedded help text. Be sure to check that for
@ -12,8 +12,9 @@ navigation, search, and other general help text.
The gconfig ('gconf') program has limited help text.
General
-------
=======
New kernel releases often introduce new config symbols. Often more
important, new kernel releases may rename config symbols. When
@ -34,60 +35,48 @@ Alternatively, you can use the brute force method::
make oldconfig
scripts/diffconfig .config.old .config | less
----------------------------------------------------------------------
Environment variables for `*config`
Environment variables
=====================
KCONFIG_CONFIG
--------------
Environment variables for ``*config``:
``KCONFIG_CONFIG``
This environment variable can be used to specify a default kernel config
file name to override the default name of ".config".
KCONFIG_DEFCONFIG_LIST
----------------------
``KCONFIG_DEFCONFIG_LIST``
This environment variable specifies a list of config files which can be
used as a base configuration in case the .config does not exist yet.
Entries in the list are separated with whitespaces to each other, and
the first one that exists is used.
This environment variable specifies a list of config files which can be used
as a base configuration in case the .config does not exist yet. Entries in
the list are separated with whitespaces to each other, and the first one
that exists is used.
KCONFIG_OVERWRITECONFIG
-----------------------
``KCONFIG_OVERWRITECONFIG``
If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
break symlinks when .config is a symlink to somewhere else.
KCONFIG_WARN_UNKNOWN_SYMBOLS
----------------------------
``KCONFIG_WARN_UNKNOWN_SYMBOLS``
This environment variable makes Kconfig warn about all unrecognized
symbols in the config input.
KCONFIG_WERROR
--------------
``KCONFIG_WERROR``
If set, Kconfig treats warnings as errors.
`CONFIG_`
---------
If you set `CONFIG_` in the environment, Kconfig will prefix all symbols
with its value when saving the configuration, instead of using the default,
`CONFIG_`.
``CONFIG_``
If you set ``CONFIG_`` in the environment, Kconfig will prefix all symbols
with its value when saving the configuration, instead of using the
default, ``CONFIG_``.
----------------------------------------------------------------------
Environment variables for '{allyes/allmod/allno/rand}config'
KCONFIG_ALLCONFIG
-----------------
(partially based on lkml email from/by Rob Landley, re: miniconfig)
--------------------------------------------------
Environment variables for ``{allyes/allmod/allno/rand}config``:
``KCONFIG_ALLCONFIG``
The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also
use the environment variable KCONFIG_ALLCONFIG as a flag or a filename
that contains config symbols that the user requires to be set to a
specific value. If KCONFIG_ALLCONFIG is used without a filename where
KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", `make *config`
KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", ``make *config``
checks for a file named "all{yes/mod/no/def/random}.config"
(corresponding to the `*config` command that was used) for symbol values
(corresponding to the ``*config`` command that was used) for symbol values
that are to be forced. If this file is not found, it checks for a
file named "all.config" to contain forced values.
@ -96,7 +85,7 @@ config files containing just the config symbols that you are interested
in. Then the kernel config system generates the full .config file,
including symbols of your miniconfig file.
This 'KCONFIG_ALLCONFIG' file is a config file which contains
This ``KCONFIG_ALLCONFIG`` file is a config file which contains
(usually a subset of all) preset config symbols. These variable
settings are still subject to normal dependency checks.
@ -116,18 +105,14 @@ These examples will disable most options (allnoconfig) but enable or
disable the options that are explicitly listed in the specified
mini-config files.
----------------------------------------------------------------------
Environment variables for ``randconfig``:
Environment variables for 'randconfig'
KCONFIG_SEED
------------
``KCONFIG_SEED``
You can set this to the integer value used to seed the RNG, if you want
to somehow debug the behaviour of the kconfig parser/frontends.
If not set, the current time will be used.
KCONFIG_PROBABILITY
-------------------
``KCONFIG_PROBABILITY``
This variable can be used to skew the probabilities. This variable can
be unset or empty, or set to three different formats:
@ -159,33 +144,24 @@ Examples::
10% of booleans will be set to 'y', 90% to 'n'
15% of tristates will be set to 'y', 15% to 'm', 70% to 'n'
----------------------------------------------------------------------
Environment variables for ``syncconfig``:
Environment variables for 'syncconfig'
KCONFIG_NOSILENTUPDATE
----------------------
``KCONFIG_NOSILENTUPDATE``
If this variable has a non-blank value, it prevents silent kernel
config updates (requires explicit updates).
KCONFIG_AUTOCONFIG
------------------
``KCONFIG_AUTOCONFIG``
This environment variable can be set to specify the path & name of the
"auto.conf" file. Its default value is "include/config/auto.conf".
KCONFIG_AUTOHEADER
------------------
``KCONFIG_AUTOHEADER``
This environment variable can be set to specify the path & name of the
"autoconf.h" (header) file.
Its default value is "include/generated/autoconf.h".
----------------------------------------------------------------------
menuconfig
----------
SEARCHING for CONFIG symbols
==========
Searching in menuconfig:
@ -212,7 +188,7 @@ Searching in menuconfig:
is when the search matches the complete symbol name);
- then, other matches, sorted alphabetically.
For example: ^ATH.K matches:
For example, ^ATH.K matches:
ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG
[...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...]
@ -225,12 +201,9 @@ Searching in menuconfig:
directly to that location. You will be returned to the current
search results after exiting this new menu.
----------------------------------------------------------------------
User interface options for 'menuconfig':
User interface options for 'menuconfig'
MENUCONFIG_COLOR
----------------
``MENUCONFIG_COLOR``
It is possible to select different color themes using the variable
MENUCONFIG_COLOR. To select a theme use::
@ -243,18 +216,16 @@ Available themes are::
- classic => theme with blue background. The classic look
- bluetitle => a LCD friendly version of classic. (default)
MENUCONFIG_MODE
---------------
``MENUCONFIG_MODE``
This mode shows all sub-menus in one large tree.
Example::
make MENUCONFIG_MODE=single_menu menuconfig
----------------------------------------------------------------------
nconfig
-------
=======
nconfig is an alternate text-based configurator. It lists function
keys across the bottom of the terminal (window) that execute commands.
@ -281,18 +252,18 @@ Searching in nconfig:
jump directly to that location. You will be returned to the
current search results after exiting this new menu.
NCONFIG_MODE
------------
Environment variables:
``NCONFIG_MODE``
This mode shows all sub-menus in one large tree.
Example::
make NCONFIG_MODE=single_menu nconfig
----------------------------------------------------------------------
xconfig
-------
=======
Searching in xconfig:
@ -315,10 +286,8 @@ Searching in xconfig:
to return to the main menu.
----------------------------------------------------------------------
gconfig
-------
=======
Searching in gconfig: