Skip to content

About

Docker image for building the MediaTek OpenWrt SDK

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

OpenWrt MTK SDK Builder (OpenWrt 25.12, MT7988, BPI‑R4, 8GB RAM Support)

Debian based Docker image for building the MediaTek OpenWrt SDK against OpenWrt 25.12, with full support for the Banana Pi R4, including the 8GB RAM variant.

Warning

Why you should build your own images? Trust No One (Not Even This Repo)

Routers are high-value targets, from a security perspective, you should never blindly install firmware images or packages from unverified sources on your router. This applies to "Release" binaries found in any GitHub repository—including this one. There are no guarantees that a downloaded artifact exactly matches the open-source code, and even when generated via GitHub Actions, ruling out CI supply chain attacks is incredibly difficult. (Even official OpenWrt repositories have faced supply chain risks in the past, though they are generally considered safe).

To protect your privacy and ensure your router doesn't end up in a botnet, either use the official OpenWrt mainline images or build your own using tools like this repository.

The image backports OpenWrt PR #21437 by @frank-w (8GB DRAM support) into the OpenWrt 25.12 branch pre‑prepared with autobuild.sh prepare. The Dockerfile itself and the remaining patches, are based on the build scripts maintained by @woziwrt and @chenglong-do

All that is done here is to mix these and write it into a docker image for multi-platform usage, reproducibility and clean state management.


Build the Docker Image

docker build --tag openwrt-mtk-builder_openwrt25.12_4bg .

Run an Interactive Build Environment

docker run -it openwrt-mtk-builder_openwrt25.12_4bg bash

This drops you into a fully prepared OpenWrt/MTK SDK environment where you can rebuild, inspect logs, or modify configs.

From here you can run:

make menuconfig

to add/remove packages to the build.

Build

To run the build:

bash ../mtk-openwrt-feeds/autobuild/unified/autobuild.sh filogic-mac80211-mt798x_rfb-wifi7_nic build

The final images will be located at:

/home/build/openwrt/bin/targets/mediatek/filogic

Notes

  • OpenWrt and MTK feed revisions are pinned.
  • All modifications are applied via patches.
  • The resulting images boot cleanly on the Banana Pi R4 (8GB RAM model) for all: eMMC, SNAND and SDcard. There is currently an issue when booting from NAND where the boot procedure hangs after loading the kernel with: "Waiting for root device: /dev/fit0". To fix this you can install only the sysupgrade squashfs part from openwrt online snapshots. Fixed with 865229fa
  • This Docker image is developed and tested on macos M5, so it pulls Debian for ARM. Packages installed with apt may differ between ARM and x86 hosts.
  • This repository is not intended to upstream or distribute any code or images; it provides a practical build environment to generate working images in multiple host architectures, without dealing with MTK SDK quirks.

References

About

Docker image for building the MediaTek OpenWrt SDK

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages