menuconfig - Wikipedia, the free encyclopedia

来源:百度文库 编辑:神马文学网 时间:2024/04/23 15:03:08

menuconfig

From Wikipedia, the free encyclopedia

Jump to: navigation, search This article needs references that appear in reliable third-party publications. Primary sources or sources affiliated with the subject are generally not sufficient for a Wikipedia article. Please add more appropriate citations from reliable sources. (October 2009) menuconfig for a 2.6.32 Linux kernel

make menuconfig is one of three tools that can configure the Linux kernel source, a necessary early step needed to compile the source code. make menuconfig, with a convenient menu 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]
  • 1 History
  • 2 Advantages over earlier versions
  • 3 Requsites/Dependencies
  • 4 Key Strokes
  • 5 Symbols
  • 6 What next?
  • 7 See also
  • 8 References
  • 9 External links

[edit] History

make menuconfig was not in the first version of Linux. The predecessor tool is a question-and-answer-based utility (make config, make oldconfig). A third tool for Linux configuration is make xconfig.

[edit] Advantages over earlier versions

Despite being a simple design, make menuconfig offersconsiderable advantages to the question-and-answer-based configurationtool, the most notable being a basic search system and the ability toload and save files with filenames different from “.config”. make menuconfig gives you the ability to navigate forwards or backwards directly to the features that you want to change, rather than using make config by entering (perhaps) eighty enter (?) keys to find the feature that you want.

Although, when you are happy with an old .config file using make oldconfig uses your .configfile to answer all the questions that it can answer, and just presentsyou with the new features. This is intended for a version upgrade, butyou can use it any time you want to check the configuration.

make menuconfig is a light load on system resources unlike make xconfig with Qt (true in v2.6.31.1, or use make gconfig for GTK+ users, it formerly used Tk (framework)) and the X.Org Server. It is easy to ignore most of the features with make menuconfig, but doing so makes it more likely that you'll wind up with an incomplete or oversized kernel. If you can start with the .config from your Linux distributor, then you will have an easier time configuring the kernel by using most of their choices.

Better than editing the .config by hand, make menuconfigeasily shows the descriptions of each feature (?), and adds some(primitive in v2.6.31.1) dependency checking. With make oldconfig, youcan do the dependency checking in one quick step, but then you mustfind which features were changed by hand to be sure that the featuresthat you need are still enabled.

Practically, using both make menuconfig and make oldconfig, diff, (and maybe cvs and also a good text editor) gives you the most flexibility and most dependability. Configuring Linux is a significant labor, 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.

[edit] Requsites/Dependencies

To use make menuconfig, you will need the Linux kernel source, a make tool, a C compiler, and the ncurses library.

[edit] Key Strokes

Main Key strokes Key stroke Meaning   Option description and tips/Help Left/Right (?) Up/Down (?) PgUp/PgDn Navigate through the kernel features and menuconfig commands. Esc Esc Exit menuconfig or cancel the command. Enter (?) Activate a command, or expand a branch. y Compile and include this feature inside of the kernel. m Compile this feature as a module, separate from the kernel. n Do not compile the feature.

[edit] Symbols

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.

[edit] What next?

Read the Linux README, there are many other targets, each will configure your kernel, but each 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 install, make modules_install.

[edit]