menuconfig
Runmake menuconfig to open a curses-based interactive configuration interface:
.config file.
If no
.config file exists yet, make menuconfig will first run make defconfig to generate a minimal starting point, then open the interface.Three-way toggle
Most package entries support three states, cycled with the spacebar:| Symbol | State | Meaning |
|---|---|---|
* (y) | Built-in | Compiled directly into the firmware image |
M (m) | Module | Built as a separate .ipk / .apk package, not included in the image by default |
(n) | Excluded | Not compiled at all |
Key configuration sections
When you first openmenuconfig, the top-level categories include:
- Target System — the CPU architecture (e.g.
x86,ath79,ramips) - Subtarget — the specific chip family within the target
- Target Profile — the board or device profile
- Target Images — filesystem types and image formats to generate
- Global build settings — security hardening, stripping, package manager selection
- Base system — core OpenWrt utilities (busybox, procd, etc.)
- Administration, Boot Loaders, Development, Firmware, Kernel modules, Languages, Libraries, LuCI, Mail, Multimedia, Network, Sound, Utilities — package categories
Example: enabling a package
To includecurl in your firmware image:
- Open
make menuconfig - Navigate to Network
- Find curl and press spacebar until
<*>appears - Press S to save, then Q to quit
make invocation will compile and bundle curl into the image.
The .config file
All selections are stored in.config at the root of the source tree. You can view, copy, or version-control this file directly.
.config by copying a known-good config file before running make menuconfig.
defconfig
make defconfig generates a minimal .config based on the current Kconfig defaults. It is useful as a clean starting point or to fill in missing symbols after a tree update:
Minimal diff configs with diffconfig.sh
A full.config contains thousands of lines — most of them defaults. The scripts/diffconfig.sh script extracts only the symbols that differ from defaults, producing a compact config fragment suitable for version control or sharing:
Global build settings
The Global build settings menu (fromconfig/Config-build.in) exposes additional build-time options:
- Enable experimental features — opt in to bleeding-edge, potentially unstable features
- Use APK instead of OPKG — switch the package manager used to assemble the image (APK is the new default)
- Cryptographically signed package lists — enabled by default
- Compile packages with debugging info — adds
-g3toCFLAGS - Binary stripping method — controls how binaries are stripped to reduce size
- Stack-Smashing Protection, ASLR PIE, RELRO, FORTIFY_SOURCE — hardening options