Skip to content
vernesong edited this page Sep 16, 2019 · 3 revisions

从 OpenWrt 的 SDK 编译

# 解压下载好的 SDK
tar xjf OpenWrt-SDK-ar71xx-for-linux-x86_64-gcc-4.8-linaro_uClibc-0.9.33.2.tar.bz2
cd OpenWrt-SDK-ar71xx-*

# Clone 项目
mkdir package/luci-app-openclash
cd package/luci-app-openclash
git init
git remote add -f origin https://github.com/vernesong/OpenClash.git
git config core.sparsecheckout true
echo "luci-app-openclash" >> .git/info/sparse-checkout
git pull origin master
git branch --set-upstream-to=origin/master master

# 编译 po2lmo (如果有po2lmo可跳过)
pushd package/luci-app-openclash/luci-app-openclash/tools/po2lmo
make && sudo make install
popd

# 选择要编译的包 LuCI -> Applications -> luci-app-openclash
make menuconfig

# 开始编译
make package/luci-app-openclash/luci-app-openclash/compile V=99

随固件编译

# 将源码中的 `luci-app-openclash` 文件夹拷贝到 `OpenWrt` 项目的 `Package` 目录

# 进入makefile
make menuconfig

# 选择要编译的包
LuCI -> Applications -> luci-app-openclash

# 一般情况下,插件所需依赖此时已自动选中,但wget可能需要单独进行确认
Nerwork -> File Transfer -> wget

# 开始编译
make V=s

使用手册

项目构建

界面介绍

FAQ

Clone this wiki locally