Skip to content

Instantly share code, notes, and snippets.

@oxavelar
Last active January 3, 2025 20:13
Show Gist options
  • Save oxavelar/6da4719039b01f1f11bbc56c920c9cbb to your computer and use it in GitHub Desktop.
Save oxavelar/6da4719039b01f1f11bbc56c920c9cbb to your computer and use it in GitHub Desktop.
Flint2 - MT6000 Wireless Firmware Override
# This will get the filenames in your currently running OpenWRT
# image and download to override into the firmware path.
#
# I've used this in my MT6000 to override the firmware to perform
# some A/B comparisions, and choose which one to use based on my
# environment needs
#
# NOTE: Run this in your MT6000 directly
(
path="/lib/firmware/mediatek"
#repo="https://github.com/openwrt/mt76/raw/f83b1601cc10c0dc46e7ba9b499c592b183f4164/firmware/"
#repo="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/mediatek/"
#repo="https://git.progress-linux.org/packages/graograman-backports/firmware-nonfree/plain/mediatek/"
repo="https://svn.dd-wrt.com/export/HEAD/src/router/mac80211/drivers/net/wireless/mediatek/mt76/firmware"
cd "$path"
state=$(md5sum *)
echo -e "# info: pulling from\n# '$repo'"
for file in $(ls $path); do
(
wget -q --no-check-certificate "$repo/$file" -O /dev/null || ( echo "not ok # $path/$file" ; break )
wget -q --no-check-certificate "$repo/$file" -O "$file"
echo "ok # wrote: $path/$file"
);
done
printf '%*s\n' 80 '' | tr ' ' '-'
echo -e "before:\n$state"
printf '%*s\n' 80 '' | tr ' ' '-'
echo "after:"
md5sum *
printf '%*s\n' 80 '' | tr ' ' '-'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment