Tooling, docs, and update tracking for MediaTek Connac2 WiFi firmware (mt7915/16/7981/86) — Filogic routers
Find a file
2026-08-22 00:08:54 +04:00
.github/workflows CI: push tests vs linux-firmware HEAD blobs (cgit fetch, no clone), weekly track job walking history + artifact; goldens updated to 2026 builds per policy 2026-08-20 21:25:47 +04:00
dataset Stage 0 complete: walking human detected via RSSI (spread 3->12dB, ~3dB body shadow); windowed analyzer 2026-08-21 23:57:17 +04:00
docs docs: CSI-project-stages — staged sensing roadmap (RSSI rehearsal → patched-driver CSI → deterministic DSP → firmware upgrades → deterministic SOTA) 2026-08-21 23:44:24 +04:00
tests Dataset-driven goldens: any tested blob must be a known linux-firmware revision (sha-keyed) matching recorded metadata; works for any snapshot; CI + fetch-fw target 2026-08-20 21:26:37 +04:00
tools CSI port: SmartRG/MTK CSI patch (Bo Jiao, MTK) rebased onto mt76 eb567bc7 (24.10.5 pin) — 4 rejects hand-merged (enum 0xc2 coexists with SPR_SET_PARAM; Makefile/vendor.h anchors); build via filogic SDK 2026-08-22 00:08:54 +04:00
.gitignore CSI port: SmartRG/MTK CSI patch (Bo Jiao, MTK) rebased onto mt76 eb567bc7 (24.10.5 pin) — 4 rejects hand-merged (enum 0xc2 coexists with SPR_SET_PARAM; Makefile/vendor.h anchors); build via filogic SDK 2026-08-22 00:08:54 +04:00
LICENSE Scaffold: licenses, Makefile, README, PLAN w/ decision function; extractor parses container + hidden build-string trailer; findings log F1-F4 + unknowns registry 2026-08-20 21:09:43 +04:00
Makefile CI: push tests vs linux-firmware HEAD blobs (cgit fetch, no clone), weekly track job walking history + artifact; goldens updated to 2026 builds per policy 2026-08-20 21:25:47 +04:00
PLAN.md P1-B: Ghidra/PyGhidra toolchain scripts; patch blob structure + first decompilation findings (F5): ROM replacement table, assert anchors, N9/CCIF/mailbox evidence 2026-08-20 21:51:36 +04:00
README.md Docs: format spec (cited field tables), boot architecture (WM/WA/WO + load sequence), README quickstart 2026-08-20 21:24:28 +04:00

mtk-wifi-fw (working name)

Tooling, documentation, and update tracking for MediaTek Connac2 WiFi firmware blobs (mt7915/7916/7981/7986_{wm,wa,rom_patch}.bin as shipped in linux-firmware) — the WiFi firmware running on Filogic 820/830 routers (GL.iNet, Banana Pi, Xiaomi, Netgear, TP-Link, ...).

MTK strips version strings from these blobs (fw_ver = "____000000") and ships silent updates; this project recovers the version metadata, documents the container formats, and diffs builds so changes are visible.

What's here

  • tools/mtk_fw_extract.py — carve containers into regions + manifest (plaintext NDS32 code/data at true load addresses)
  • tools/mtk_fw_elf.py — emit EM_NDS32 ELF per blob (Ghidra-ready, PT_LOAD per region)
  • tools/fw_history.py — walk a linux-firmware git checkout and recover every revision's build metadata → dataset/history.jsonl
  • tools/fw_diff.py — version diff: region-aligned byte equality + plausible string-set changes (the human-readable changelog)
  • docs/format.md — container format spec, cited to kernel source
  • docs/boot.md — the four images / three cores, load sequence, cited
  • docs/findings.md — verified-claims log + unknowns registry
  • docs/reports/ — pilot version-diff reports (mt7981 2022→2024→2026)
  • tests/ — golden-manifest + emitter tests

Quickstart

# any host with linux-firmware's mediatek blobs (or set MTK_FW_DIR):
make extract     # carve every mt79xx wm/wa/patch blob found
make elf         # emit ELFs into extracted/<blob>/<blob>.elf
make test        # golden tests (skips if no blobs present)

# full dataset from linux-firmware history (~5 min clone):
git clone https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git firmware/linux-firmware
python3 tools/fw_history.py firmware/linux-firmware -o dataset/history.jsonl
python3 tools/fw_diff.py old.bin new.bin --md report.md

No proprietary firmware bytes are committed to this repository. Tools operate on blobs from your own linux-firmware copy. Derived artifacts under extracted*/ and firmware/ are gitignored.

Conventions

Every documented claim cites evidence (kernel source line, blob offset) or is marked unknown — see docs/findings.md. When a golden test fails against a newer snapshot, the blob changed: update the golden and record the diff.

License: MIT (code), CC-BY-SA-4.0 (docs). Project log and decision function: PLAN.md.