r6220无线路由器lede openwrt固件刷机

下载R6220 LEDE固件

1
2
3
https://downloads.lede-project.org/snapshots/targets/ramips/mt7621/openwrt-ramips-mt7621-r6220-squashfs-kernel.bin

https://downloads.lede-project.org/snapshots/targets/ramips/mt7621/openwrt-ramips-mt7621-r6220-squashfs-rootfs.bin

下面这个是引导加载器可刷可不刷。方便上传固件用的。类似电脑的BIOS

1
https://breed.hackpascal.net/breed-mt7621-r6220.bin

放入fat32格式U盘插入路由器。

R6220开启telnet,访问以下网址。

1
http://192.168.1.1/setup.cgi?todo=debug

显示 Debug Enabled ! 说明已经成功。

进入路由。

1
telnet 192.168.1.1

查看U盘挂载路径。

1
ls /mnt/shares

进入U盘。

1
cd /mnt/shares/U

读取MTD分区表。

1
cat /proc/mtd

把 eeprom 备份到U盘中,可选。

1
dd if=/dev/mtd10 of=./mtd10.bin

显示一个 # 说明成功了。

刷入固件

1
2
3
mtd_write write openwrt-ramips-mt7621-r6220-squashfs-kernel.bin Rootfs

mtd_write write openwrt-ramips-mt7621-r6220-squashfs-rootfs.bin Kernel

重启

1
reboot

刷引导命令,可选。

1
mtd_write write breed-mt7621-r6220.bin Bootloader

救砖方法。

1
2
3
https://github.com/jclehner/nmrpflash/releases

https://www.netgear.com/support/product/R6220#download

查看网卡接口

1
nmrpflash -L

牙签桶住菊花,开电源。不要松牙签等LED灯快速闪完松牙签。刷入原厂。

1
nmrpflash.exe -i net0 -a 192.168.1.1 -f R6220_V1.1.0.34_1.0.1.img

更新源编辑配置文件

1
vi /etc/opkg/distfeeds.conf

尾部加入,源文前面加#注意下内核版本。

1
2
3
4
5
6
7
src/gz reboot_core http://mirrors.ustc.edu.cn/lede/snapshots/targets/ramips/mt7621/packages
src/gz reboot_kmods http://mirrors.ustc.edu.cn/lede/snapshots/targets/ramips/mt7621/kmods/4.14.48-1-b89c8f775596f9aa344c8aab9e34f4bc
src/gz reboot_base http://mirrors.ustc.edu.cn/lede/snapshots/packages/mipsel_24kc/base
src/gz reboot_luci http://mirrors.ustc.edu.cn/lede/snapshots/packages/mipsel_24kc/luci
src/gz reboot_packages http://mirrors.ustc.edu.cn/lede/snapshots/packages/mipsel_24kc/packages
src/gz reboot_routing http://mirrors.ustc.edu.cn/lede/snapshots/packages/mipsel_24kc/routing
src/gz reboot_telephony http://mirrors.ustc.edu.cn/lede/snapshots/packages/mipsel_24kc/telephony

刷好lede openwrt是没有WEB界面的。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
opkg update
opkg install luci
Configuring rpcd.
Configuring liblua.
Configuring luci-lib-ip.
Configuring libubus-lua.
Configuring libiwinfo.
Configuring libiwinfo-lua.
Configuring luci-theme-bootstrap.
Configuring luci-app-firewall.
Configuring lua.
Configuring luci-proto-ppp.
Configuring luci-lib-nixio.
Configuring luci-lib-jsonc.
Configuring liblucihttp.
Configuring liblucihttp-lua.
Configuring luci-base.
Configuring luci-mod-admin-full.
Configuring luci-proto-ipv6.
Configuring uhttpd.
Configuring uhttpd-mod-ubus.
Configuring rpcd-mod-rrdns.
Configuring luci.

安装中文界面

1
opkg install luci-i18n-base-zh-cn

安装防火墙中文界面

1
opkg install luci-i18n-firewall-zh-cn

安装U盘储存驱动挂载

1
2
3
4
opkg install block-mount
opkg install kmod-usb-storage
Configuring kmod-scsi-core.
Configuring kmod-usb-storage.

安装FAT32格式支持

1
2
3
4
opkg install kmod-fs-vfat
Configuring kmod-nls-cp437.
Configuring kmod-nls-iso8859-1.
Configuring kmod-nls-utf8.

