OpenWrt's configuration system: menuconfig, target/subtarget/device and feeds
Grow through practice
No need to finish reading — test nowOne line: OpenWrt's
.configis engine input; target/subtarget/device is the target; feeds are the package source. Together, they build many firmwares from one source tree.
What decides a build
target/linux/<target>/
├─ <subtarget>/
│ ├─ target.mk # ARCH / BOARDNAME
│ ├─ config-6.6 # kernel config
│ └─ ...
└─ image/Makefile # DEVICE_* / DEVICE_PACKAGES / IMAGES
feeds.conf # where packages come from
.config # final choices: target + device + packages
make reads .config; Kconfig handles dependencies; the image Makefile produces images.
target / subtarget / device
For armsr:
target armsr
subtarget armv8
device generic
target: architecture family/platform;subtarget: subdivision (armv7/armv8, x86/64…);device: concrete device,DEVICE_generic,DEVICE_bananapi_bpi-r3, etc.
In .config:
CONFIG_TARGET_armsr=y
CONFIG_TARGET_armsr_armv8=y
CONFIG_TARGET_armsr_armv8_DEVICE_generic=y
Device-level packages live in the image Makefile:
define Device/generic
DEVICE_TITLE := Generic EFI Boot
DEVICE_PACKAGES += kmod-e1000e kmod-vmxnet3 ...
endef
Note: DEVICE_PACKAGES is a device default, not a “product recipe”.
menuconfig / defconfig / scripts/config
Three common paths:
make menuconfig # interactive target/device/packages
make defconfig # fill defaults and fix .config
./scripts/config --set-val CONFIG_TARGET_armsr y # script one option
menuconfigfor exploration;defconfigfor CI/scripts;scripts/configfor small edits, but it does not resolve dependencies; still runmake defconfig.
feeds: where packages come from
Many OpenWrt packages live in feeds, not the main tree:
./scripts/feeds update -a
./scripts/feeds install -a
feeds.conf records sources/versions; .config has CONFIG_PACKAGE_<name>=y.
So “it builds” depends on:
- feeds being fetched;
- matching feed revisions;
- packages being available for the current target.
What ImageBuilder's profile is
OpenWrt also has ImageBuilder:
make image PROFILE=<device> PACKAGES="..."
Here PROFILE is a device profile (from target image metadata), not a prplOS YAML product recipe. It swaps packages on prebuilt binaries; it does not compose products from source.
Why this is enough for OpenWrt
- one tree supports many targets/devices;
- Kconfig resolves dependencies;
- feeds provide the package ecosystem;
defconfigmakes.configscriptable.
For teams building one or a few devices, this is the most direct path.
Its boundaries
When you maintain:
- many boards (x86/IPQ/MTK/mvebu/MXL/Airoha);
- many product shapes (Gateway/Extender/LCM/Mgmt/Security);
- many feeds (AMX/prplmesh/prplos/vendor);
- multiple combinations that CI must reproduce;
.config becomes a huge artifact, not a reviewable source. That is when prplOS's profiles + gen_config.py becomes useful:
→ Why prplOS adds another CONFIG layer on top of OpenWrt
Verification status (site mission)
- ✅ source/docs: target/device naming in
target/linux/armsr,target.mk,image/Makefile, andgen_config.pychecked; - ✅ config result:
qemu_armsrproduced.configwithTARGET_armsr/armv8/DEVICE_generic; - ⚠️ no full OpenWrt build: this is about the configuration system, not a claim that the whole tree built;
- ❓ ImageBuilder details: version differences in
PROFILE/PACKAGESare not covered.
One sentence
OpenWrt uses Kconfig to decide “how”, target/subtarget/device to decide “for whom”, and feeds to decide “where packages come from”. That is enough for firmware; when product combinations grow, prplOS's profile layer starts to pay off.
Docs: OpenWrt build system · ImageBuilder Source: armsr target Counterpart: Why prplOS adds a CONFIG layer · GEN_CONFIG armsr Series: OpenWrt.
Comments 0
No comments yet — be the first!