Before
- Require
- Ubuntu 18.04+
- Disk : 25G+
Start
- 安装依赖
sudo apt update -y
sudo apt full-upgrade -y
sudo apt install -y git curl
sudo bash -c 'bash <(curl -s https://build-scripts.immortalwrt.org/init_build_environment.sh)'
- 安装 OpenWrt SDK
- Lean
git clone https://github.com/coolsnowwolf/lede
cd lede
- 更新 feed
./scripts/feeds update -a && scripts/feeds install -a
- 🐷 每次更改后建议更新feed
- 选好机型、插件等
make menuconfig
- 下载 dl 库
make -j8 download V=s
- 开始编译
- 初次编译
make -j1 V=s
- 二次编译
make -j$(($(nproc) + 1)) V=s
🐷 编译完成后固件输出路径:lede/bin/targets/…
- 修改
- 重新配置
rm -rf ./tmp && rm -rf .config
make menuconfig
make -j$(($(nproc) + 1)) V=s
- 更新源码
git pull
./scripts/feeds update -a && scripts/feeds install -a
- 配置差异化 [用来定制Actions编译]
make defconfig
./scripts/diffconfig.sh > seed.config
DIY
更改ip
- 将默认
192.168.1.1
改成192.168.0.1
sed -i 's/192.168.1.1/192.168.0.1/g' package/base-files/files/bin/config_generate
插件
1. 命令插入
- 路径:
lede/feeds.conf.default
echo 'src-git 名字 GitHub源代码链接' >>feeds.conf.default
- 示例
echo 'src-git passwall https://github.com/xiaorouji/openwrt-passwall' >>feeds.conf.default
- 开启
HelloWorld
sed -i 's/^#\(.*helloworld\)/\1/' feeds.conf.default
自用示例
echo 'src-git passwall https://github.com/xiaorouji/openwrt-passwall' >>feeds.conf.default
echo 'src-git frpc https://github.com/kuoruan/openwrt-frp' >>feeds.conf.default
echo 'src-git unblockneteasemusic https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic' >>feeds.conf.default
2. 文本插入
- 路径:
lede/feeds.conf.default
用文本工具打开 粘贴修改即可
src-git 名字 GitHub源代码链接
- 示例
src-git passwall https://github.com/xiaorouji/openwrt-passwall
3. git clone
- 路径
lede/package/mine/插件目录
git clone GitHub源代码链接 路径
- 自用示例
git clone https://github.com/xiaorouji/openwrt-passwall
git clone https://github.com/kuoruan/openwrt-frp
git clone https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
插件指南
常用插件列表
-
Alist
-
DiskMan for LuCI (WIP)
-
Frp(反向代理)
-
PushBot(Serverchan修改版)
-
Server酱
-
PassWall
-
Daed
-
Xray
-
OpenClash
-
NekoClash
-
网易云音乐
-
Oaf(管控上网行为)
-
Lucky
更多插件
svn co https://github.com/NueXini/NueXini_Packages/trunk/插件目录
主题
rm -rf package/lean/luci-theme-argon
git clone https://github.com/jerrykuku/luci-theme-argon.git package/lean/luci-theme-argon
- make menuconfig #choose LUCI->Theme->Luci-theme-argon
- ☐ 直接替换【可选】
sed -i 's/luci-theme-bootstrap/luci-theme-argon-dark-mod/g' package/feeds/luci/luci/Makefile
进阶
Docker 编译
待定
GitHub CI编译
待定
评论区