]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - Documentation/kbuild/kconfig.txt
Merge tag 'v4.4-rc2' into drm-intel-next-queued
[mirror_ubuntu-bionic-kernel.git] / Documentation / kbuild / kconfig.txt
CommitLineData
2af238e4
RD
1This file contains some assistance for using "make *config".
2
3Use "make help" to list all of the possible configuration targets.
4
5The xconfig ('qconf') and menuconfig ('mconf') programs also
6have embedded help text. Be sure to check it for navigation,
7search, and other general help text.
8
9======================================================================
10General
11--------------------------------------------------
12
13New kernel releases often introduce new config symbols. Often more
14important, new kernel releases may rename config symbols. When
15this happens, using a previously working .config file and running
16"make oldconfig" won't necessarily produce a working new kernel
17for you, so you may find that you need to see what NEW kernel
18symbols have been introduced.
19
20To see a list of new config symbols when using "make oldconfig", use
21
22 cp user/some/old.config .config
560909d4 23 make listnewconfig
2af238e4 24
560909d4 25and the config program will list any new symbols, one per line.
2af238e4 26
673d29f9 27 scripts/diffconfig .config.old .config | less
2af238e4 28
2af238e4 29______________________________________________________________________
98f540d3 30Environment variables for '*config'
2af238e4 31
98f540d3
MH
32KCONFIG_CONFIG
33--------------------------------------------------
34This environment variable can be used to specify a default kernel config
35file name to override the default name of ".config".
2af238e4 36
98f540d3
MH
37KCONFIG_OVERWRITECONFIG
38--------------------------------------------------
39If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
40break symlinks when .config is a symlink to somewhere else.
2af238e4 41
16974326
YM
42CONFIG_
43--------------------------------------------------
44If you set CONFIG_ in the environment, Kconfig will prefix all symbols
45with its value when saving the configuration, instead of using the default,
46"CONFIG_".
47
2af238e4 48______________________________________________________________________
98f540d3 49Environment variables for '{allyes/allmod/allno/rand}config'
2af238e4
RD
50
51KCONFIG_ALLCONFIG
52--------------------------------------------------
53(partially based on lkml email from/by Rob Landley, re: miniconfig)
54--------------------------------------------------
5efe241e
EB
55The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also
56use the environment variable KCONFIG_ALLCONFIG as a flag or a filename
57that contains config symbols that the user requires to be set to a
58specific value. If KCONFIG_ALLCONFIG is used without a filename where
59KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", "make *config"
60checks for a file named "all{yes/mod/no/def/random}.config"
61(corresponding to the *config command that was used) for symbol values
62that are to be forced. If this file is not found, it checks for a
63file named "all.config" to contain forced values.
2af238e4
RD
64
65This enables you to create "miniature" config (miniconfig) or custom
66config files containing just the config symbols that you are interested
67in. Then the kernel config system generates the full .config file,
98f540d3 68including symbols of your miniconfig file.
2af238e4
RD
69
70This 'KCONFIG_ALLCONFIG' file is a config file which contains
71(usually a subset of all) preset config symbols. These variable
72settings are still subject to normal dependency checks.
73
74Examples:
75 KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig
76or
77 KCONFIG_ALLCONFIG=mini.config make allnoconfig
78or
79 make KCONFIG_ALLCONFIG=mini.config allnoconfig
80
81These examples will disable most options (allnoconfig) but enable or
82disable the options that are explicitly listed in the specified
83mini-config files.
84
0d8024c6
YM
85______________________________________________________________________
86Environment variables for 'randconfig'
87
88KCONFIG_SEED
89--------------------------------------------------
90You can set this to the integer value used to seed the RNG, if you want
91to somehow debug the behaviour of the kconfig parser/frontends.
92If not set, the current time will be used.
93
e43956e6
YM
94KCONFIG_PROBABILITY
95--------------------------------------------------
96This variable can be used to skew the probabilities. This variable can
97be unset or empty, or set to three different formats:
98 KCONFIG_PROBABILITY y:n split y:m:n split
99 -----------------------------------------------------------------
100 unset or empty 50 : 50 33 : 33 : 34
101 N N : 100-N N/2 : N/2 : 100-N
102 [1] N:M N+M : 100-(N+M) N : M : 100-(N+M)
103 [2] N:M:L N : 100-N M : L : 100-(M+L)
104
105where N, M and L are integers (in base 10) in the range [0,100], and so
106that:
107 [1] N+M is in the range [0,100]
108 [2] M+L is in the range [0,100]
109
110Examples:
111 KCONFIG_PROBABILITY=10
112 10% of booleans will be set to 'y', 90% to 'n'
113 5% of tristates will be set to 'y', 5% to 'm', 90% to 'n'
114 KCONFIG_PROBABILITY=15:25
115 40% of booleans will be set to 'y', 60% to 'n'
116 15% of tristates will be set to 'y', 25% to 'm', 60% to 'n'
117 KCONFIG_PROBABILITY=10:15:15
118 10% of booleans will be set to 'y', 90% to 'n'
119 15% of tristates will be set to 'y', 15% to 'm', 70% to 'n'
120
98f540d3
MH
121______________________________________________________________________
122Environment variables for 'silentoldconfig'
123
2af238e4
RD
124KCONFIG_NOSILENTUPDATE
125--------------------------------------------------
126If this variable has a non-blank value, it prevents silent kernel
88393161 127config updates (requires explicit updates).
2af238e4 128
2af238e4
RD
129KCONFIG_AUTOCONFIG
130--------------------------------------------------
131This environment variable can be set to specify the path & name of the
132"auto.conf" file. Its default value is "include/config/auto.conf".
133
bc081dd6
MM
134KCONFIG_TRISTATE
135--------------------------------------------------
136This environment variable can be set to specify the path & name of the
137"tristate.conf" file. Its default value is "include/config/tristate.conf".
138
2af238e4
RD
139KCONFIG_AUTOHEADER
140--------------------------------------------------
141This environment variable can be set to specify the path & name of the
264a2683
SR
142"autoconf.h" (header) file.
143Its default value is "include/generated/autoconf.h".
2af238e4 144
98f540d3
MH
145
146======================================================================
147menuconfig
148--------------------------------------------------
149
150SEARCHING for CONFIG symbols
151
152Searching in menuconfig:
153
154 The Search function searches for kernel configuration symbol
155 names, so you have to know something close to what you are
156 looking for.
157
158 Example:
159 /hotplug
160 This lists all config symbols that contain "hotplug",
40b31360 161 e.g., HOTPLUG_CPU, MEMORY_HOTPLUG.
98f540d3
MH
162
163 For search help, enter / followed TAB-TAB-TAB (to highlight
164 <Help>) and Enter. This will tell you that you can also use
165 regular expressions (regexes) in the search string, so if you
166 are not interested in MEMORY_HOTPLUG, you could try
167
168 /^hotplug
169
193b40ae 170 When searching, symbols are sorted thus:
9e554dd7
YM
171 - first, exact matches, sorted alphabetically (an exact match
172 is when the search matches the complete symbol name);
173 - then, other matches, sorted alphabetically.
193b40ae
YM
174 For example: ^ATH.K matches:
175 ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG
176 [...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...]
177 of which only ATH5K and ATH9K match exactly and so are sorted
178 first (and in alphabetical order), then come all other symbols,
179 sorted in alphabetical order.
180
2af238e4 181______________________________________________________________________
98f540d3
MH
182User interface options for 'menuconfig'
183
184MENUCONFIG_COLOR
185--------------------------------------------------
186It is possible to select different color themes using the variable
187MENUCONFIG_COLOR. To select a theme use:
188
189 make MENUCONFIG_COLOR=<theme> menuconfig
190
191Available themes are:
192 mono => selects colors suitable for monochrome displays
193 blackbg => selects a color scheme with black background
194 classic => theme with blue background. The classic look
195 bluetitle => a LCD friendly version of classic. (default)
196
2af238e4
RD
197MENUCONFIG_MODE
198--------------------------------------------------
199This mode shows all sub-menus in one large tree.
200
201Example:
98f540d3
MH
202 make MENUCONFIG_MODE=single_menu menuconfig
203
2af238e4
RD
204
205======================================================================
206xconfig
207--------------------------------------------------
208
209Searching in xconfig:
210
211 The Search function searches for kernel configuration symbol
212 names, so you have to know something close to what you are
213 looking for.
214
215 Example:
216 Ctrl-F hotplug
217 or
218 Menu: File, Search, hotplug
219
220 lists all config symbol entries that contain "hotplug" in
221 the symbol name. In this Search dialog, you may change the
222 config setting for any of the entries that are not grayed out.
223 You can also enter a different search string without having
224 to return to the main menu.
225
226
227======================================================================
228gconfig
229--------------------------------------------------
230
231Searching in gconfig:
232
233 None (gconfig isn't maintained as well as xconfig or menuconfig);
234 however, gconfig does have a few more viewing choices than
235 xconfig does.
236
237###