Build-Padavan-RM2100 #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#修改TNAME: K2P 中的K2P为你需要编译的型号,注意名称要与configs/templates/目录下的名字相同 | |
name: Build-Padavan-RM2100 | |
on: | |
workflow_dispatch: | |
env: | |
REPOSITORY_URL: https://github.com/YunHair/Padavan-KVR.git | |
FIRMWARE_DATEPREFIX: $(date +"%Y%m%d") | |
FIRMWARE_DATETIME: $(date +"%Y%m%d%H%M%S") | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: github.event.repository.owner.id == github.event.sender.id | |
steps: | |
- name: Checkout | |
uses: actions/checkout@master | |
- name: Initialization environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install unzip libtool-bin curl cmake gperf gawk flex bison nano xxd fakeroot \ | |
cpio git python3-docutils gettext automake autopoint texinfo build-essential help2man \ | |
pkg-config zlib1g-dev libgmp3-dev libmpc-dev libmpfr-dev libncurses5-dev libltdl-dev wget | |
- name: Clone source code | |
env: | |
KERNEL: 3.4 | |
run: | | |
git clone --depth=1 $REPOSITORY_URL /opt/rt-n56u | |
cd /opt/rt-n56u/toolchain-mipsel | |
sh dl_toolchain.sh | |
mkdir -p /opt/images/ | |
- name: Build Firmware | |
env: | |
TNAME: RM2100 | |
KERNEL: 3.4 | |
run: | | |
cd /opt/rt-n56u/trunk | |
if [ ! -f configs/templates/$TNAME.config ] ; then | |
echo "configs/templates/$TNAME.config not found " | |
exit 1 | |
fi | |
cp -f configs/templates/$TNAME.config .config | |
################################################################################################ | |
#因不同型号配置功能不一样,所以先把配置项删除,如果你自己要添加其他的,也要写上删除这一条,切记!!! | |
################################################################################################ | |
sed -i 's/CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER=y/CONFIG_FIRMWARE_INCLUDE_DNSFORWARDER=n/g' .config | |
sed -i 's/CONFIG_FIRMWARE_INCLUDE_MENTOHUST=y/CONFIG_FIRMWARE_INCLUDE_MENTOHUST=n/g' .config | |
sed -i 's/CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT=y/CONFIG_FIRMWARE_INCLUDE_SCUTCLIENT=n/g' .config | |
sed -i 's/CONFIG_FIRMWARE_INCLUDE_SRELAY=y/CONFIG_FIRMWARE_INCLUDE_SRELAY=n/g' .config | |
sed -i 's/CONFIG_FIRMWARE_INCLUDE_NJIT_CLIENT=y/CONFIG_FIRMWARE_INCLUDE_NJIT_CLIENT=n/g' .config | |
sed -i 's/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=n/CONFIG_FIRMWARE_INCLUDE_OPENSSL_EXE=y/g' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_TRANSMISSION/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_TRANSMISSION_WEB_CONTROL/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_ARIA/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_ARIA_WEB_CONTROL/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_ZEROTIER/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_FRPC/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_ALIDDNS/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_V2RAY/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_XRAY/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_TROJAN/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_SSOBFS/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_SERVER/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CLIENT/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CMD/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_NPC/d' .config | |
sed -i '/CONFIG_FIRMWARE_WEBUI_HIDE_VPN/d' .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_OPENVPN/d' .config | |
###################################################################### | |
#以下选项是定义你需要的功能(y=集成,n=忽略),重新写入到.config文件 | |
###################################################################### | |
##内网穿透 | |
#echo "CONFIG_FIRMWARE_INCLUDE_NPC=n" >> .config | |
echo "CONFIG_FIRMWARE_INCLUDE_ZEROTIER=y" >> .config #zerotier ~1.3M | |
echo "CONFIG_FIRMWARE_INCLUDE_FRPC=y" >> .config #frpc | |
echo "CONFIG_FIRMWARE_INCLUDE_ALIDDNS=y" >> .config #aliddns | |
##科学上网## | |
#echo "CONFIG_FIRMWARE_INCLUDE_SHADOWSOCKS=n" >> .config | |
#echo "CONFIG_FIRMWARE_INCLUDE_V2RAY=n" >> .config #mini太小,内置不进 | |
#echo "CONFIG_FIRMWARE_INCLUDE_XRAY=n" >> .config #mini太小,内置不进 | |
#echo "CONFIG_FIRMWARE_INCLUDE_TROJAN=n" >> .config #mini太小,内置不进 | |
#echo "CONFIG_FIRMWARE_INCLUDE_SSOBFS=n" >> .config | |
##vpn | |
#echo "CONFIG_FIRMWARE_INCLUDE_OPENVPN=n" >> .config | |
#echo "CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_SERVER=n" >> .config | |
#echo "CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CLIENT=n" >> .config | |
#echo "CONFIG_FIRMWARE_INCLUDE_SOFTETHERVPN_CMD=n" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_VLMCSD/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_VLMCSD=y" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_TTYD/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_TTYD=y" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_IPERF3/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_IPERF3=y" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_SFTP/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_SFTP=y" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_DROPBEAR/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_DROPBEAR=y" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_DROPBEAR_FAST_CODE/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_DROPBEAR_FAST_CODE=y" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_HTOP/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_HTOP=y" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_DDNSTO/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_DDNSTO=y" >> .config | |
sed -i '/CONFIG_FIRMWARE_INCLUDE_WIREGUARD/d' .config | |
echo "CONFIG_FIRMWARE_INCLUDE_WIREGUARD=y" >> .config | |
#超频开关 | |
sed -i '/CONFIG_FIRMWARE_CPU_900MHZ/d' .config | |
echo "CONFIG_FIRMWARE_CPU_900MHZ=y" >> .config | |
############################################################################### | |
#自定义添加其它功能请参考源码configs/templates/目录下的config文件。按照上面的格式添加即可 | |
#格式如下: | |
#sed -i '/自定义项/d' .config | |
#echo "自定义项=y" >> .config | |
######################################################################################### | |
sudo ./clear_tree | |
sudo ./build_firmware_modify $TNAME 0 | |
sudo mv -f images/*.trx /opt/images/ | |
- name : Upload packages | |
uses: actions/upload-artifact@master | |
if: always() | |
with: | |
name: Padavan3.4-packages | |
path: /opt/images | |
- name: Release Firmware | |
uses: softprops/action-gh-release@master | |
with: | |
tag_name: Padavan3.4-kvr-RM2100-$FIRMWARE_DATETIME | |
files: /opt/images/*.* | |
body: | | |
Padavan3.4-kvr-RM2100固件,超频1120MHZ |