Openwrt 搭建github action云编译固件¶
推荐Linux Ubuntu-20.04及以上系统使用¶
配置编译环境¶
更新安装包¶
使用apt下载
使用apt-get下载下载Lede依赖包¶
sudo apt install -y ack antlr3 aria2 asciidoc autoconf automake autopoint binutils bison build-essential \ bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip libpython3-dev qemu-utils \ rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
拉取Lede源码¶
加入UA2F与RKP-IPID¶
git 拉取源代码
git clone https://github.com/EOYOHOO/UA2F.git package/UA2F
git clone https://github.com/EOYOHOO/rkp-ipid.git package/rkp-ipid
git clone git@github.com:EOYOHOO/UA2F.git package/UA2F
git clone git@github.com:EOYOHOO/rkp-ipid.git package/rkp-ipid
缝合插件¶
添加下面代码复制到 lede源码根目录 feeds.conf.default 文件
src-git kenzo https://github.com/kenzok8/openwrt-packages
src-git small https://github.com/kenzok8/small
更新feed模块¶
多运行几次 观察是否都准备完毕编译¶
-
前三项选择需要刷取的固件型号(重点)
-
Target Images--->Root filesystem partition size改为1024
(这步需更改避免编译时报错) -
加入UA2F与RKP-IPID配置 加入UA2F和TTL伪装防检测
# 加入RKP-IPID模版 # kernel-modules->Other modules->kmod-rkp-ipid # 选上模块 # kernel modules->Netfilter Extensions->kmod-ipt-ipopt # kernel modules->Netfilter Extensions->kmod-ipt-u32 # 加入ua2f # network->Routing and Redirection->ua2f # 选上模块 # network->firewall->iptables-mod-conntrack-extra # network->firewall->iptables-mod-filter # network->firewall->iptables-mod-ipopt # network->firewall->iptables-mod-u32
-
Luci插件配置 (可不用填)
Openwrt_Luci插件解析
主题推荐: Luci -> theme -> Argone
Github Action云编译¶
- 进入网站 https://github.com/P3TERX/Actions-OpenWrt
- Use this template -> Create a new repository
- diy-part2.sh 加入两行代码
- 将刚编译的lede文件夹中的.config和feeds.conf.default文件上传到刚创建的profile中
- 修改.config文件 在Netfilter Extensions下第二行后添加代码(大概在第2450行)
- Actions -> Build OpenWrt -> Run workflow
等待编译完成 时间大概两个小时 (如果时间不在两小时左右请多检查一下哪个步骤少了)
End...
结束撒花