use make menuconfig
Kernel Development
William Patterson  

Configure Kernel with make menuconfig

you want a quick path to the right kernel option, and make menuconfig should get you there fast without guesswork.

I’ll show how to search the Kconfig tree, spot dependencies, and reach the exact menu path for symbols like FRAME_POINTER. The TUI search (press “/”) lists the symbol, its Depends on, who Selected by, and the location path — or tells you when an option is not user-selectable.

We’ll clear up why some items vanish — architecture-controlled flags, truncated lines, or missing toolchain bits. I’ll explain saving the .config file, what “apply” actually means, and when a rebuild is needed.

Along the way you get practical tips for navigating network options in the tree, avoiding common pitfalls, and a repeatable flow that keeps your system builds predictable. Expect clear answers to the question of where toggles live and why they sometimes hide.

Table of Contents

Key Takeaways

  • Search inside the UI with “/” to find symbols and paths quickly.
  • Read “Depends on” and “Selected by” to know why an option appears or not.
  • Some flags are set by architecture Kconfig, not the TUI.
  • Save the .config file and know when a rebuild is required.
  • Follow a repeatable tree workflow to keep system changes safe.

What you’ll achieve and what you need before starting

Before you change any toggle, let’s confirm the goal: navigate the tree, search for symbols, and alter options safely so unrelated parts stay intact.

Understanding the goal

I want you to finish confident. You will find symbols quickly, read dependencies, and edit one setting at a time. That keeps builds predictable and reduces wasted times.

Prerequisites

Run builds in a full kernel source tree — not in linux-headers. Headers-only trees give errors like missing syscall tables or wrong compiler flags.

ItemWhy it mattersQuick check
Full source treeProvides all Kconfig and build rulesContains top-level Makefile and arch/
ToolchainGCC/Clang and binutils must match target machinegcc –version, ld –version
.config write accessChanges persist only if writablels -l .config
Terminal widthPrevents truncated “Selected by” linesResize terminal wide
ARCH and CROSS_COMPILE environment variablePoints the build at the right machineexport ARCH=…; export CROSS_COMPILE=…

When unsure, start from a known default with the command make defconfig or make olddefconfig. Plan which symbols you will edit before opening the UI — it saves hours over wandering.

How to use make menuconfig to navigate kernel options

Start in the source root so the UI reads your active .config and shows only relevant choices. This saves time and reduces accidental edits.

Launching the interface and loading your current config

From the kernel source root run the command make menuconfig. It reads .config and opens a curses UI with a hierarchical tree of options.

Use arrow keys and Enter to drill down. Press Esc to go up a level. These simple moves get you to common targets like Kernel hacking and Networking support.

Moving through menus like Kernel hacking and Networking

Navigate to debug flags in Kernel hacking or protocol toggles inside Networking support. I often follow the path shown in search results rather than hunting by eye.

Power search with the “/” key to find symbols and their paths

Press “/” and type a symbol (example: FRAME_POINTER). The search prints the prompt, definition file, Depends on, Selected by, and the Location path if it is selectable.

Type the result index to jump straight to the target menu. If Location is missing, that config isn’t shown in the UI—often controlled by architecture or being Selected by another option.

  • Quick command: run from source root.
  • Search with “/” to reveal file and path.
  • Save the .config file frequently to avoid repeated edits across times of trial.

Finding tricky options (like FRAME_POINTER) and understanding dependencies

A focused symbol lookup often reveals whether an option is exposed to you or driven by hidden rules.

Search for FRAME_POINTER with the TUI search. The entry shows the brief description, the Kconfig file (lib/Kconfig.debug), the Depends on line, and any Selected by clauses.

Example: locate FRAME_POINTER

FRAME_POINTER reads as “Compile the kernel with frame pointers.” It typically appears under Kernel hacking → Compile-time checks and compiler options.

Reading Depends on and Selected by

Depends on gates visibility. If DEBUG_KERNEL or your architecture flags are off, the option will be hidden.

Selected by lists symbols that force-enable the option. If another debug feature selects FRAME_POINTER, you can’t toggle it off directly.

