为 OpenWrt 构建科学上网插件
后知后觉 暂无评论

将之前的笔记逐步迁移至博客上来,方便查阅。因仓库已删除,本文内容已归档,仅供参考。

构建

为 OpenWrt 构建单包,而非镜像,这样可以方便直接使用官方镜像,直接安装独立包即可。

推荐使用 Ubuntu 22.04 LTS 版本进行构建

sudo apt install build-essential clang flex bison g++ gawk gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev python3-distutils rsync unzip zlib1g-dev file wget
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt/
git log
git branch -a
git tag
git checkout v23.05.0
./scripts/feeds update -a
./scripts/feeds install -a
# cd package/feeds/luci/luci-app-apinger/
# ./scripts/feeds install libpcre
wget https://downloads.openwrt.org/releases/23.05.0/targets/x86/64/config.buildinfo -O .config

git clone --depth=1 https://github.com/fw876/helloworld.git package/helloworld
git -C package/helloworld pull

make menuconfig
make kernel_menuconfig

make tools/install
make toolchain/install

make target/linux/{clean,compile} -j1 V=sc

./scripts/feeds install libpcre
sudo apt install libpcre3-dev
make package/helloworld/luci-app-ssr-plus/{clean,compile} -j1 V=sc

构建完成后将安装包拷贝至 OpenWrt 安装即可。


附录

参考链接

如果遇到问题或者对文章内容存疑,请在下方留言,博主看到后将及时回复,谢谢!
禁用 / 当前已拒绝评论,仅可查看「历史评论」。