部署 docker 编译环境
可以下载这个 https://github.com/hanxi/lede-docker-builder
如果想自建 docker 镜像,记得把这个环境变量加上。docker 默认是 root 环境。
ENV FORCE_UNSAFE_CONFIGURE=1
make menuconfig 选项配置(基本配置)
Target system (目标系统类型,即路由器CPU架构)
Subtarget (子目标,即路由器芯片型号)
Target Profile (目标文件,即路由器型号)
LuCI (LuCI界面设置)
我的是斐讯K2路由器, CPU型号为MT7620, 芯片架构为MIPS, 路由器型号为PSG1218 rev.Ax, 那么我的基本配置就为:
Target system -> MediaTek Ralink MIPS
Subtarget -> MT7620 based boards
Target Profile -> Phicomm PSG128 rev.Ax
之前被误导了,K1 是 PSG1208,K2 是 PSG1218 rev.Ax, K2C是PSG1218 rev.Bx
LuCI配置:
LuCI->Modules->Translations->English (en)Chinese (zh-cn)Themes->luaci-theme-argon
配置完以上信息后, OpenWrt最基本的一些配置已经完成。
make menuconfig 配置选项参考: https://blog.csdn.net/Amosstan/article/details/80135108
加点插件进去
参考下这个配置插件: https://www.right.com.cn/forum/forum.php?mod=viewthread&tid=344825
LuCI ---> Applications ---> luci-app-arpbind #IP/MAC绑定LuCI ---> Applications ---> luci-app-autoreboot #高级重启LuCI ---> Applications ---> luci-app-ddns #动态域名 DNS LuCI ---> Applications ---> luci-app-firewall #添加防火墙LuCI ---> Applications ---> luci-app-ramfree #释放内存LuCI ---> Applications ---> luci-app-flowoffload #Turbo ACC FLOW转发加速
找回丢失的 $$R
这东西我也就临时用下,比如刷 LineageOS 跳过谷歌认证需要用到。
mkdir ~/lede/package/openwrt-packages cd ~/lede/package/openwrt-packages git clone https://github.com/SuLingGG/luci-app-ssr-plus ./luci-app-ssr-plus
再插入这行彩蛋语句到 package/lean/default-settings/files/zzz-default-settings
echo 0xDEADBEEF > /etc/config/google_fu_mode
然后 make menuconfig 把选项加进去
修改 ip 为 192.168.2.1
修改这个文件 package/base-files/files/bin/config_generate
里的 192.168.1.1 为 192.168.2.1
修改默认主题
再插入这几行语句到 package/lean/default-settings/files/zzz-default-settings
修改主题设置
uci batch <<-EOFset luci.themes.Argon=/luci-static/argonset luci.main.mediaurlbase=/luci-static/argon commit luci EOF
我编译的 K2 的包下载地址: openwrt-ramips-mt7620-psg1218a-squashfs-sysupgrade.bin
选错版本,结果把K1编译出来了,K1的包下载地址 openwrt-ramips-mt7620-psg1208-squashfs-sysupgrade.bin
K2 也能甩刷 K1 的包, 就是无线2.4G基本废掉了,没信号的。