OpenWrt uses a layered, fragment-based approach to Linux kernel configuration. Rather than maintaining a single monolithicDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/openwrt/openwrt/llms.txt
Use this file to discover all available pages before exploring further.
.config file, configuration is split across several files that are merged at build time.
How Kernel Config Is Assembled
The build system merges kernel config fragments in the following order:scripts/kconfig.pl to produce the final .config that is passed to the Linux build system.
Kernel Config Targets
| Make Target | Description |
|---|---|
make kernel_menuconfig | Open the kernel’s interactive ncurses configurator |
make kernel_nconfig | Open the kernel’s nconfig (alternative ncurses) configurator |
make kernel_xconfig | Open the kernel’s Qt-based xconfig configurator |
make kernel_oldconfig | Update config to a newer kernel version non-interactively |
CONFIG_ Option Format
All kernel options follow the standard Linux Kconfig format:Built-in vs. Loadable Modules
Kernel features can be compiled in three ways:| Setting | Meaning |
|---|---|
CONFIG_FOO=y | Built into the kernel image (always present) |
CONFIG_FOO=m | Built as a loadable kernel module (.ko file) |
# CONFIG_FOO is not set | Disabled entirely |
kmod Packages
OpenWrt wraps loadable kernel modules into installablekmod-* packages. When a module is built as =m, the build system packages the resulting .ko file and its dependencies into an IPK that can be installed with opkg.
Example: kmod-usb-serial installs usb-serial.ko and its dependencies into the firmware or as an installable package.
The naming convention is:
target/linux/<target>/modules.mk and target/linux/generic/modules.mk.
Adding a Kernel Module Package
To expose a kernel module as an installable package, add it to the appropriatemodules.mk:
KCONFIG variable references the kernel Kconfig symbol. AUTOLOAD controls whether the module is loaded automatically at boot via /etc/modules.d/.
Target Config Fragment Example
This is an excerpt fromtarget/linux/ath79/config-6.12:
generic/config-<version>.