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
This commit is contained in:
parent
384919f8fc
commit
cb00e3fd43
4 changed files with 69 additions and 3 deletions
38
.github/workflows/ci.yml
vendored
Normal file
38
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
name: ci
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: '17 3 * * 1' # weekly: track upstream blob updates
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Fetch MediaTek WiFi blobs (linux-firmware HEAD)
|
||||||
|
run: tools/fetch_blobs.sh firmware/mediatek
|
||||||
|
- name: Tests (golden manifests, ELF emitter)
|
||||||
|
run: make test
|
||||||
|
env:
|
||||||
|
MTK_FW_DIR: ${{ github.workspace }}/firmware/mediatek
|
||||||
|
|
||||||
|
track:
|
||||||
|
if: github.event_name == 'schedule'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Clone linux-firmware history
|
||||||
|
run: |
|
||||||
|
git clone --no-checkout https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git lf
|
||||||
|
- name: Walk blob history
|
||||||
|
run: python3 tools/fw_history.py lf -o /tmp/history.jsonl
|
||||||
|
- name: Report new revisions since last committed dataset
|
||||||
|
run: |
|
||||||
|
diff <(cat dataset/history.jsonl) /tmp/history.jsonl > /tmp/history.diff || true
|
||||||
|
wc -l /tmp/history.diff
|
||||||
|
head -100 /tmp/history.diff || true
|
||||||
|
- uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: upstream-history-${{ github.run_id }}
|
||||||
|
path: /tmp/history.jsonl
|
||||||
5
Makefile
5
Makefile
|
|
@ -2,7 +2,7 @@ BLOBS ?= $(wildcard /lib/firmware/mediatek/mt79*_wm.bin) \
|
||||||
$(wildcard /lib/firmware/mediatek/mt79*_wa.bin) \
|
$(wildcard /lib/firmware/mediatek/mt79*_wa.bin) \
|
||||||
$(wildcard /lib/firmware/mediatek/mt79*_rom_patch.bin)
|
$(wildcard /lib/firmware/mediatek/mt79*_rom_patch.bin)
|
||||||
|
|
||||||
.PHONY: help extract test elf
|
.PHONY: help extract test elf fetch-fw
|
||||||
|
|
||||||
help:
|
help:
|
||||||
@echo "make extract - carve all MediaTek Connac2 blobs found on this host"
|
@echo "make extract - carve all MediaTek Connac2 blobs found on this host"
|
||||||
|
|
@ -16,3 +16,6 @@ test:
|
||||||
|
|
||||||
elf:
|
elf:
|
||||||
python3 tools/mtk_fw_elf.py $(BLOBS) -o extracted
|
python3 tools/mtk_fw_elf.py $(BLOBS) -o extracted
|
||||||
|
|
||||||
|
fetch-fw:
|
||||||
|
tools/fetch_blobs.sh firmware/mediatek
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,15 @@ REPO = Path(__file__).resolve().parent.parent
|
||||||
FW = Path(os.environ.get('MTK_FW_DIR', '/lib/firmware/mediatek'))
|
FW = Path(os.environ.get('MTK_FW_DIR', '/lib/firmware/mediatek'))
|
||||||
|
|
||||||
# filename -> (chip_id, eco, n_region, hidden_trailer_string_or_None)
|
# filename -> (chip_id, eco, n_region, hidden_trailer_string_or_None)
|
||||||
|
# Golden values observed from linux-firmware HEAD (2026-06-19 tree:
|
||||||
|
# mt7981/mt7986 = 20260515 builds; mt7915/mt7916 = 2022/2024 builds,
|
||||||
|
# unchanged since). When a value here fails against a newer snapshot, the
|
||||||
|
# blob changed — update the golden *and* record the diff (docs/reports/).
|
||||||
GOLDEN_WM = {
|
GOLDEN_WM = {
|
||||||
'mt7981_wm.bin': (0x14, 0, 11,
|
'mt7981_wm.bin': (0x14, 0, 11,
|
||||||
't-neptune-main-mt7915-1953-MT7981_MP2111_IMP-20240823161204'),
|
't-neptune-main-mt7915-1953-MT7981_MP2111_IMP-20260515121129'),
|
||||||
'mt7986_wm.bin': (0x0f, 0, 11,
|
'mt7986_wm.bin': (0x0f, 0, 11,
|
||||||
't-neptune-main-mt7915-1953-MT7986_MP2111_IMP-20240823160608'),
|
't-neptune-main-mt7915-1953-MT7986_MP2111_IMP-20260515120228'),
|
||||||
'mt7916_wm.bin': (0x13, 0, 9,
|
'mt7916_wm.bin': (0x13, 0, 9,
|
||||||
't-neptune-main-mt7915-1953-MT7916_MP2111_IMP-20240823170147'),
|
't-neptune-main-mt7915-1953-MT7916_MP2111_IMP-20240823170147'),
|
||||||
'mt7915_wm.bin': (0x0b, 1, 7,
|
'mt7915_wm.bin': (0x0b, 1, 7,
|
||||||
|
|
|
||||||
21
tools/fetch_blobs.sh
Executable file
21
tools/fetch_blobs.sh
Executable file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# Fetch MediaTek Connac2 WiFi blobs from linux-firmware (cgit plain URLs).
|
||||||
|
# No clone, ~8 MB total. Usage: tools/fetch_blobs.sh [destdir]
|
||||||
|
set -e
|
||||||
|
DEST=${1:-firmware/mediatek}
|
||||||
|
BASE=https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain
|
||||||
|
mkdir -p "$DEST"
|
||||||
|
for f in \
|
||||||
|
mt7915_wm.bin mt7915_wa.bin mt7915_rom_patch.bin \
|
||||||
|
mt7916_wm.bin mt7916_wa.bin mt7916_rom_patch.bin \
|
||||||
|
mt7981_wm.bin mt7981_wa.bin mt7981_rom_patch.bin mt7981_wo.bin \
|
||||||
|
mt7986_wm.bin mt7986_wa.bin mt7986_rom_patch.bin mt7986_wo_0.bin mt7986_wo_1.bin
|
||||||
|
do
|
||||||
|
if [ -s "$DEST/$f" ]; then
|
||||||
|
echo "have $f"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
echo "fetch $f"
|
||||||
|
curl -fsSL "$BASE/mediatek/$f" -o "$DEST/$f"
|
||||||
|
done
|
||||||
|
ls -l "$DEST"
|
||||||
Loading…
Reference in a new issue