mtk-wifi-fw/tools/fetch_blobs.sh

21 lines
732 B
Bash
Executable file

#!/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"