安装NTFS格式支持

1
2
3
opkg install kmod-fs-ntfs.
Configuring kmod-fuse.
Configuring ntfs-3g.

安装MWAN3多线叠加均衡。

1
2
3
4
5
6
7
8
9
10
11
opkg install mwan3
Configuring kmod-nfnetlink.
Configuring libmnl.
Configuring kmod-ipt-conntrack-extra.
Configuring kmod-ipt-ipopt.
Configuring iptables-mod-ipopt.
Configuring kmod-ipt-ipset.
Configuring libipset.
Configuring ipset.
Configuring ip-tiny.
Configuring iptables-mod-conntrack-extra.

安装MWAN3界面

1
2
opkg install luci-app-mwan3
Configuring libuci-lua.

安装MWAN3中文界面

1
opkg install luci-i18n-mwan3-zh-cn

安装SFTP上传下载文件

1
opkg install openssh-sftp-server

安装WGET带HTTPS下载功能

1
2
3
4
5
opkg install wget
Configuring libpcre.
Configuring zlib.
Configuring libopenssl.
Configuring librt.

安装脱机下载

1
2
opkg install aria2
Configuring libstdcpp.

安装脱机下载界面

1
opkg install luci-app-aria2

安装脱机下载中文界面

1
opkg install luci-i18n-aria2-zh-cn

安装网络共享

1
opkg install samba36-server

安装网络共享界面

1
opkg install luci-app-samba

安装网络共享中文界面

1
opkg install luci-i18n-samba-zh-cn

安装磁盘工具

1
2
3
4
5
6
7
opkg install fdisk
Configuring terminfo.
Configuring libblkid.
Configuring libfdisk.
Configuring libsmartcols.
Configuring libncurses.
Configuring fdisk.

安装硬盘休眠

1
2
3
4
5
opkg install luci-i18n-hd-idle-zh-cn
Configuring hdparm.
Configuring hd-idle.
Configuring luci-app-hd-idle.
Configuring luci-i18n-hd-idle-zh-cn.

磁盘自动挂载脚本

1
vi /etc/hotplug.d/block/10-mount

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/ash

case "$ACTION" in
add)
for i in $(ls /dev/ | grep 'sd[a-z][1-9]')
do
mkdir -p /mnt/$i
mount -o iocharset=utf8,rw /dev/$i /mnt/$i
if [ $? -ne 0 ]
then
mount -o rw /dev/$i /mnt/$i
fi
done
;;
remove)
MOUNT=`mount | grep -o '/mnt/sd[a-z][1-9]'`
for i in $MOUNT
do
umount $i
if [ $? -eq 0 ]
then
rm -r $i
fi
done
;;
esac

安装第三方源,添加opkg-key

1
2
wget http://openwrt-dist.sourceforge.net/openwrt-dist.pub
opkg-key add openwrt-dist.pub

查看CPU架构

1
opkg print-architecture | awk '{print $2}'

加入自定义源

1
vi /etc/opkg/customfeeds.conf

1
2
src/gz openwrt_dist http://openwrt-dist.sourceforge.net/packages/base/mipsel_24kc
src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/packages/luci
1
2
3
4
5
6
7
8
9
opkg update
opkg install ChinaDNS
opkg install luci-app-chinadns
opkg install dns-forwarder
opkg install luci-app-dns-forwarder
opkg install shadowsocks-libev
opkg install luci-app-shadowsocks
opkg install simple-obfs
opkg install iptables-mod-tproxy

shadowsocks全自动番茄,多线叠加自行配置。

附加USB无线网卡驱动

腾达 Tenda W311U+ 150M

1
2
3
4
5
6
opkg instal kmod-rt2800-usb
Configuring kmod-lib-crc-itu-t.
Configuring kmod-rt2x00-lib.
Configuring kmod-rt2x00-usb.
Configuring kmod-rt2800-lib.
Configuring rt2800-usb-firmware.

TL-WN721N V1

1
2
3
4
opkg install kmod-ath9k-htc
Configuring ath9k-htc-firmware.
Configuring kmod-ath.
Configuring kmod-ath9k-common.

删除无线网络配置

1
rm -f /etc/config/wireless

重新获取无线网线网络配置

1
wifi config

重启路由

1
reboot

坚持原创技术分享,您的支持将鼓励我继续创作!