Menuconfig

Last updated
Written in C
Operating system Linux
Type build automation tool
License GNU General Public License
Website www.kernel.org

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

Contents

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, which requires Qt. There is also make gconfig , which uses GTK+, and make nconfig , which is similar to make menuconfig.

All these tools use the Kconfig language internally. Kconfig is also used in other projects, such as Das U-Boot, a bootloader for embedded devices, Buildroot, a tool for generating embedded Linux systems, and BusyBox, a single-executable shell utility toolbox for embedded systems.

Advantages over earlier versions

Despite being a simple design, make menuconfig offers considerable advantages to the question-and-answer-based configuration tool make oldconfig, 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 to navigate linearly to the configuration for 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 Linux distribution, which makes it easier to configure a custom kernel.

Better than editing the .config by hand, make menuconfig shows the descriptions of each feature (by pressing the "Help" button while on a menu option), 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 oldconfig, diff, (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.

Dependencies

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

Key strokes

Main Key strokes
Key strokeMeaning
?Option description and tips/Help
PgUpPgDnNavigate through the kernel features and menuconfig commands.
Esc+EscExit menuconfig or cancel the command.
↵ EnterActivate 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

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

Dependency information
SymbolMeaning
< >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 dependant features.

Other symbols
SymbolMeaning
--->Use ↵ Enter to expand this branch as a new window.
(Experimental)Unstable/lesser code, beware.
(New)An option not in an older version of Linux.
(Deprecated)An option that will be removed in future versions.

The user is encouraged to read the Linux README, since there are also many other make targets (beyond modules_install and install). Each will configure the kernel, but with different features activated, or using a different interactive interface; such as tinyconfig or allyesconfig.

simple (but effective) workflow

  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_install, make install.

See also

Related Research Articles

<span class="mw-page-title-main">Package manager</span> Software tools for handling software packages

A package manager or package-management system is a collection of software tools that automates the process of installing, upgrading, configuring, and removing computer programs for a computer in a consistent manner.

<span class="mw-page-title-main">Security-Enhanced Linux</span> Linux kernel security module

Security-Enhanced Linux (SELinux) is a Linux kernel security module that provides a mechanism for supporting access control security policies, including mandatory access controls (MAC).

<span class="mw-page-title-main">GNU Autotools</span> Suite of programming tools

The GNU Autotools, also known as the GNU Build System, is a suite of programming tools designed to assist in making source code packages portable to many Unix-like systems.

<span class="mw-page-title-main">APT (software)</span> Free software package management system

Advanced package tool, or APT, is a free-software user interface that works with core libraries to handle the installation and removal of software on Debian, and Debian-based Linux distributions. APT simplifies the process of managing software on Unix-like computer systems by automating the retrieval, configuration and installation of software packages, either from precompiled files or by compiling source code.

<span class="mw-page-title-main">GNU GRUB</span> Boot loader package

GNU GRUB is a boot loader package from the GNU Project. GRUB is the reference implementation of the Free Software Foundation's Multiboot Specification, which provides a user the choice to boot one of multiple operating systems installed on a computer or select a specific kernel configuration available on a particular operating system's partitions.

freedesktop.org (fd.o), formerly X Desktop Group (XDG), is a project to work on interoperability and shared base technology for free-software desktop environments for the X Window System (X11) and Wayland on Linux and other Unix-like operating systems. It was founded by Havoc Pennington, a GNOME developer working for Red Hat in March 2000. Some of the project's servers are hosted by Portland State University, sponsored by Hewlett-Packard, Intel, and Google.

Nucleus RTOS is a real-time operating system (RTOS) produced by the Embedded Software Division of Mentor Graphics, a Siemens Business, supporting 32- and 64-bit embedded system platforms. The operating system (OS) is designed for real-time embedded systems for medical, industrial, consumer, aerospace, and Internet of things (IoT) uses. Nucleus was released first in 1993. The latest version is 3.x, and includes features such as power management, process model, 64-bit support, safety certification, and support for heterogeneous computing multi-core system on a chip (SOCs) processors.

<span class="mw-page-title-main">SCons</span>

SCons is a computer software build tool that automatically analyzes source code file dependencies and operating system adaptation requirements from a software project description and generates final binary executables for installation on the target operating system platform. Its function is analogous to the traditional GNU build system based on the make utility and the autoconf tools.

modprobe is a Linux program originally written by Rusty Russell and used to add a loadable kernel module to the Linux kernel or to remove a loadable kernel module from the kernel. It is commonly used indirectly: udev relies upon modprobe to load drivers for automatically detected hardware.

<span class="mw-page-title-main">CMake</span> Cross-platform, compiler-independent build system generator

In software development, CMake is cross-platform free and open-source software for build automation, testing, packaging and installation of software by using a compiler-independent method. CMake is not a build system itself; it generates another system's build files. It supports directory hierarchies and applications that depend on multiple libraries. It is used in conjunction with native build environments such as Make, Qt Creator, Ninja, Android Studio, Apple's Xcode, and Microsoft Visual Studio. It has minimal dependencies, requiring only a C++ compiler on its own build system.

<span class="mw-page-title-main">EFI system partition</span> Partition used by Unified Extensible Firmware Interface

The EFIsystem partition or ESP is a partition on a data storage device that is used by computers having the Unified Extensible Firmware Interface (UEFI). When a computer is booted, UEFI firmware loads files stored on the ESP to start installing operating systems and various utilities.

configure script Executable script used when building programs

A configure script is an executable script designed to aid in developing a program to be run on a wide number of different computers. It matches the libraries on the user's computer, with those required by the program before compiling it from its source code.

The Environment Modules system is a tool to help users manage their Unix or Linux shell environment, by allowing groups of related environment-variable settings to be made or removed dynamically.

<span class="mw-page-title-main">ELinOS</span>

ELinOS is a commercial development environment for embedded Linux. It consists of a Linux distribution for the target embedded system and development tools for a development host computer. The development host computer usually is a standard desktop computer running Linux or Windows. The Linux system and the application software for the target device are both created on the development host.

<span class="mw-page-title-main">Qt Creator</span> QT development environment

Qt Creator is a cross-platform C++, JavaScript, Python and QML integrated development environment (IDE) which simplifies GUI application development. It is part of the SDK for the Qt GUI application development framework and uses the Qt API, which encapsulates host OS GUI function calls. It includes a visual debugger and an integrated WYSIWYG GUI layout and forms designer. The editor has features such as syntax highlighting and autocompletion. Qt Creator uses the C++ compiler from the GNU Compiler Collection on Linux. On Windows it can use MinGW or MSVC with the default install and can also use Microsoft Console Debugger when compiled from source code. Clang is also supported.

NixOS is a Linux distribution built on top of the Nix package manager. Its declarative configuration allows reliable system upgrades via several official channels of significant size and stability. NixOS has tools dedicated to DevOps and deployment tasks.

<span class="mw-page-title-main">Buildroot</span>

Buildroot is a set of Makefiles and patches that simplifies and automates the process of building a complete and bootable Linux environment for an embedded system, while using cross-compilation to allow building for multiple target platforms on a single Linux-based development system. Buildroot can automatically build the required cross-compilation toolchain, create a root file system, compile a Linux kernel image, and generate a boot loader for the targeted embedded system, or it can perform any independent combination of these steps. For example, an already installed cross-compilation toolchain can be used independently, while Buildroot only creates the root file system.

firewalld is a firewall management tool for Linux operating systems. It provides firewall features by acting as a front-end for the Linux kernel's netfilter framework. firewalld's current default backend is nftables. Prior to v0.6.0, iptables was the default backend. Through its abstractions, firewalld acts as an alternative to nft and iptables command line programs. The name firewalld adheres to the Unix convention of naming system daemons by appending the letter "d".

<span class="mw-page-title-main">Meson (software)</span> Build automation system

Meson is a software tool for automating the building (compiling) of software. The overall goal for Meson is to promote programmer productivity. Meson is free and open-source software written in Python, under the Apache License 2.0.

References