요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
=================================
Configuration targets and editors
=================================
This file contains some assistance for using ``make *config``.
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
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
this happens, using a previously working .config file and running
"make oldconfig" won't necessarily produce a working new kernel
for you, so you may find that you need to see what NEW kernel
symbols have been introduced.
To see a list of new config symbols, use::
cp user/some/old.config .config
make listnewconfig
and the config program will list any new symbols, one per line.
Alternatively, you can use the brute force method::
make oldconfig
scripts/diffconfig .config.old .config | less
Environment variables
=====================
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``
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``
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``
This environment variable makes Kconfig warn about all unrecognized
symbols in the config input.
``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_``.
Environment variables for ``{allyes/allmod/allno/alldef/rand}config``:
``KCONFIG_ALLCONFIG``
The allyesconfig/allmodconfig/alldefconfig/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``
checks for a file named "all{yes/mod/no/def/random}.config"
(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.
This enables you to create "miniature" config (miniconfig) or custom
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
(usually a subset of all) preset config symbols. These variable
settings are still subject to normal dependency checks.
Examples::
KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig
or::
KCONFIG_ALLCONFIG=mini.config make allnoconfig
or::
make KCONFIG_ALLCONFIG=mini.config allnoconfig
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``:
``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``
This variable can be used to skew the probabilities. This variable can
be unset or empty, or set to three different formats:
======================= ================== =====================
KCONFIG_PROBABILITY y:n split y:m:n split
======================= ================== =====================
unset or empty 50 : 50 33 : 33 : 34
N N : 100-N N/2 : N/2 : 100-N
[1] N:M N+M : 100-(N+M) N : M : 100-(N+M)
[2] N:M:L N : 100-N M : L : 100-(M+L)
======================= ================== =====================
where N, M and L are integers (in base 10) in the range [0,100], and so
that:
[1] N+M is in the range [0,100]
[2] M+L is in the range [0,100]
Examples::
KCONFIG_PROBABILITY=10
10% of booleans will be set to 'y', 90% to 'n'
5% of tristates will be set to 'y', 5% to 'm', 90% to 'n'
KCONFIG_PROBABILITY=15:25
40% of booleans will be set to 'y', 60% to 'n'
15% of tristates will be set to 'y', 25% to 'm', 60% to 'n'
KCONFIG_PROBABILITY=10:15:15
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``:
``KCONFIG_NOSILENTUPDATE``
If this variable has a non-blank value, it prevents silent kernel
config updates (requires explicit updates).
``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``
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 in menuconfig:
The Search function searches for kernel configuration symbol
names, so you have to know something close to what you are
looking for.
Example::
/hotplug
This lists all config symbols that contain "hotplug",
e.g., HOTPLUG_CPU, MEMORY_HOTPLUG.
For search help, enter / followed by TAB-TAB (to highlight
<Help>) and Enter. This will tell you that you can also use
regular expressions (regexes) in the search string, so if you
are not interested in MEMORY_HOTPLUG, you could try::
/^hotplug
When searching, symbols are sorted thus:
- first, exact matches, sorted alphabetically (an exact match
is when the search matches the complete symbol name);
- then, other matches, sorted alphabetically.
For example, ^ATH.K matches:
ATH5K ATH9K ATH5K_AHB ATH5K_DEBUG [...] ATH6KL ATH6KL_DEBUG
[...] ATH9K_AHB ATH9K_BTCOEX_SUPPORT ATH9K_COMMON [...]
of which only ATH5K and ATH9K match exactly and so are sorted
first (and in alphabetical order), then come all other symbols,
sorted in alphabetical order.
In this menu, pressing the key in the (#) prefix will jump
directly to that location. You will be returned to the current
search results after exiting this new menu.
User interface options for 'menuconfig':
``MENUCONFIG_COLOR``
It is possible to select different color themes using the variable
MENUCONFIG_COLOR. To select a theme use::
make MENUCONFIG_COLOR=<theme> menuconfig
Available themes are::
- mono => selects colors suitable for monochrome displays
- blackbg => selects a color scheme with black background
- classic => theme with blue background. The classic look
- bluetitle => a LCD friendly version of classic. (default)
``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.
You can also just use the corresponding numeric key to execute the
commands unless you are in a data entry window. E.g., instead of F6
for Save, you can just press 6.
Use F1 for Global help or F3 for the Short help menu.
Searching in nconfig:
You can search either in the menu entry "prompt" strings
or in the configuration symbols.
Use / to begin a search through the menu entries. This does
not support regular expressions. Use <Down> or <Up> for
Next hit and Previous hit, respectively. Use <Esc> to
terminate the search mode.
F8 (SymSearch) searches the configuration symbols for the
given string or regular expression (regex).
In the SymSearch, pressing the key in the (#) prefix will
jump directly to that location. You will be returned to the
current search results after exiting this new menu.
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:
The Search function searches for kernel configuration symbol
names, so you have to know something close to what you are
looking for.
Example::
Ctrl-F hotplug
or::
Menu: File, Search, hotplug
lists all config symbol entries that contain "hotplug" in
the symbol name. In this Search dialog, you may change the
config setting for any of the entries that are not grayed out.
You can also enter a different search string without having
to return to the main menu.
gconfig
=======
Searching in gconfig:
There is no search command in gconfig. However, gconfig does
have several different viewing choices, modes, and options.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
구성 target과 새 symbol 확인
1-38이 문서는 `make *config` 사용을 돕습니다. 가능한 configuration target 전체는 `make help`로 확인할 수 있습니다.
`xconfig`의 `qconf`, `menuconfig`의 `mconf`, `nconfig`의 `nconf`에는 navigation, search와 일반 사용법을 설명하는 내장 help text가 있습니다. `gconfig`의 `gconf`는 help text가 제한적입니다.
각 editor의 실행 이름과 내장 도움말 수준입니다.
새 kernel release는 새 config symbol을 도입하기도 하고 기존 symbol 이름을 바꾸기도 합니다. 그래서 예전에 동작하던 `.config`에 `make oldconfig`만 실행해도 새 kernel이 반드시 정상 동작하는 것은 아닙니다. 새로 추가된 symbol을 확인해야 할 수 있습니다.
새 symbol 목록은 기존 config를 `.config`로 복사한 뒤 `make listnewconfig`를 실행해 얻습니다. Config program은 새 symbol을 한 줄에 하나씩 출력합니다.
cp user/some/old.config .config
make listnewconfig
대안으로 `make oldconfig`를 실행한 뒤 `scripts/diffconfig .config.old .config | less`로 이전·현재 구성을 강제로 비교할 수 있습니다.
기존 config를 새 symbol 체계에 맞춰 검토하는 절차입니다.
=================================
Configuration targets and editors
=================================
This file contains some assistance for using ``make *config``.
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
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
this happens, using a previously working .config file and running
"make oldconfig" won't necessarily produce a working new kernel
for you, so you may find that you need to see what NEW kernel
symbols have been introduced.
To see a list of new config symbols, use::
cp user/some/old.config .config
make listnewconfig
and the config program will list any new symbols, one per line.
Alternatively, you can use the brute force method::
make oldconfig
scripts/diffconfig .config.old .config | less
일반 및 allconfig 환경 변수
39-107`*config`용 `KCONFIG_CONFIG`는 기본 이름 `.config`를 대신할 kernel config file name을 지정합니다. `KCONFIG_DEFCONFIG_LIST`는 `.config`가 아직 없을 때 base configuration으로 사용할 config file 목록을 지정합니다. 항목은 whitespace로 구분하며 실제로 존재하는 첫 파일을 사용합니다.
`KCONFIG_OVERWRITECONFIG`를 environment에 설정하면 `.config`가 다른 위치를 가리키는 symlink일 때 Kconfig가 그 symlink를 끊지 않습니다. `KCONFIG_WARN_UNKNOWN_SYMBOLS`는 config input의 인식할 수 없는 모든 symbol을 경고하게 하고, `KCONFIG_WERROR`는 warning을 error로 처리합니다.
Environment variable `CONFIG_`를 설정하면 configuration 저장 시 모든 symbol 앞에 기본 `CONFIG_` 대신 해당 값을 prefix로 붙입니다.
입출력 경로와 진단 동작을 제어합니다.
`allyesconfig`, `allmodconfig`, `alldefconfig`, `allnoconfig`, `randconfig`는 `KCONFIG_ALLCONFIG`를 flag 또는 사용자가 특정 값으로 강제할 symbol을 담은 file name으로 사용할 수 있습니다.
`KCONFIG_ALLCONFIG`가 빈 문자열 또는 `1`이고 file name을 직접 주지 않으면 `make *config`는 실행 target에 대응하는 `all{yes/mod/no/def/random}.config`를 먼저 찾습니다. 이 파일이 없으면 강제 값을 담은 `all.config`를 찾습니다.
이를 이용하면 관심 있는 symbol만 담은 miniature config, 즉 miniconfig나 custom config를 만들 수 있습니다. Kernel config system은 miniconfig의 symbol을 포함해 전체 `.config`를 생성합니다. 단, preset 값도 정상 dependency check를 그대로 받습니다.
KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig
KCONFIG_ALLCONFIG=mini.config make allnoconfig
make KCONFIG_ALLCONFIG=mini.config allnoconfig
이 예제들은 `allnoconfig`로 대부분의 option을 끄되 지정한 mini-config에 명시된 option은 해당 값으로 enable 또는 disable합니다.
Miniconfig는 전체 구성을 대체하지 않고 강제할 일부 symbol을 제공합니다.
Environment variables
=====================
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``
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``
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``
This environment variable makes Kconfig warn about all unrecognized
symbols in the config input.
``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_``.
Environment variables for ``{allyes/allmod/allno/alldef/rand}config``:
``KCONFIG_ALLCONFIG``
The allyesconfig/allmodconfig/alldefconfig/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``
checks for a file named "all{yes/mod/no/def/random}.config"
(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.
This enables you to create "miniature" config (miniconfig) or custom
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
(usually a subset of all) preset config symbols. These variable
settings are still subject to normal dependency checks.
Examples::
KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig
or::
KCONFIG_ALLCONFIG=mini.config make allnoconfig
or::
make KCONFIG_ALLCONFIG=mini.config allnoconfig
These examples will disable most options (allnoconfig) but enable or
disable the options that are explicitly listed in the specified
mini-config files.
randconfig와 syncconfig 환경 변수
108-162`randconfig`용 `KCONFIG_SEED`에는 RNG seed로 쓸 integer를 설정할 수 있습니다. Kconfig parser나 frontend 동작을 재현하며 debug할 때 유용합니다. 설정하지 않으면 현재 시간을 사용합니다.
`KCONFIG_PROBABILITY`는 random selection의 확률을 기울입니다. 설정하지 않거나 빈 값으로 둘 수 있고, 숫자 하나 `N`, 두 수 `N:M`, 세 수 `N:M:L` 형식을 지원합니다.
Boolean의 y:n과 tristate의 y:m:n 분할입니다.
N, M, L은 모두 0~100 범위의 base-10 integer여야 합니다. `N:M`에서는 N+M도 0~100 범위여야 하고, `N:M:L`에서는 M+L이 0~100 범위여야 합니다.
원문 예제의 실제 boolean·tristate 분포입니다.
`syncconfig`용 `KCONFIG_NOSILENTUPDATE`에 빈 문자열이 아닌 값을 주면 kernel config가 조용히 자동 갱신되는 것을 막고 명시적인 update를 요구합니다.
`KCONFIG_AUTOCONFIG`는 `auto.conf`의 경로와 이름을 지정하며 기본값은 `include/config/auto.conf`입니다. `KCONFIG_AUTOHEADER`는 `autoconf.h` header의 경로와 이름을 지정하며 기본값은 `include/generated/autoconf.h`입니다.
자동 갱신 정책과 생성 파일 위치를 제어합니다.
Environment variables for ``randconfig``:
``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``
This variable can be used to skew the probabilities. This variable can
be unset or empty, or set to three different formats:
======================= ================== =====================
KCONFIG_PROBABILITY y:n split y:m:n split
======================= ================== =====================
unset or empty 50 : 50 33 : 33 : 34
N N : 100-N N/2 : N/2 : 100-N
[1] N:M N+M : 100-(N+M) N : M : 100-(N+M)
[2] N:M:L N : 100-N M : L : 100-(M+L)
======================= ================== =====================
where N, M and L are integers (in base 10) in the range [0,100], and so
that:
[1] N+M is in the range [0,100]
[2] M+L is in the range [0,100]
Examples::
KCONFIG_PROBABILITY=10
10% of booleans will be set to 'y', 90% to 'n'
5% of tristates will be set to 'y', 5% to 'm', 90% to 'n'
KCONFIG_PROBABILITY=15:25
40% of booleans will be set to 'y', 60% to 'n'
15% of tristates will be set to 'y', 25% to 'm', 60% to 'n'
KCONFIG_PROBABILITY=10:15:15
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``:
``KCONFIG_NOSILENTUPDATE``
If this variable has a non-blank value, it prevents silent kernel
config updates (requires explicit updates).
``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``
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".
nconfig 조작과 검색
227-264`nconfig`는 대체 text-based configurator입니다. Terminal 아래쪽에 command를 실행하는 function key를 나열합니다. Data entry window가 아니라면 해당 숫자 key만 눌러도 됩니다. 예를 들어 Save의 F6 대신 `6`을 누를 수 있습니다.
Global help는 F1, Short help menu는 F3으로 엽니다. 검색은 menu entry의 `prompt` string과 configuration symbol에서 각각 수행할 수 있습니다.
`/`는 menu entry 검색을 시작하며 regular expression을 지원하지 않습니다. `<Down>`과 `<Up>`은 각각 다음·이전 일치 항목으로 이동하고 `<Esc>`는 search mode를 끝냅니다.
F8 `SymSearch`는 입력한 string 또는 regular expression으로 configuration symbol을 검색합니다. SymSearch에서 `(#)` prefix의 key를 누르면 해당 위치로 바로 이동하며, 새 menu를 나가면 기존 검색 결과로 돌아옵니다.
Prompt 검색과 symbol 검색은 기능이 다릅니다.
`NCONFIG_MODE=single_menu`는 모든 sub-menu를 하나의 큰 tree로 표시합니다. `make NCONFIG_MODE=single_menu nconfig`로 실행합니다.
nconfig
=======
nconfig is an alternate text-based configurator. It lists function
keys across the bottom of the terminal (window) that execute commands.
You can also just use the corresponding numeric key to execute the
commands unless you are in a data entry window. E.g., instead of F6
for Save, you can just press 6.
Use F1 for Global help or F3 for the Short help menu.
Searching in nconfig:
You can search either in the menu entry "prompt" strings
or in the configuration symbols.
Use / to begin a search through the menu entries. This does
not support regular expressions. Use <Down> or <Up> for
Next hit and Previous hit, respectively. Use <Esc> to
terminate the search mode.
F8 (SymSearch) searches the configuration symbols for the
given string or regular expression (regex).
In the SymSearch, pressing the key in the (#) prefix will
jump directly to that location. You will be returned to the
current search results after exiting this new menu.
Environment variables:
``NCONFIG_MODE``
This mode shows all sub-menus in one large tree.
Example::
make NCONFIG_MODE=single_menu nconfig
xconfig와 gconfig 검색
265-295`xconfig`의 Search는 kernel configuration symbol name을 검색하므로 찾으려는 대상과 가까운 이름을 알아야 합니다. `Ctrl-F hotplug` 또는 menu에서 `File`, `Search`, `hotplug` 순서로 실행합니다.
검색 결과는 symbol name에 `hotplug`가 들어간 모든 config symbol entry를 나열합니다. Search dialog에서 gray 처리되지 않은 항목은 config setting을 바로 바꿀 수 있고, main menu로 돌아가지 않고 다른 search string도 입력할 수 있습니다.
`gconfig`에는 search command가 없습니다. 대신 여러 viewing choice, mode와 option을 제공합니다.
동일한 symbol을 찾을 때 editor마다 제공하는 기능이 다릅니다.
xconfig
=======
Searching in xconfig:
The Search function searches for kernel configuration symbol
names, so you have to know something close to what you are
looking for.
Example::
Ctrl-F hotplug
or::
Menu: File, Search, hotplug
lists all config symbol entries that contain "hotplug" in
the symbol name. In this Search dialog, you may change the
config setting for any of the entries that are not grayed out.
You can also enter a different search string without having
to return to the main menu.
gconfig
=======
Searching in gconfig:
There is no search command in gconfig. However, gconfig does
have several different viewing choices, modes, and options.
요약·해설
kconfig.rst:1-295새 kernel로 이동할 때는 `make listnewconfig`와 `scripts/diffconfig`로 새 symbol·이름 변경을 확인합니다. `KCONFIG_ALLCONFIG`는 관심 있는 symbol만 담은 miniconfig를 전체 `.config` 생성 과정에 결합합니다.
재현 가능한 `randconfig`에는 `KCONFIG_SEED`와 `KCONFIG_PROBABILITY`를 함께 기록해야 합니다. 자동 생성 파일 경로는 `KCONFIG_AUTOCONFIG`, `KCONFIG_AUTOHEADER`로 바꿀 수 있습니다.
Text editor 중 `menuconfig`는 regex symbol 검색, `nconfig`는 prompt 검색과 F8 symbol 검색을 분리합니다. `xconfig`는 search dialog에서 값을 바로 바꿀 수 있고 `gconfig`에는 search command가 없습니다.
목적에 따라 target과 editor 기능을 조합합니다.