Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Vegard Nossum and committed by
Masahiro Yamada
f6314b76 93c432e8

+166 -197
+166 -197
Documentation/kbuild/kconfig.rst
··· 1 - =================== 2 - Kconfig make config 3 - =================== 1 + ================================= 2 + Configuration targets and editors 3 + ================================= 4 4 5 - This file contains some assistance for using `make *config`. 5 + This file contains some assistance for using ``make *config``. 6 6 7 - Use "make help" to list all of the possible configuration targets. 7 + Use ``make help`` to list all of the possible configuration targets. 8 8 9 9 The xconfig ('qconf'), menuconfig ('mconf'), and nconfig ('nconf') 10 10 programs also have embedded help text. Be sure to check that for ··· 12 12 13 13 The gconfig ('gconf') program has limited help text. 14 14 15 + 15 16 General 16 - ------- 17 + ======= 17 18 18 19 New kernel releases often introduce new config symbols. Often more 19 20 important, new kernel releases may rename config symbols. When ··· 25 24 26 25 To see a list of new config symbols, use:: 27 26 28 - cp user/some/old.config .config 29 - make listnewconfig 27 + cp user/some/old.config .config 28 + make listnewconfig 30 29 31 30 and the config program will list any new symbols, one per line. 32 31 33 32 Alternatively, you can use the brute force method:: 34 33 35 - make oldconfig 36 - scripts/diffconfig .config.old .config | less 34 + make oldconfig 35 + scripts/diffconfig .config.old .config | less 37 36 38 - ---------------------------------------------------------------------- 39 37 40 - Environment variables for `*config` 38 + Environment variables 39 + ===================== 41 40 42 - KCONFIG_CONFIG 43 - -------------- 44 - This environment variable can be used to specify a default kernel config 45 - file name to override the default name of ".config". 41 + Environment variables for ``*config``: 46 42 47 - KCONFIG_DEFCONFIG_LIST 48 - ---------------------- 43 + ``KCONFIG_CONFIG`` 44 + This environment variable can be used to specify a default kernel config 45 + file name to override the default name of ".config". 49 46 50 - This environment variable specifies a list of config files which can be used 51 - as a base configuration in case the .config does not exist yet. Entries in 52 - the list are separated with whitespaces to each other, and the first one 53 - that exists is used. 47 + ``KCONFIG_DEFCONFIG_LIST`` 48 + This environment variable specifies a list of config files which can be 49 + used as a base configuration in case the .config does not exist yet. 50 + Entries in the list are separated with whitespaces to each other, and 51 + the first one that exists is used. 54 52 55 - KCONFIG_OVERWRITECONFIG 56 - ----------------------- 57 - If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not 58 - break symlinks when .config is a symlink to somewhere else. 53 + ``KCONFIG_OVERWRITECONFIG`` 54 + If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not 55 + break symlinks when .config is a symlink to somewhere else. 59 56 60 - KCONFIG_WARN_UNKNOWN_SYMBOLS 61 - ---------------------------- 62 - This environment variable makes Kconfig warn about all unrecognized 63 - symbols in the config input. 57 + ``KCONFIG_WARN_UNKNOWN_SYMBOLS`` 58 + This environment variable makes Kconfig warn about all unrecognized 59 + symbols in the config input. 64 60 65 - KCONFIG_WERROR 66 - -------------- 67 - If set, Kconfig treats warnings as errors. 61 + ``KCONFIG_WERROR`` 62 + If set, Kconfig treats warnings as errors. 68 63 69 - `CONFIG_` 70 - --------- 71 - If you set `CONFIG_` in the environment, Kconfig will prefix all symbols 72 - with its value when saving the configuration, instead of using the default, 73 - `CONFIG_`. 64 + ``CONFIG_`` 65 + If you set ``CONFIG_`` in the environment, Kconfig will prefix all symbols 66 + with its value when saving the configuration, instead of using the 67 + default, ``CONFIG_``. 74 68 75 - ---------------------------------------------------------------------- 69 + Environment variables for ``{allyes/allmod/allno/rand}config``: 76 70 77 - Environment variables for '{allyes/allmod/allno/rand}config' 71 + ``KCONFIG_ALLCONFIG`` 72 + The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also 73 + use the environment variable KCONFIG_ALLCONFIG as a flag or a filename 74 + that contains config symbols that the user requires to be set to a 75 + specific value. If KCONFIG_ALLCONFIG is used without a filename where 76 + KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", ``make *config`` 77 + checks for a file named "all{yes/mod/no/def/random}.config" 78 + (corresponding to the ``*config`` command that was used) for symbol values 79 + that are to be forced. If this file is not found, it checks for a 80 + file named "all.config" to contain forced values. 78 81 79 - KCONFIG_ALLCONFIG 80 - ----------------- 81 - (partially based on lkml email from/by Rob Landley, re: miniconfig) 82 + This enables you to create "miniature" config (miniconfig) or custom 83 + config files containing just the config symbols that you are interested 84 + in. Then the kernel config system generates the full .config file, 85 + including symbols of your miniconfig file. 82 86 83 - -------------------------------------------------- 87 + This ``KCONFIG_ALLCONFIG`` file is a config file which contains 88 + (usually a subset of all) preset config symbols. These variable 89 + settings are still subject to normal dependency checks. 84 90 85 - The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also 86 - use the environment variable KCONFIG_ALLCONFIG as a flag or a filename 87 - that contains config symbols that the user requires to be set to a 88 - specific value. If KCONFIG_ALLCONFIG is used without a filename where 89 - KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", `make *config` 90 - checks for a file named "all{yes/mod/no/def/random}.config" 91 - (corresponding to the `*config` command that was used) for symbol values 92 - that are to be forced. If this file is not found, it checks for a 93 - file named "all.config" to contain forced values. 91 + Examples:: 94 92 95 - This enables you to create "miniature" config (miniconfig) or custom 96 - config files containing just the config symbols that you are interested 97 - in. Then the kernel config system generates the full .config file, 98 - including symbols of your miniconfig file. 93 + KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig 99 94 100 - This 'KCONFIG_ALLCONFIG' file is a config file which contains 101 - (usually a subset of all) preset config symbols. These variable 102 - settings are still subject to normal dependency checks. 95 + or:: 103 96 104 - Examples:: 97 + KCONFIG_ALLCONFIG=mini.config make allnoconfig 105 98 106 - KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig 99 + or:: 107 100 108 - or:: 101 + make KCONFIG_ALLCONFIG=mini.config allnoconfig 109 102 110 - KCONFIG_ALLCONFIG=mini.config make allnoconfig 103 + These examples will disable most options (allnoconfig) but enable or 104 + disable the options that are explicitly listed in the specified 105 + mini-config files. 111 106 112 - or:: 107 + Environment variables for ``randconfig``: 113 108 114 - make KCONFIG_ALLCONFIG=mini.config allnoconfig 109 + ``KCONFIG_SEED`` 110 + You can set this to the integer value used to seed the RNG, if you want 111 + to somehow debug the behaviour of the kconfig parser/frontends. 112 + If not set, the current time will be used. 115 113 116 - These examples will disable most options (allnoconfig) but enable or 117 - disable the options that are explicitly listed in the specified 118 - mini-config files. 119 - 120 - ---------------------------------------------------------------------- 121 - 122 - Environment variables for 'randconfig' 123 - 124 - KCONFIG_SEED 125 - ------------ 126 - You can set this to the integer value used to seed the RNG, if you want 127 - to somehow debug the behaviour of the kconfig parser/frontends. 128 - If not set, the current time will be used. 129 - 130 - KCONFIG_PROBABILITY 131 - ------------------- 132 - This variable can be used to skew the probabilities. This variable can 133 - be unset or empty, or set to three different formats: 114 + ``KCONFIG_PROBABILITY`` 115 + This variable can be used to skew the probabilities. This variable can 116 + be unset or empty, or set to three different formats: 134 117 135 118 ======================= ================== ===================== 136 - KCONFIG_PROBABILITY y:n split y:m:n split 119 + KCONFIG_PROBABILITY y:n split y:m:n split 137 120 ======================= ================== ===================== 138 - unset or empty 50 : 50 33 : 33 : 34 139 - N N : 100-N N/2 : N/2 : 100-N 121 + unset or empty 50 : 50 33 : 33 : 34 122 + N N : 100-N N/2 : N/2 : 100-N 140 123 [1] N:M N+M : 100-(N+M) N : M : 100-(N+M) 141 124 [2] N:M:L N : 100-N M : L : 100-(M+L) 142 125 ======================= ================== ===================== ··· 134 149 135 150 Examples:: 136 151 137 - KCONFIG_PROBABILITY=10 138 - 10% of booleans will be set to 'y', 90% to 'n' 139 - 5% of tristates will be set to 'y', 5% to 'm', 90% to 'n' 140 - KCONFIG_PROBABILITY=15:25 141 - 40% of booleans will be set to 'y', 60% to 'n' 142 - 15% of tristates will be set to 'y', 25% to 'm', 60% to 'n' 143 - KCONFIG_PROBABILITY=10:15:15 144 - 10% of booleans will be set to 'y', 90% to 'n' 145 - 15% of tristates will be set to 'y', 15% to 'm', 70% to 'n' 152 + KCONFIG_PROBABILITY=10 153 + 10% of booleans will be set to 'y', 90% to 'n' 154 + 5% of tristates will be set to 'y', 5% to 'm', 90% to 'n' 155 + KCONFIG_PROBABILITY=15:25 156 + 40% of booleans will be set to 'y', 60% to 'n' 157 + 15% of tristates will be set to 'y', 25% to 'm', 60% to 'n' 158 + KCONFIG_PROBABILITY=10:15:15 159 + 10% of booleans will be set to 'y', 90% to 'n' 160 + 15% of tristates will be set to 'y', 15% to 'm', 70% to 'n' 146 161 147 - ---------------------------------------------------------------------- 162 + Environment variables for ``syncconfig``: 148 163 149 - Environment variables for 'syncconfig' 164 + ``KCONFIG_NOSILENTUPDATE`` 165 + If this variable has a non-blank value, it prevents silent kernel 166 + config updates (requires explicit updates). 150 167 151 - KCONFIG_NOSILENTUPDATE 152 - ---------------------- 153 - If this variable has a non-blank value, it prevents silent kernel 154 - config updates (requires explicit updates). 168 + ``KCONFIG_AUTOCONFIG`` 169 + This environment variable can be set to specify the path & name of the 170 + "auto.conf" file. Its default value is "include/config/auto.conf". 155 171 156 - KCONFIG_AUTOCONFIG 157 - ------------------ 158 - This environment variable can be set to specify the path & name of the 159 - "auto.conf" file. Its default value is "include/config/auto.conf". 172 + ``KCONFIG_AUTOHEADER`` 173 + This environment variable can be set to specify the path & name of the 174 + "autoconf.h" (header) file. 175 + Its default value is "include/generated/autoconf.h". 160 176 161 - KCONFIG_AUTOHEADER 162 - ------------------ 163 - This environment variable can be set to specify the path & name of the 164 - "autoconf.h" (header) file. 165 - Its default value is "include/generated/autoconf.h". 166 - 167 - 168 - ---------------------------------------------------------------------- 169 177 170 178 menuconfig 171 - ---------- 172 - 173 - SEARCHING for CONFIG symbols 179 + ========== 174 180 175 181 Searching in menuconfig: 176 182 177 - The Search function searches for kernel configuration symbol 178 - names, so you have to know something close to what you are 179 - looking for. 183 + The Search function searches for kernel configuration symbol 184 + names, so you have to know something close to what you are 185 + looking for. 180 186 181 - Example:: 187 + Example:: 182 188 183 - /hotplug 184 - This lists all config symbols that contain "hotplug", 185 - e.g., HOTPLUG_CPU, MEMORY_HOTPLUG. 189 + /hotplug 190 + This lists all config symbols that contain "hotplug", 191 + e.g., HOTPLUG_CPU, MEMORY_HOTPLUG. 186 192 187 - For search help, enter / followed by TAB-TAB (to highlight 188 - <Help>) and Enter. This will tell you that you can also use 189 - regular expressions (regexes) in the search string, so if you 190 - are not interested in MEMORY_HOTPLUG, you could try:: 193 + For search help, enter / followed by TAB-TAB (to highlight 194 + <Help>) and Enter. This will tell you that you can also use 195 + regular expressions (regexes) in the search string, so if you 196 + are not interested in MEMORY_HOTPLUG, you could try:: 191 197 192 - /^hotplug 198 + /^hotplug 193 199 194 - When searching, symbols are sorted thus: 200 + When searching, symbols are sorted thus: 195 201 196 - - first, exact matches, sorted alphabetically (an exact match 197 - is when the search matches the complete symbol name); 198 - - then, other matches, sorted alphabetically. 202 + - first, exact matches, sorted alphabetically (an exact match 203 + is when the search matches the complete symbol name); 204 + - then, other matches, sorted alphabetically. 199 205 200 - For example: ^ATH.K matches: 206 + For example, ^ATH.K matches: 201 207 202 - ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG 203 - [...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...] 208 + ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG 209 + [...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...] 204 210 205 - of which only ATH5K and ATH9K match exactly and so are sorted 206 - first (and in alphabetical order), then come all other symbols, 207 - sorted in alphabetical order. 211 + of which only ATH5K and ATH9K match exactly and so are sorted 212 + first (and in alphabetical order), then come all other symbols, 213 + sorted in alphabetical order. 208 214 209 - In this menu, pressing the key in the (#) prefix will jump 210 - directly to that location. You will be returned to the current 211 - search results after exiting this new menu. 215 + In this menu, pressing the key in the (#) prefix will jump 216 + directly to that location. You will be returned to the current 217 + search results after exiting this new menu. 212 218 213 - ---------------------------------------------------------------------- 219 + User interface options for 'menuconfig': 214 220 215 - User interface options for 'menuconfig' 221 + ``MENUCONFIG_COLOR`` 222 + It is possible to select different color themes using the variable 223 + MENUCONFIG_COLOR. To select a theme use:: 216 224 217 - MENUCONFIG_COLOR 218 - ---------------- 219 - It is possible to select different color themes using the variable 220 - MENUCONFIG_COLOR. To select a theme use:: 225 + make MENUCONFIG_COLOR=<theme> menuconfig 221 226 222 - make MENUCONFIG_COLOR=<theme> menuconfig 227 + Available themes are:: 223 228 224 - Available themes are:: 229 + - mono => selects colors suitable for monochrome displays 230 + - blackbg => selects a color scheme with black background 231 + - classic => theme with blue background. The classic look 232 + - bluetitle => a LCD friendly version of classic. (default) 225 233 226 - - mono => selects colors suitable for monochrome displays 227 - - blackbg => selects a color scheme with black background 228 - - classic => theme with blue background. The classic look 229 - - bluetitle => a LCD friendly version of classic. (default) 234 + ``MENUCONFIG_MODE`` 235 + This mode shows all sub-menus in one large tree. 230 236 231 - MENUCONFIG_MODE 232 - --------------- 233 - This mode shows all sub-menus in one large tree. 237 + Example:: 234 238 235 - Example:: 239 + make MENUCONFIG_MODE=single_menu menuconfig 236 240 237 - make MENUCONFIG_MODE=single_menu menuconfig 238 - 239 - ---------------------------------------------------------------------- 240 241 241 242 nconfig 242 - ------- 243 + ======= 243 244 244 245 nconfig is an alternate text-based configurator. It lists function 245 246 keys across the bottom of the terminal (window) that execute commands. ··· 237 266 238 267 Searching in nconfig: 239 268 240 - You can search either in the menu entry "prompt" strings 241 - or in the configuration symbols. 269 + You can search either in the menu entry "prompt" strings 270 + or in the configuration symbols. 242 271 243 - Use / to begin a search through the menu entries. This does 244 - not support regular expressions. Use <Down> or <Up> for 245 - Next hit and Previous hit, respectively. Use <Esc> to 246 - terminate the search mode. 272 + Use / to begin a search through the menu entries. This does 273 + not support regular expressions. Use <Down> or <Up> for 274 + Next hit and Previous hit, respectively. Use <Esc> to 275 + terminate the search mode. 247 276 248 - F8 (SymSearch) searches the configuration symbols for the 249 - given string or regular expression (regex). 277 + F8 (SymSearch) searches the configuration symbols for the 278 + given string or regular expression (regex). 250 279 251 - In the SymSearch, pressing the key in the (#) prefix will 252 - jump directly to that location. You will be returned to the 253 - current search results after exiting this new menu. 280 + In the SymSearch, pressing the key in the (#) prefix will 281 + jump directly to that location. You will be returned to the 282 + current search results after exiting this new menu. 254 283 255 - NCONFIG_MODE 256 - ------------ 257 - This mode shows all sub-menus in one large tree. 284 + Environment variables: 258 285 259 - Example:: 286 + ``NCONFIG_MODE`` 287 + This mode shows all sub-menus in one large tree. 260 288 261 - make NCONFIG_MODE=single_menu nconfig 289 + Example:: 262 290 263 - ---------------------------------------------------------------------- 291 + make NCONFIG_MODE=single_menu nconfig 292 + 264 293 265 294 xconfig 266 - ------- 295 + ======= 267 296 268 297 Searching in xconfig: 269 298 270 - The Search function searches for kernel configuration symbol 271 - names, so you have to know something close to what you are 272 - looking for. 299 + The Search function searches for kernel configuration symbol 300 + names, so you have to know something close to what you are 301 + looking for. 273 302 274 - Example:: 303 + Example:: 275 304 276 - Ctrl-F hotplug 305 + Ctrl-F hotplug 277 306 278 - or:: 307 + or:: 279 308 280 - Menu: File, Search, hotplug 309 + Menu: File, Search, hotplug 281 310 282 - lists all config symbol entries that contain "hotplug" in 283 - the symbol name. In this Search dialog, you may change the 284 - config setting for any of the entries that are not grayed out. 285 - You can also enter a different search string without having 286 - to return to the main menu. 311 + lists all config symbol entries that contain "hotplug" in 312 + the symbol name. In this Search dialog, you may change the 313 + config setting for any of the entries that are not grayed out. 314 + You can also enter a different search string without having 315 + to return to the main menu. 287 316 288 - 289 - ---------------------------------------------------------------------- 290 317 291 318 gconfig 292 - ------- 319 + ======= 293 320 294 321 Searching in gconfig: 295 322 296 - There is no search command in gconfig. However, gconfig does 297 - have several different viewing choices, modes, and options. 323 + There is no search command in gconfig. However, gconfig does 324 + have several different viewing choices, modes, and options.