Architecture knobs and absent Location

Some architectures set ARCH_WANT_FRAME_POINTERS in their Kconfig. That can expose FRAME_POINTER even when general conditions seem unmet.

When the search shows no Location, the symbol is not user-selectable in the TUI. It may be configured by platform Kconfig or forced by other entries.

  • Search and note the path index to jump straight to the entry.
  • Widen the terminal if long Selected by lines truncate.
  • When in doubt, grep -R “FRAME_POINTER” to trace definitions and who selects it.
CheckWhy it mattersQuick action
Depends onControls if the config showsEnable required gating symbols
Selected byForces value regardless of togglesFind and adjust the selecting symbol
Location absentNot user-editableTrace architecture Kconfig

Save, apply, and build: from .config to a working kernel

Saving changes is only the start — building is what applies configuration to the system.

After you press Save in the UI, copy .config to keep a snapshot. I recommend a local backup like cp .config .config.bak and committing the file to version control so you can share diffs and roll back easily.

kernel config

Export variables and track updates

For cross builds export ARCH and CROSS_COMPILE as environment variable entries. Consistent environment across machines reduces surprising failures and makes builds reproducible.

Apply versus build and common errors

There’s no runtime “apply” — applying a small network toggle still requires compiling affected modules or a full kernel image. Choose the right build target: make -jN, modules_install, and install for distributions, or your board image target for embedded systems.

SymptomCauseAction
missing syscall_32.tblBuilt in headers treeBuild in full kernel source
unsupported -fstack-protector-strongToolchain mismatchInstall compatible toolchain or change protector
CONFIG_X86_X32 setNo binutils supportInstall binutils or disable x32 option

When possible rebuild only the minimal delta, but expect core toggles to force broader work. Finally, validate by booting the new kernel or loading updated modules and confirming the behavior matches your expectations.

Next steps to validate your configuration and avoid rebuild surprises

I recommend a short validation pass before you build a new kernel. Verify the running config with zcat /proc/config.gz or compare /boot/config-* against your saved .config to ensure toggles match what you expect.

Check that modules landed in /lib/modules/$(uname -r) and that timestamps match your latest build — that catches partial installs early. Run oldconfig or olddefconfig to reconcile new options with your defaults and reduce unexpected prompts.

Pin compiler and binutils versions and record them with your configuration file. Try localmodconfig to trim the build to drivers you actually need. Keep .config in version control and script the full target sequence so team members can reproduce the build steps.

When things fail, diff yesterday’s and today’s config files and grep the build log for the first error line — that often gives the direct answer. Document what worked and share notes with your teams to shorten the cycle on future questions.

FAQ

What will I achieve by following the "Configure Kernel with make menuconfig" brief?

You’ll learn to navigate the kernel configuration interface, find and change options safely, and prepare a .config suitable for building a kernel or module. This covers loading your current config, using searches, reading dependencies, and exporting environment variables used by build scripts.

What prerequisites do I need before starting?

You need the kernel source tree for your target kernel version, a working cross‑toolchain or native compiler, terminal sizing that supports the ncurses UI, and write access to the .config file in the source tree. Also ensure required build tools like make, gcc, and bc are installed.

How do I launch the menu-based configuration and load my current .config?

From the kernel source directory run make menuconfig to start the ncurses UI; if a .config exists it loads automatically. If you use a different target or KCONFIG_CONFIG environment variable, export that first so the interface reads the right file.

How do I move through menus like Kernel hacking and Networking?

Use arrow keys to navigate, Enter to open a menu, Space to toggle options, and Esc to go up. Menus are grouped logically—look under “Kernel hacking” for debugging and compile-time checks, and “Networking” for protocol and driver options.

How can I quickly find a symbol or option inside the menu?

Press “/” to open the search dialog and type the symbol name or keyword. The search shows the symbol, its current value, location path within menus, and references such as “Depends on” or “Selected by.” This speeds up locating obscure options.

Where do I find tricky options like FRAME_POINTER and similar compiler flags?

