Hi everyone,
I'm sharing a tool I developed to solve the typical frustrations with OpenWrt custom builds.
We all know the pain: standard Image Builders are fast but limited, while setting up a full build environment (SDK) on a PC is time-consuming and prone to breakage.
routerFW is a Docker-based wrapper that bridges this gap. It runs on Windows and Linux using a unified set of scripts.
GitHub Repository: https://github.com/iqubik/routerFW/blob/main/README.en.md
Latest Release: https://github.com/iqubik/routerFW/releases
Core Concept:
It separates your configuration (packages, settings, patches) from the build environment. You define your router's "State" in a profile, and the tool spins up a clean Docker container to build it.
Key Features (How it helps)
1. Stateful Upgrades / "Digital Twin"
- Simple: You don't need to reinstall packages manually after every upgrade.
- Technical: The tool uses a persistent
.confprofile. It aggregates your package lists, custom files (/etc/config), and build settings into a single reproducible definition. You can switch between Image Builder (fast update) and Source Build (deep mod) using the same profile.
2. Custom IPK Integration (Binary-to-Source)
- Simple: You can easily include custom apps or drivers that aren't in the official repo.
- Technical: The tool includes a dedicated Importer Utility. You place your
.ipkin a folder and run the import script. It parses thecontrolfile, extracts dependencies, and generates a valid OpenWrt Makefile wrapper. This allows the build system to resolve dependencies automatically, rather than just copying files to rootfs.
3. Official Kmod Compatibility (Vermagic Fix)
- Simple: Allows you to install official kernel modules (
opkg install kmod-...) even on a custom-built firmware. - Technical: When building from source, the tool can fetch the official release manifest, extract the upstream kernel hash, and patch
include/kernel-defaults.mk.
Note: This ensures version string compatibility. Please use with common sense—if you strip essential kernel features, official modules may still crash.
4. Cross-Platform & Clean
- Simple: Works on Windows (via Docker Desktop) and Linux. No mess left on your OS.
- Technical: All scripts automatically handle CRLF/LF normalization for hooks and configs. You don't need to worry about Windows text editors breaking shell scripts inside the container.
5. Interactive Fine-Tuning (for Source Builds)
- Simple: If you need to change a deep kernel option, you can launch the interactive
menuconfigdirectly from the main menu. - Technical: After you exit
menuconfig, the script detects the changes you made to.configand prompts you to automatically save them back into theSRC_EXTRA_CONFIGvariable in your profile. This makes kernel experimentation fast, reproducible, and non-destructive.
6. Smart Workspace & Cache Management
- Simple: The tool won't fill your hard drive with old build artifacts. A dedicated Maintenance menu helps you clean up what you don't need.
- Technical: It provides granular control over cleaning. You can selectively wipe the SDK cache, downloaded
.ipkpackages, theccache(object files), or the entire source directories. This helps manage disk space without forcing a full rebuild every time.
Workflow
- Setup: Run
_unpackerto pull the scripts and Docker environment. - Profile: Run the Wizard to generate a config for your device (or edit
profiles/my_router.confmanually). - Import (Optional): If you have external
.ipkfiles, run the Import Custom IPK script to generate Makefiles. - Build: Run
_Builder. It provides a clear dashboard of all your profiles. You can build a single profile or batch-build all profiles in parallel (supported on both Windows & Linux).
Sample Profile Config:
It is designed to be readable.
PROFILE_NAME="nanopi-r5c"
TARGET_PROFILE="friendlyarm_nanopi-r5c"
# Packages to include/exclude
COMMON_LIST="luci-app-sqm htop -dnsmasq dnsmasq-full"
# Source Build Settings
SRC_REPO="https://github.com/openwrt/openwrt.git"
SRC_BRANCH="v24.10.5"
# SRC_EXTRA_CONFIG='' can be used to inject kernel options
Screenshots
The main menu gives you an at-a-glance overview of each profile's resources, like custom files [F], package lists [P], source patches [S], or hooks [H].
Download & Source
The project is Open Source (GPLv3) and follows a "Zero Trust" development philosophy. The code is open for audit.
GitHub Repository: https://github.com/iqubik/routerFW/blob/main/README.en.md
Latest Release: https://github.com/iqubik/routerFW/releases
Feedback is welcome. If you have a board that needs a specific config preset, let me know.


