207 lines
7.5 KiB
Markdown
207 lines
7.5 KiB
Markdown
|

|
|||
|

|
|||
|
[](https://github.com/hanwckf/rt-n56u/releases)
|
|||
|
|
|||
|
# README #
|
|||
|
|
|||
|
Welcome to the rt-n56u project
|
|||
|
|
|||
|
This project aims to improve the rt-n56u and other supported devices on the software part, allowing power user to take full control over their hardware.
|
|||
|
This project was created in hope to be useful, but comes without warranty or support. Installing it will probably void your warranty.
|
|||
|
Contributors of this project are not responsible for what happens next.
|
|||
|
|
|||
|
### How do I get set up? ###
|
|||
|
|
|||
|
* [Get the tools to build the system](https://bitbucket.org/padavan/rt-n56u/wiki/EN/HowToMakeFirmware) or [Download pre-built system image](https://bitbucket.org/padavan/rt-n56u/downloads)
|
|||
|
* Feed the device with the system image file (Follow instructions of updating your current system)
|
|||
|
* Perform factory reset
|
|||
|
* Open web browser on http://my.router to configure the services
|
|||
|
|
|||
|
### Contribution guidelines ###
|
|||
|
|
|||
|
* To be completed
|
|||
|
|
|||
|
***
|
|||
|
|
|||
|
### 特别说明 ###
|
|||
|
* 汉化字典来自:https://github.com/gorden5566/padavan
|
|||
|
* 更新日志:https://www.jianshu.com/p/d76a63a12eae
|
|||
|
|
|||
|
***
|
|||
|
|
|||
|
### 固件特点 ###
|
|||
|
- 使用[gorden5566](https://github.com/gorden5566/padavan)的汉化字典
|
|||
|
- aria2前端更换为[AriaNg](https://github.com/mayswind/AriaNg)
|
|||
|
- [curl](https://github.com/curl/curl)可选编译可执行程序 ```CONFIG_FIRMWARE_INCLUDE_CURL```
|
|||
|
- 使用了[PROMETHEUS](http://pm.freize.net/index.html)提供的部分补丁
|
|||
|
- 使用了[Linaro1985/padavan-ng](https://gitlab.com/padavan-ng/padavan-ng)的部分软件包
|
|||
|
- 可选以下插件:
|
|||
|
>- [scutclient](https://github.com/hanwckf/scutclient) ```CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT```
|
|||
|
>- [gdut-drcom](https://github.com/chenhaowen01/gdut-drcom) ```CONFIG_FIRMWARE_INCLUDE_GDUT_DRCOM```
|
|||
|
>- [dogcom](https://github.com/hanwckf/dogcom) ```CONFIG_FIRMWARE_INCLUDE_DOGCOM```
|
|||
|
>- [minieap](https://github.com/hanwckf/minieap) ```CONFIG_FIRMWARE_INCLUDE_MINIEAP```
|
|||
|
>- [njit-client](https://github.com/hanwckf/njit8021xclient) ```CONFIG_FIRMWARE_INCLUDE_NJIT_CLIENT```
|
|||
|
>- [napt66](https://github.com/mzweilin/napt66) ```CONFIG_FIRMWARE_INCLUDE_NAPT66```
|
|||
|
>- [softether-vpnserver](https://github.com/SoftEtherVPN/SoftEtherVPN_Stable) ```CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_SERVER```
|
|||
|
>- [softether-vpnclient](https://github.com/SoftEtherVPN/SoftEtherVPN_Stable) ```CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CLIENT```
|
|||
|
>- [softether-vpncmd](https://github.com/SoftEtherVPN/SoftEtherVPN_Stable) ```CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CMD```
|
|||
|
>- [vlmcsd](https://github.com/hanwckf/vlmcsd) ```CONFIG_FIRMWARE_INCLUDE_VLMCSD```
|
|||
|
>- [ttyd](https://github.com/tsl0922/ttyd) ```CONFIG_FIRMWARE_INCLUDE_TTYD```
|
|||
|
>- [lrzsz](https://ohse.de/uwe/software/lrzsz.html) ```CONFIG_FIRMWARE_INCLUDE_LRZSZ```
|
|||
|
>- [htop](https://hisham.hm/htop/releases/) ```CONFIG_FIRMWARE_INCLUDE_HTOP```
|
|||
|
>- [nano](https://www.nano-editor.org/dist/) ```CONFIG_FIRMWARE_INCLUDE_NANO```
|
|||
|
>- [iperf3](https://github.com/esnet/iperf) ```CONFIG_FIRMWARE_INCLUDE_IPERF3```
|
|||
|
>- [dump1090](https://github.com/hanwckf/dump1090) ```CONFIG_FIRMWARE_INCLUDE_DUMP1090```
|
|||
|
>- [rtl-sdr](https://github.com/osmocom/rtl-sdr) ```CONFIG_FIRMWARE_INCLUDE_RTL_SDR```
|
|||
|
>- [samba3.6](https://gitlab.com/padavan-ng/padavan-ng/tree/master/trunk/user/samba36) ```CONFIG_FIRMWARE_INCLUDE_SMBD36```
|
|||
|
>- [mtr](https://github.com/traviscross/mtr) ```CONFIG_FIRMWARE_INCLUDE_MTR```
|
|||
|
>- [socat](http://www.dest-unreach.org/socat) ```CONFIG_FIRMWARE_INCLUDE_SOCAT```
|
|||
|
>- [srelay](https://socks-relay.sourceforge.io) ```CONFIG_FIRMWARE_INCLUDE_SRELAY```
|
|||
|
>- [3proxy](https://github.com/z3APA3A/3proxy) ```CONFIG_FIRMWARE_INCLUDE_3PROXY```
|
|||
|
>- [mentohust](https://github.com/hanwckf/mentohust-1) ```CONFIG_FIRMWARE_INCLUDE_MENTOHUST```
|
|||
|
>- [frpc](https://github.com/fatedier/frp) ```CONFIG_FIRMWARE_INCLUDE_FRPC```
|
|||
|
>- [frps](https://github.com/fatedier/frp) ```CONFIG_FIRMWARE_INCLUDE_FRPS```
|
|||
|
>- [tunsafe](https://github.com/TunSafe/TunSafe) ```CONFIG_FIRMWARE_INCLUDE_TUNSAFE```
|
|||
|
>- [wireguard-go](https://git.zx2c4.com/wireguard-go/) ```CONFIG_FIRMWARE_INCLUDE_WIREGUARD```
|
|||
|
>- [smartdns](https://github.com/pymumu/smartdns) ```CONFIG_FIRMWARE_INCLUDE_SMARTDNS```
|
|||
|
|
|||
|
- 已适配除官方适配外的以下机型
|
|||
|
>- PSG1208
|
|||
|
>- PSG1218
|
|||
|
>- 5K-W20 (USB)
|
|||
|
>- OYE-001 (USB)
|
|||
|
>- NEWIFI-MINI (USB)
|
|||
|
>- MI-MINI (USB)
|
|||
|
>- MI-3 (USB)
|
|||
|
>- MI-3C
|
|||
|
>- MI-4
|
|||
|
>- MI-R3G (USB)
|
|||
|
>- MI-R4A
|
|||
|
>- MI-R3P (USB)
|
|||
|
>- HC5661A
|
|||
|
>- HC5761A (USB)
|
|||
|
>- HC5861B
|
|||
|
>- 360P2 (USB)
|
|||
|
>- MI-NANO
|
|||
|
>- MZ-R13
|
|||
|
>- MZ-R13P
|
|||
|
>- RT-AC1200GU (USB)
|
|||
|
>- XY-C1 (USB)
|
|||
|
>- WR1200JS (USB)
|
|||
|
>- NEWIFI3 (USB)
|
|||
|
>- B70 (USB)
|
|||
|
>- A3004NS (USB)
|
|||
|
>- K2P
|
|||
|
>- K2P-USB (USB)
|
|||
|
>- JCG-836PRO (USB)
|
|||
|
>- JCG-AC860M (USB)
|
|||
|
>- DIR-882 (USB)
|
|||
|
>- DIR-878
|
|||
|
>- MR2600 (USB)
|
|||
|
>- WDR7300
|
|||
|
>- RM2100
|
|||
|
>- CR660x (CR6606, CR6608, CR6609)
|
|||
|
>- R2100
|
|||
|
>- JCG-Y2 (USB)
|
|||
|
>- E8820V2 (USB)
|
|||
|
>- ZTE_E8820S (USB)
|
|||
|
>- MSG1500 (USB)
|
|||
|
>- R6220 (USB)
|
|||
|
>- NETGEAR-CHJ (R6260, R6350, R6850, WAC124)
|
|||
|
>- NETGEAR-BZV (R6800, R6700-v2, R7200, Nighthawk AC2400)
|
|||
|
|
|||
|
***
|
|||
|
|
|||
|
### 编译说明 ###
|
|||
|
|
|||
|
* 安装依赖包
|
|||
|
|
|||
|
```shell
|
|||
|
# Debian/Ubuntu
|
|||
|
sudo apt update
|
|||
|
sudo apt install unzip libtool-bin curl cmake gperf gawk flex bison nano xxd \
|
|||
|
fakeroot kmod cpio git python3-docutils gettext automake autopoint \
|
|||
|
texinfo build-essential help2man pkg-config zlib1g-dev libgmp3-dev \
|
|||
|
libmpc-dev libmpfr-dev libncurses5-dev libltdl-dev wget libc-dev-bin
|
|||
|
|
|||
|
# Archlinux/Manjaro
|
|||
|
sudo pacman -Syu --needed git base-devel cmake gperf ncurses libmpc \
|
|||
|
gmp python-docutils vim rpcsvc-proto fakeroot cpio help2man
|
|||
|
|
|||
|
# Alpine
|
|||
|
sudo apk add make gcc g++ cpio curl wget nano xxd kmod \
|
|||
|
pkgconfig rpcgen fakeroot ncurses bash patch \
|
|||
|
bsd-compat-headers python2 python3 zlib-dev \
|
|||
|
automake gettext gettext-dev autoconf bison \
|
|||
|
flex coreutils cmake git libtool gawk sudo
|
|||
|
|
|||
|
# CentOS 7
|
|||
|
sudo yum update
|
|||
|
sudo yum groupinstall "Development Tools"
|
|||
|
sudo yum install ncurses-* flex byacc bison zlib-* texinfo gmp-* mpfr-* gettext \
|
|||
|
libtool* libmpc-* gettext-* python-docutils nano help2man fakeroot
|
|||
|
|
|||
|
# CentOS 8
|
|||
|
sudo yum update
|
|||
|
sudo yum groupinstall "Development Tools"
|
|||
|
sudo yum install ncurses-* flex byacc bison zlib-* gmp-* mpfr-* gettext \
|
|||
|
libtool* libmpc-* gettext-* nano fakeroot
|
|||
|
|
|||
|
# CentOS 8不能直接通过yum安装texinfo,help2man,python-docutils。请去官网下载发行的安装包编译安装
|
|||
|
# 以texinfo为例
|
|||
|
# cd /usr/local/src
|
|||
|
# sudo wget http://ftp.gnu.org/gnu/texinfo/texinfo-6.7.tar.gz
|
|||
|
# sudo tar zxvf texinfo-6.7.tar.gz
|
|||
|
# cd texinfo-6.7
|
|||
|
# sudo ./configure
|
|||
|
# sudo make
|
|||
|
# sudo make install
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
* 克隆源码
|
|||
|
|
|||
|
```shell
|
|||
|
git clone --depth=1 https://e.coding.net/hanwckf/rt-n56u/padavan.git /opt/rt-n56u
|
|||
|
#git clone --depth=1 https://github.com/hanwckf/rt-n56u.git /opt/rt-n56u
|
|||
|
```
|
|||
|
|
|||
|
* 准备工具链
|
|||
|
|
|||
|
```shell
|
|||
|
cd /opt/rt-n56u/toolchain-mipsel
|
|||
|
|
|||
|
# (推荐)使用脚本下载预编译的工具链:
|
|||
|
sh dl_toolchain.sh
|
|||
|
|
|||
|
# 或者,也可以从源码编译工具链,这需要一些时间:
|
|||
|
./clean_toolchain
|
|||
|
./build_toolchain
|
|||
|
|
|||
|
```
|
|||
|
|
|||
|
* (可选) 修改机型配置文件
|
|||
|
|
|||
|
```shell
|
|||
|
nano /opt/rt-n56u/trunk/configs/templates/PSG1218.config
|
|||
|
```
|
|||
|
|
|||
|
* 开始编译
|
|||
|
|
|||
|
```shell
|
|||
|
cd /opt/rt-n56u/trunk
|
|||
|
# 对于WSL环境,建议使用sudo进行编译,或者使用fakeroot-tcp代替fakeroot
|
|||
|
fakeroot ./build_firmware_modify PSG1218
|
|||
|
# 脚本第一个参数为路由型号,在trunk/configs/templates/中
|
|||
|
# 编译好的固件在trunk/images里
|
|||
|
# 首次编译完成后,如果需要再次编译其它固件,需要执行清理脚本:
|
|||
|
./clear_tree
|
|||
|
```
|
|||
|
|
|||
|
***
|
|||
|
|
|||
|
### 请参阅 ###
|
|||
|
- https://www.jianshu.com/p/cb51fb0fb2ac
|
|||
|
- https://www.jianshu.com/p/6b8403cdea46
|
|||
|
|