Search for FRAME_POINTER with the power search. You’ll often find it under “Kernel hacking → Compile-time checks and compiler options” or as architecture-specific knobs such as ARCH_WANT_FRAME_POINTERS. The search reveals whether it’s user-selectable or controlled by architecture defaults.

How do I interpret "Depends on" and "Selected by" lines?

“Depends on” lists conditions that must be true for an option to appear. “Selected by” indicates other options force this one to be enabled. If dependencies aren’t met, the option may be hidden or auto-enabled by other settings—adjust dependent symbols to expose the option.

Why do some options never show up in the menuconfig tree?

Some config symbols are set by architecture-specific defaults (like ARCH_WANT_FRAME_POINTERS) or by top-level Kconfig logic and have no “Location” — they aren’t user-selectable. These are intentionally hidden because changing them would break ABI or rely on compiler flags outside the Kconfig scope.

What should I do when a symbol’s "Location" is absent?

If there’s no location, the symbol isn’t intended for interactive selection. Check the Kconfig file in the source tree or examine the architecture Kconfig fragments. You may need to patch Kconfig or set build-time variables in your build system instead.

How do I save changes and ensure my .config is tracked correctly?

Press Save inside the menu to write .config. Commit .config to your version control or export its path via KCONFIG_CONFIG for build automation. Use scripts to timestamp or diff .config so you track updates across months and kernel versions.

When is it appropriate to apply a small config change vs. rebuilding the entire kernel?

For minor toggles that affect loadable modules, you may only need to rebuild affected modules. For changes in core subsystems or core compiler options, rebuild the full kernel and modules. Inspect “make” targets like bzImage, modules, and INSTALL to choose the right build steps.

What common build errors should I expect and how do I fix them?

Typical errors include missing toolchain components, mis-sized terminal leading to UI glitches, or unresolved dependencies from config changes. Fix by installing required packages, resizing the terminal, checking Kconfig dependencies, and running make clean or using correct make targets.

How do I export environment variables to reproduce a configuration build later?

Export variables such as KBUILD_OUTPUT to separate build trees and KCONFIG_CONFIG to point at your config file. Record CC, CROSS_COMPILE, and ARCH if using a cross-compile environment so teams can reproduce builds on different machines.

How can I validate my configuration before committing to a long rebuild?

Run make olddefconfig or make oldconfig to ensure dependencies are resolved. Build small targets like modules or specific drivers first. Use automated tests or boot a test image in a VM to validate runtime behavior and avoid surprises after months of changes.

How do architecture knobs like ARCH_WANT_FRAME_POINTERS affect visible options?

Architecture knobs set defaults or force certain symbols. If ARCH_WANT_FRAME_POINTERS is enabled by the architecture, the FRAME_POINTER option may be hidden or locked. To change it you must alter the architecture Kconfig or adjust the arch/Makefile—this may not be safe for ABI stability.

Where can I find the Kconfig file that controls a specific option’s visibility?

The search results in the UI show the Kconfig filename and the path. You can also grep the source tree for the symbol name to find the Kconfig fragment. Inspect that file to understand “depends on” and choice logic that govern visibility.

How do I handle configuration differences between upstream kernels and a distribution’s patched tree?

Compare .config files and Kconfig fragments across trees. Distributions may add patches that change defaults or add options. Track changes with git, test in a VM, and reconcile environment variables and build targets specific to the distro’s packaging system.

Can I share my configuration and expect others to reproduce it exactly?

Yes—if you share the exact .config plus build environment details (ARCH, CROSS_COMPILE, kernel version, and toolchain). Also share the source tree commit and any patches. That ensures teammates can reproduce builds and avoid discrepancies caused by different kernel versions or tools.

What commands should I use to build a new kernel after saving .config?

Typical commands are make -j$(nproc) to compile, make modules_install and make install to deploy. For specific targets use make bzImage or image targets for your architecture. Use the appropriate INSTALL paths and update bootloader entries on the machine you’ll boot.

How do I avoid breaking a running system when testing new configs?

Test in a virtual machine or on a disposable device. Keep a known-good kernel entry in your bootloader, and retain the old initramfs. Validate network and storage drivers before switching. This reduces downtime and avoids losing remote access to production machines.