Manual firmware build¶
Quick guide to build firmware images for use in the lab (LG_IMAGE, TFTP, flash). The same DUT profiles apply whether the stack is vanilla OpenWrt, LibreMesh, or LibreRouter OS.
Build config per DUT¶
Pick Target System, Subtarget, and Target Profile in make menuconfig from this table (or the device vendor docs).
| DUT | Arch | Subtarget | Profile |
|---|---|---|---|
| Belkin RT3200 | Mediatek (ARM) | mt7622 | linksys_e8450-ubi |
| Banana Pi R4 | Mediatek (ARM) | filogic | bananapi_bpi-r4 |
| OpenWRT One | Mediatek (ARM) | filogic | openwrt_one |
| LibreRouter 1 | ath79 (MIPS 24Kc) | generic | librerouter_librerouter-v1 |
| Gateway TL-WDR3500 | ath79 (MIPS 74Kc) | generic | tplink_tl-wdr3500-v1 |
| QEMU x86-64 | x86 | x86_64 | generic |
| QEMU Malta BE | malta | be | generic |
| QEMU armsr-armv8 | armsr | armv8 | generic |
Path in menuconfig: Target System → (Arch) → Subtarget → Target Profile → (Profile).
1. Vanilla OpenWrt¶
Use when tests or workflows expect stock OpenWrt packages only (no lime-*, no LibreRouterOS bundle).
- Clone OpenWrt (pin a release branch or tag, e.g.
v23.05.5):
git clone -b v23.05.5 --single-branch https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
- Feeds (defaults only):
./scripts/feeds update -a
./scripts/feeds install -a
-
Configure target and profile:
make menuconfigusing the table above. Add any extra packages the suite requires. -
Build:
make -j$(nproc)
Artifacts: bin/targets/<target>/<subtarget>/.
References: OpenWrt build system, install build dependencies.
2. LibreMesh (lime-packages)¶
Use for community mesh images: add the LibreMesh feeds and select lime-* packages (as required by the test suite or libremesh-tests).
1. Clone OpenWrt and enter build root
git clone -b v23.05.5 --single-branch https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
2. Feeds - OpenWrt default + LibreMesh
cp feeds.conf.default feeds.conf
cat << 'EOF' >> feeds.conf
src-git libremesh https://github.com/libremesh/lime-packages.git;v2024.1
src-git profiles https://github.com/libremesh/network-profiles.git
EOF
v2024.1 matches OpenWrt 23.05.5. Using master without a tag typically tracks OpenWrt 24.10+.
3. Update and install packages
./scripts/feeds update -a
./scripts/feeds install -a
4. make menuconfig - Deselect
| Location | Action |
|---|---|
| Image configuration → Separate feed repositories → Enable feed libremesh | Deselect |
| Image configuration → Separate feed repositories → Enable feed profiles | Deselect |
| Base system → dnsmasq | Deselect |
| Network → odhcpd-ipv6only | Deselect |
5. make menuconfig - Select LibreMesh (example set)
| Location |
|---|
| LibreMesh → babeld-auto-gw-mode |
| LibreMesh → Offline Documentation → lime-docs-minimal |
| LibreMesh → lime-app |
| LibreMesh → lime-hwd-openwrt-wan |
| LibreMesh → lime-proto-anygw |
| LibreMesh → lime-proto-babeld |
| LibreMesh → lime-proto-batadv |
| LibreMesh → shared-state → shared-state-babeld_hosts |
| LibreMesh → shared-state → shared-state-bat_hosts |
| LibreMesh → shared-state → shared-state-nodes_and_links |
Set Target System / Profile from the DUT table.
5.1 Virtual targets with vwifi (optional)
For mesh tests in QEMU (x86-64, Malta, armsr-armv8) with virtual WiFi:
| Step | Action |
|---|---|
| Feeds | Add to feeds.conf: src-git vwifi https://github.com/javierbrk/vwifi_cli_package |
| Update | ./scripts/feeds update vwifi && ./scripts/feeds install -a |
| Menuconfig | Network → vwifi |
| wpad | Include wpad-basic-mbedtls (needed for batman on vwifi) |
6. Build
make -j$(nproc)
Output layout: bin/targets/.../.
Upstream: libremesh.org development.
3. LibreRouter OS¶
LibreRouterOS is also an OpenWrt-based tree with feeds and defaults oriented to LibreRouter hardware with LibreMesh networking capabilities. Prebuilt images: GitLab releases.
Dependencies: Same base toolchain as OpenWrt (install packages for your distro).
Build steps (from upstream README)
- Clone and enter the repo:
git clone https://gitlab.com/librerouter/librerouteros.git
cd librerouteros
Use a tag or branch that matches the release you need (e.g. check branches / tags on GitLab).
- Feeds:
./scripts/feeds update -a
./scripts/feeds install -a
- Default configuration:
cp configs/default_config .config
- Non-LibreRouter board: apply the vendor patch so cmdline defaults match generic hardware:
patch -p1 < configs/revert-cmdline-config.patch
-
Optional:
make menuconfigto change target profile (see DUT table for lab devices) or packages. -
Build:
make -j$(nproc)
Firmware appears under bin/ as in standard OpenWrt.