menuconfig

转自:http://en.wikipedia.org/wiki/Menuconfig

From Wikipedia, the free encyclopedia
Linux_x86 3.10.0-rc2 Kernel Configuration

menuconfig for a 3.10.0-rc2 Linux kernel
Written inC
Operating systemLinux
Typebuild automation tool
LicenseGNU General Public License
Websitewww.kernel.org

make menuconfig is one of five similar tools that can configure the Linux kernel source, a necessary early step needed to compile the source code. make menuconfig, with a convenient menu-driven user-interface, allows the user to choose the features of the Linux kernel (and other options) that will be compiled. It is normally invoked using the command make menuconfig, menuconfig is a target in the Linux kernel Makefile.

Contents

   [hide

History[edit]

make menuconfig was not in the first version of Linux. The predecessor tool is a question-and-answer-based utility (make configmake oldconfig). A third tool for Linux configuration is make xconfig, which requires Qt. There is also make gconfig, which uses gtk+, and make nconfig, which is similar to makeconfig.

Advantages over earlier versions[edit]

Despite being a simple design, make menuconfig offers considerable advantages to the question-and-answer-based configuration tool, the most notable being a basic search system and the ability to load and save files with filenames different from “.config”. make menuconfig gives the user an ability to navigate forwards or backwards directly between features, rather than using make config by pressing the enter (⏎) key up to 80 times to find a specific feature.

If the user is satisfied with a previous .config file, using make oldconfig uses this previous file to answer all questions that it can, only interactively presenting the new features. This is intended for a version upgrade, but may be appropriate at other times.

make menuconfig is a light load on system resources unlike make xconfig (uses Qt as of version 2.6.31.1, formerly Tk) or make gconfig, which utilizes GTK+. It's possible to ignore most of the features with make config, and doing so makes it more likely that one will configure an incomplete or oversized kernel. It's recommended to start with the .config file included with the Linux distribution, which makes it easier to configure a custom kernel.

Better than editing the .config by hand, make menuconfig easily shows the descriptions of each feature (?), and adds some (primitive in version 2.6.31.1) dependency checking. With make oldconfig, dependency checking can be done in one step, but requires the user to locate the features that were changed, by hand, to be sure that the needed ones are still enabled.

Practically, using both make menuconfig and make oldconfigdiff, (also cvs and a decent text editor) provides the most flexibility and most dependability. Configuring Linux is a significant labor, so users are strongly advised to make backups of it (i.e. cp /usr/src/linux*/.config ~/savemywork.config).

The help information is distributed throughout the kernel source tree in the various files called Kconfig.

Requisites/Dependencies[edit]

To use make menuconfig, the Linux kernel source is a requirement, a make tool, a C compiler, and the ncurses library.

Key Strokes[edit]

Main Key strokes
Key stroke Meaning
 ?Option description and tips/Help
Left/Right (⬌) Up/Down (⬍) PgUp/PgDnNavigate through the kernel features and menuconfig commands.
Esc EscExit menuconfig or cancel the command.
Enter (⏎)Activate a command, or expand a branch.
yCompile and include this feature inside of the kernel.
mCompile this feature as a module, separate from the kernel.
nDo not compile the feature.
/Search configuration parameter.

Symbols[edit]

To the left of the features is the setting (y, M, or empty) enclosed in two punctuation marks.

Dependency information
Symbol Meaning
< >No dependencies.
[ ]A dependency requires this to be compiled-in (y), or not compiled (n).
{ }A dependency requires this to be a module (m) or compiled-in (y).
- -A dependency requires this to be compiled-in (y).

Note that the supplied dependency information is primitive, it does not tell you the names of the depentant features.

Other symbols
Symbol Meaning
--->Use enter (⏎) to expand this branch as a new window.
(Experimental)Less/Unstable code, beware.
(New)An option not in your old version of Linux.

What next?[edit]

The user is encouraged to read the Linux README, since there are also many other targets. Each will configure the kernel, but with different features activated.

  1. make menuconfig
  2. Next build the compressed kernel and its modules, a long process. make.
  3. Install using your favorite method such as make modules_installmake install.

See also[edit]

References[edit]

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值