Chinese translated version of Documentation\kbuild\kconfig.txt
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Chinese maintainer:huneng
---------------------------------------------------------------------
Documentation\kbuild\kconfig.txt的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者: 胡能
中文版翻译者: 胡能
中文版校译者: 胡能
以下为正文
---------------------------------------------------------------------
This file contains some assistance for using "make *config".
本文件包含了"make *config"命令的一些辅助使用的信息。
Use "make help" to list all of the possible configuration targets.
使用“make help”命令列出可能的配置目标。
The xconfig ('qconf') and menuconfig ('mconf') programs also
have embedded help text. Be sure to check it for navigation,
search, and other general help text.
xconfig('qconf')和menuconfig('mconf')程序有自带的说明文档。
可以把它作为指导,搜索需要的信息,或者作为其他帮助文档的辅助材料。
======================================================================
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.
新的内核版本都会介绍新的配置标识。
有一点十分重要,新的内核版本通常会改写配置标识。
使用旧版本的可以工作的.config文件,用make命令执行它(‘make oldconfig’),
不是很有可能产生一个可以工作的内核,所以你要在新内核标识中找到你需要的配置标识。
To see a list of new config symbols when using "make oldconfig", use
查看新的配置标识,使用下面的命令
cp user/some/old.config .config
yes "" | make oldconfig >conf.new
and the config program will list as (NEW) any new symbols that have
unknown values.
config程序会列出所有新的标识,和标识的值。
Of course, the .config file is also updated with
new (default) values, so you can use:
当然,.config文件会使用新的值来更新一些配置的旧值,你可以使用命令:
grep "(NEW)" conf.new
to see the new config symbols or you can use diffconfig to see the
查看新的配置标识或者使用diffconfig命令查看
differences between the previous and new .config files:
旧的和新的配置文件的不同之处:
scripts/diffconfig .config.old .config | less
______________________________________________________________________
Environment variables for '*config'
'*config'程序的环境变量
KCONFIG_CONFIG
--------------------------------------------------
This environment variable can be used to specify a default kernel config
file name to override the default name of ".config".
这个环境变量可以被用来实例化一个默认的内核配置文件名来重写默认的文件名,即'.config'
KCONFIG_OVERWRITECONFIG
--------------------------------------------------
If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
break symlinks when .config is a symlink to somewhere else.
有时.config是一个链接指向某处的配置文件,如果你设置了KCONFIG_OVERWRITECONFIG这个环境变量,
Kconfig程序不会破坏该链接。
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_,Kconfig程序会给所有的标识添加前缀'CONFIG_',
当存储配置的时候,而不是使用默认值'CONFIG_'。
______________________________________________________________________
Environment variables for '{allyes/allmod/allno/rand}config'
为'{allyes/allmod/allno/rand}config'配置的环境变量
KCONFIG_ALLCONFIG
--------------------------------------------------
(partially based on lkml email from/by Rob Landley, re: miniconfig)
(可能基于Rob Landley的lkml邮件)
--------------------------------------------------
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"
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.
allyesconfig/allmodconfig/allnoconfig/randconfig,
这些变量可以使用环境变量KCONFIG_ALLCONFIG变量的值,
作为包含配置标识的一个标识或者是文件名,
那些配置标识需要用户设置一个特殊的值。
如果KCONFIG_ALLCONFIG不是用文件名设置的值,即KCONFIG_ALLCONFIG ==""
或者KCONFIG_ALLCONFIG=="1","make *config"命令会检查一个叫做
"all{yes/mod/no/def/random}.config"的文件(对应所使用的*config命令),
以此来强制查找标识的值。
如果这个文件没有找到,make程序会检查"all.config"文件,因为这个文件包含了默认值。
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.
这种机制使得创建"miniature"配置或者自定义配置文件成为可能,自定义配置文件
就可以只包含你想要的.config文件。内核的配置系统生成完整的.config文件,
包括miniconfig文件的标识。
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.
KCONFIG_ALLCONFIG指向的文件时一个配置文件,包含了预设的配置标识。
这些变量设置相对于通常具有依赖性的检查。
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.
这些例子禁用很多的选项,但是开启或者禁用的选项是一定罗列在mini-config配置文件中。
______________________________________________________________________
Environment variables for 'randconfig'
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_SEED变量的值为整数,它被用作RNG的种子,如果你想调试
kconfig分析器/前段的行为,那么就会用到它。
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_PROBA
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:
N, M和L是范围在[0,100]的十进制整数,所以:
[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 'silentoldconfig'
与silentoldconfig有关的环境变量
KCONFIG_NOSILENTUPDATE
--------------------------------------------------
If this variable has a non-blank value, it prevents silent kernel
config updates (requires explicit updates).
如果这个变量有一个非空值,这个变量会防止silent内核配置更新,除非显示的更新。
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_AUTOCONFIG环境变量可以设置实例化”auto.config“的路径和文件名。
它的默认值是"include/config/auto.conf"。
KCONFIG_TRISTATE
--------------------------------------------------
This environment variable can be set to specify the path & name of the
"tristate.conf" file. Its default value is "include/config/tristate.conf".
KCONFIG_TRISTATE环境变量可以被设置为"tristate.conf"文件的路径和文件名。
它的默认值是"include/config/tristate.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".
这个环境变量可以设置为"autoconfig.h"的绝对路径名。
======================================================================
menuconfig
--------------------------------------------------
SEARCHING for CONFIG symbols
Searching in menuconfig:
在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 TAB-TAB-TAB (to highlight
) 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
可通过/后接3个TAB(高亮的)键获得查询信息。
可以使用正则表到时,搜易如果你不喜欢MEMORY_HOTPLUG,你可以使用:
/^hotplug
When searching, symbols are sorted thus:
当搜索的时候,标识会被排序:
- exact match first: an exact match is when the search matches
the complete symbol name;
准确的匹配最前:准确的匹配是指搜索的结果完整匹配标识符;
- alphabetical order: when two symbols do not match exactly,
they are sorted in alphabetical order (in the user's current
locale).
字母顺序:当两个标示符不是十分准确的匹配,他两按照字母顺序排序。
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.
上面的例子中只有ATH5K和ATH9K准确的匹配,而且是排在最前面(字母顺序),
后面的其他标识符按字母顺序排在后面。
______________________________________________________________________
User interface options for 'menuconfig'
menuconfig使用的接口选项
MENUCONFIG_COLOR
--------------------------------------------------
It is possible to select different color themes using the variable
MENUCONFIG_COLOR. To select a theme use:
使用变量MENUCONFIG_COLOR来设置颜色主题。选择主题的方法:
make MENUCONFIG_COLOR= 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)
可用的主题是:
mono => 单一的颜色
blackbg => 黑色背景
classic => 蓝色背景的主题。经典的效果
bluetitle => LCD相近的经典主题。(默认)
MENUCONFIG_MODE
--------------------------------------------------
This mode shows all sub-menus in one large tree.
这个模式表现了所有的子菜单
Example:
make MENUCONFIG_MODE=single_menu menuconfig
======================================================================
xconfig
--------------------------------------------------
Searching in xconfig:
在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.
上述事例中的命令列出了所有配置标识符中包含了“hotplug”标识符。
你可以键入不同的搜索词,完全不用返回主菜单。
======================================================================
gconfig
--------------------------------------------------
Searching in gconfig:
在gconfig中搜索:
None (gconfig isn't maintained as well as xconfig or menuconfig);
however, gconfig does have a few more viewing choices than
xconfig does.
gconfig不是维护不如xconfig或menuconfig;
当然,gconfig比xconfig有更多的可视化选项。
###