Before
- Require
- Ubuntu 18.04+
- Disk : 25G+
Start
- 安装依赖
sudo apt update -y
sudo apt full-upgrade -y
sudo apt install -y git curl
curl -s https://build-scripts.immortalwrt.eu.org/init_build_environment.sh | sudo bash
- 安装 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 cdnspeedtest https://github.com/immortalwrt-collections/openwrt-cdnspeedtest' >>feeds.conf.default
2. 文本插入
- 路径:
lede/feeds.conf.default
用文本工具打开 粘贴修改即可
src-git 名字 GitHub源代码链接
- 示例
src-git passwall https://github.com/xiaorouji/openwrt-passwall
3. git clone
- 路径
package/mine/插件目录
git clone GitHub源代码链接 路径
- 示例
git clone https://github.com/xiaorouji/openwrt-passwall package/mine/passwall
插件指南
常用插件列表
-
luci-app-bypass
- https://github.com/garypang13/luci-app-bypass.git
-
DiskMan for LuCI (WIP)
- https://github.com/lisaac/luci-app-diskman.git
-
GoWebDAV
- https://github.com/immortalwrt/openwrt-gowebdav.git
-
PushBot(Serverchan修改版)
- https://github.com/zzsj0928/luci-app-pushbot.git
-
Server酱
- https://github.com/tty228/luci-app-serverchan.git
-
PassWall
- https://github.com/xiaorouji/openwrt-passwall.git
-
OpenClash
- https://github.com/vernesong/OpenClash.git
-
tencent DDNS
- https://github.com/Tencent-Cloud-Plugins/tencentcloud-openwrt-plugin-ddns.git
-
网易云音乐
- https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic
-
管控上网行为
- https://github.com/destan19/OpenAppFilter.git
-
CF IP筛选【配合PassWall使用】
- https://github.com/immortalwrt-collections/openwrt-cdnspeedtest
-
luci-app-Nginx-manager
- https://github.com/sun-cut/luci-app-nginx-manager
更多插件
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编译
待定
评论区