├── .gitattributes ├── README.md ├── diy-part1.sh ├── LICENSE ├── .github └── workflows │ ├── 快速打包(自用).yml │ ├── 快速打包.yml │ ├── 编译固件(自用).yml │ ├── 编译固件(immortalwrt).yml │ ├── 编译固件.yml │ └── 编译固件(iStore).yml ├── diy-part2-imm.sh ├── diy-part2-istore.sh └── diy-part2.sh /.gitattributes: -------------------------------------------------------------------------------- 1 | .config-tiny filter=lfs diff=lfs merge=lfs -text 2 | diy-part2.sh filter=lfs diff=lfs merge=lfs -text 3 | files filter=lfs diff=lfs merge=lfs -text 4 | kernel filter=lfs diff=lfs merge=lfs -text 5 | LICENSE filter=lfs diff=lfs merge=lfs -text 6 | README.md filter=lfs diff=lfs merge=lfs -text 7 | diy-part1.sh filter=lfs diff=lfs merge=lfs -text 8 | .config-full filter=lfs diff=lfs merge=lfs -text 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Actions-OpenWrt 2 | 利用Actions云编译,整合了Amlogic平台的盒子OpenWrt固件编译与内核打包方法,一键生成可直接使用的固件。 3 | 所有盒子固件均采用同一底包,默认为打包N1盒子的固件,如需打包其他型号盒子参照flippy的打包脚本说明修改.yml流程文件即可。 4 | 5 | 6 | ## 感谢 7 | - [Lean's OpenWrt 源码仓库](https://github.com/coolsnowwolf/lede) 8 | - [immortalwrt's OpenWrt 源码仓库](https://github.com/immortalwrt/immortalwrt) 9 | - [flippy 内核与打包脚本](https://github.com/unifreq/openwrt_packit) 10 | - [ophub 内核打包参数说明](https://github.com/ophub/amlogic-s9xxx-openwrt/blob/main/README.cn.md#%E4%BD%BF%E7%94%A8-github-actions-%E8%BF%9B%E8%A1%8C%E7%BC%96%E8%AF%91) 11 | - [kenzok8 软件包收集仓库](https://github.com/kenzok8/small-package) 12 | - [p3terx 云编译教程](https://p3terx.com/archives/build-openwrt-with-github-actions.html) 13 | - 所有OpenWrt源码贡献者、插件开发者 14 | 15 | 16 | ## License 17 | 18 | [MIT](https://github.com/P3TERX/Actions-OpenWrt/blob/main/LICENSE) © [**P3TERX**](https://p3terx.com) 19 | -------------------------------------------------------------------------------- /diy-part1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019-2020 P3TERX 4 | # 5 | # This is free software, licensed under the MIT License. 6 | # See /LICENSE for more information. 7 | # 8 | # https://github.com/P3TERX/Actions-OpenWrt 9 | # File name: diy-part1.sh 10 | # Description: OpenWrt DIY script part 1 (Before Update feeds) 11 | # 12 | 13 | # Uncomment a feed source 14 | #sed -i 's/^#\(.*helloworld\)/\1/' feeds.conf.default 15 | 16 | # Add a feed source 17 | #echo 'src-git helloworld https://github.com/fw876/helloworld' >>feeds.conf.default 18 | #echo 'src-git passwall https://github.com/xiaorouji/openwrt-passwall' >>feeds.conf.default 19 | 20 | ## 常用OpenWrt软件包源码合集,同步上游更新! 21 | ## 通用版luci适合18.06与19.07 22 | # echo 'src-git small8 https://github.com/kenzok8/small-package' >>feeds.conf.default 23 | 24 | 25 | ## 解除系统限制 26 | ulimit -u 10000 27 | ulimit -n 4096 28 | ulimit -d unlimited 29 | ulimit -m unlimited 30 | ulimit -s unlimited 31 | ulimit -t unlimited 32 | ulimit -v unlimited 33 | 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019-2020 P3TERX 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/快速打包(自用).yml: -------------------------------------------------------------------------------- 1 | #======================================================================================================================== 2 | # https://github.com/ophub/amlogic-s9xxx-openwrt 3 | # Description: Use Releases file to packaging 4 | # Cron: min (0 - 59) / hour (0 - 23) / day of month (1 - 31) / month (1 - 12) / day of week (0 - 6)(Sunday - Saturday) 5 | #======================================================================================================================== 6 | 7 | name: 快速打包(自用) 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-20.04 16 | 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v2 20 | 21 | - name: Get OpenWrt firmware 22 | id: build 23 | if: (!cancelled()) 24 | run: | 25 | [ -d openwrt-armvirt ] || mkdir -p openwrt-armvirt 26 | curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "openwrt_N1_.*/openwrt-armvirt-.*\.tar.gz" | head -n 1 > DOWNLOAD_ARMVIRT 27 | [ -s DOWNLOAD_ARMVIRT ] && wget -q -P openwrt-armvirt https://github.com/${GITHUB_REPOSITORY}/releases/download/$(cat DOWNLOAD_ARMVIRT) 28 | 29 | - name: Package Armvirt as OpenWrt 30 | uses: unifreq/openwrt_packit@master 31 | env: 32 | WHOAMI: deng 33 | OPENWRT_ARMVIRT: openwrt-armvirt/*.tar.gz 34 | PACKAGE_SOC: s905d 35 | # KERNEL_AUTO_LATEST: false 36 | # KERNEL_REPO_URL: https://github.com/quanjindeng/Actions_OpenWrt-Amlogic/tree/main/kernel 37 | KERNEL_REPO_URL: https://github.com/ophub/kernel/tree/main/pub/stable 38 | KERNEL_VERSION_NAME: 5.15.32_6.0.2 39 | 40 | - name: Upload OpenWrt Firmware to Release 41 | uses: ncipollo/release-action@v1 42 | with: 43 | tag: openwrt_N1_${{ env.PACKAGED_OUTPUTDATE }} 44 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* 45 | allowUpdates: true 46 | token: ${{ secrets.GITHUB_TOKEN }} 47 | body: | 48 | 自用固件,插件较少! 49 | 如有其他需求,建议下载全插件版本固件! 50 | -------------------------------------------------------------------------------- /.github/workflows/快速打包.yml: -------------------------------------------------------------------------------- 1 | #======================================================================================================================== 2 | # https://github.com/ophub/amlogic-s9xxx-openwrt 3 | # Description: Use Releases file to packaging 4 | # Cron: min (0 - 59) / hour (0 - 23) / day of month (1 - 31) / month (1 - 12) / day of week (0 - 6)(Sunday - Saturday) 5 | #======================================================================================================================== 6 | 7 | name: 快速打包 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-20.04 16 | 17 | steps: 18 | - name: Checkout 19 | uses: actions/checkout@v2 20 | 21 | - name: Get OpenWrt firmware 22 | id: build 23 | if: (!cancelled()) 24 | run: | 25 | [ -d openwrt-armvirt ] || mkdir -p openwrt-armvirt 26 | curl -s "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" | grep -o "openwrt_armvirt_.*/openwrt-armvirt-.*\.tar.gz" | head -n 1 > DOWNLOAD_ARMVIRT 27 | [ -s DOWNLOAD_ARMVIRT ] && wget -q -P openwrt-armvirt https://github.com/${GITHUB_REPOSITORY}/releases/download/$(cat DOWNLOAD_ARMVIRT) 28 | 29 | - name: Package Armvirt as OpenWrt 30 | uses: unifreq/openwrt_packit@master 31 | env: 32 | WHOAMI: deng 33 | OPENWRT_ARMVIRT: openwrt-armvirt/*.tar.gz 34 | PACKAGE_SOC: s905d 35 | # KERNEL_AUTO_LATEST: false 36 | # KERNEL_REPO_URL: https://github.com/quanjindeng/Actions_OpenWrt-Amlogic/tree/main/kernel 37 | KERNEL_REPO_URL: https://github.com/ophub/kernel/tree/main/pub/stable 38 | KERNEL_VERSION_NAME: 5.15.32_6.1.1 39 | 40 | - name: Upload OpenWrt Firmware to Release 41 | uses: ncipollo/release-action@v1 42 | with: 43 | tag: openwrt_armvirt_v8_${{ env.PACKAGED_OUTPUTDATE }} 44 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* 45 | allowUpdates: true 46 | token: ${{ secrets.GITHUB_TOKEN }} 47 | body: | 48 | ### **适用于Amlogic平台的N1盒子OpenWrt固件--全插件** 49 | * **固件信息:** 50 | 默认IP: `10.10.10.1` 51 | 默认用户名: `root` 52 | 默认密码: `password` 53 | * **使用方法:** 54 | 1. 安装固件:写入U盘直接使用;U盘启动后可输入命令 `openwrt-install-amlogic` 按照英文提示写入到emmc 55 | 2. 更新固件:将固件放在 `/mnt/mmcblk2p4/` 目录下,输入命令 `openwrt-update-amlogic` 可直接更新 56 | 3. 登录Luci界面后,可直接使用`晶晨宝盒`插件进行写入emmc或者更新操作(使用前先按需求填写好插件设置),免去手动输入命令! 57 | * **更新说明:** 58 | 目前已集成大部分常用插件! 59 | * **N1云编译OP固件互助交流群:** 60 | https://t.me/OpenWrt_n1 61 | * **提示:** 62 | `openwrt_s905d_n1_XX_XX` 文件名才是固件! 63 | 64 | -------------------------------------------------------------------------------- /diy-part2-imm.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019-2020 P3TERX 4 | # 5 | # This is free software, licensed under the MIT License. 6 | # See /LICENSE for more information. 7 | # 8 | # https://github.com/P3TERX/Actions-OpenWrt 9 | # File name: diy-part2.sh 10 | # Description: OpenWrt DIY script part 2 (After Update feeds) 11 | # 12 | 13 | # Modify default theme(FROM uci-theme-bootstrap CHANGE TO luci-theme-material) 14 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' ./feeds/luci/collections/luci/Makefile 15 | 16 | # Modify default IP(FROM 192.168.1.1 CHANGE TO 10.10.10.1) 17 | sed -i 's/192.168.1.1/10.10.10.1/g' package/base-files/files/bin/config_generate 18 | 19 | # Modify system hostname(FROM OpenWrt CHANGE TO OpenWrt-N1) 20 | # sed -i 's/OpenWrt/OpenWrt-N1/g' package/base-files/files/bin/config_generate 21 | 22 | # Replace the default software source 23 | # sed -i 's#openwrt.proxy.ustclug.org#mirrors.bfsu.edu.cn\\/openwrt#' package/lean/default-settings/files/zzz-default-settings 24 | 25 | sed -i 's/invalid users = root/#invalid users = root/g' feeds/packages/net/samba4/files/smb.conf.template 26 | 27 | 28 | # 拉取软件包 29 | 30 | git clone https://github.com/ophub/luci-app-amlogic.git package/luci-app-amlogic 31 | git clone https://github.com/kenzok8/small-package package/small-package 32 | git clone https://github.com/jerrykuku/luci-app-argon-config.git package/luci-app-argon-config 33 | git clone https://github.com/jerrykuku/luci-theme-argon.git package/luci-theme-argon 34 | git clone https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic.git package/luci-app-unblockneteasemusic 35 | svn co https://github.com/kiddin9/openwrt-packages/trunk/UnblockNeteaseMusic-Go package/UnblockNeteaseMusic-Go 36 | svn co https://github.com/kiddin9/openwrt-packages/trunk/luci-app-unblockneteasemusic-go package/luci-app-unblockneteasemusic-go 37 | 38 | 39 | # 删除重复包 40 | 41 | # rm -rf feeds/luci/applications/luci-app-netdata 42 | rm -rf feeds/luci/themes/luci-theme-argon 43 | rm -rf package/small-package/luci-app-openvpn-server 44 | rm -rf package/small-package/openvpn-easy-rsa-whisky 45 | rm -rf package/small-package/luci-app-koolproxyR 46 | rm -rf package/small-package/luci-app-godproxy 47 | rm -rf package/small-package/luci-app-argon* 48 | rm -rf package/small-package/luci-theme-argon* 49 | rm -rf package/small-package/luci-app-amlogic 50 | rm -rf package/small-package/luci-app-unblockneteasemusic 51 | rm -rf feeds/luci/applications/luci-app-passwall 52 | rm -rf package/feeds/packages/naiveproxy 53 | rm -rf feeds/packages/net/naiveproxy 54 | 55 | 56 | # 其他调整 57 | NAME=$"package/luci-app-unblockneteasemusic/root/usr/share/unblockneteasemusic" && mkdir -p $NAME/core 58 | curl 'https://api.github.com/repos/UnblockNeteaseMusic/server/commits?sha=enhanced&path=precompiled' -o commits.json 59 | echo "$(grep sha commits.json | sed -n "1,1p" | cut -c 13-52)">"$NAME/core_local_ver" 60 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/precompiled/app.js -o $NAME/core/app.js 61 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/precompiled/bridge.js -o $NAME/core/bridge.js 62 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/ca.crt -o $NAME/core/ca.crt 63 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/server.crt -o $NAME/core/server.crt 64 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/server.key -o $NAME/core/server.key 65 | 66 | sed -i 's#https://github.com/breakings/OpenWrt#https://github.com/quanjindeng/Actions_OpenWrt-Amlogic#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 67 | sed -i 's#ARMv8#openwrt_armvirt#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 68 | sed -i 's#opt/kernel#kernel#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 69 | 70 | sed -i 's#mount -t cifs#mount.cifs#g' feeds/luci/applications/luci-app-cifs-mount/root/etc/init.d/cifs 71 | 72 | #sed -i 's#<%+cbi/tabmenu%>##g' package/small-packages/luci-app-nginx-manager/luasrc/view/nginx-manager/index.htm 73 | 74 | # 为alist插件更换最新的golang版本 75 | # rm -rf feeds/packages/lang/golang 76 | # svn export https://github.com/sbwml/packages_lang_golang/trunk feeds/packages/lang/golang 77 | 78 | # mosdns 79 | find ./ | grep Makefile | grep v2ray-geodata | xargs rm -f 80 | find ./ | grep Makefile | grep mosdns | xargs rm -f 81 | git clone https://github.com/sbwml/luci-app-mosdns package/mosdns 82 | git clone https://github.com/sbwml/v2ray-geodata package/geodata 83 | -------------------------------------------------------------------------------- /diy-part2-istore.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019-2020 P3TERX 4 | # 5 | # This is free software, licensed under the MIT License. 6 | # See /LICENSE for more information. 7 | # 8 | # https://github.com/P3TERX/Actions-OpenWrt 9 | # File name: diy-part2.sh 10 | # Description: OpenWrt DIY script part 2 (After Update feeds) 11 | # 12 | 13 | sed -i '/CYXluq4wUazHjmCDBCqXF/d' package/lean/default-settings/files/zzz-default-settings # 设置密码为空 14 | 15 | # Modify default theme(FROM uci-theme-bootstrap CHANGE TO luci-theme-material) 16 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' ./feeds/luci/collections/luci/Makefile 17 | 18 | # Modify some code adaptation 19 | #sed -i 's/LUCI_DEPENDS.*/LUCI_DEPENDS:=\@\(arm\|\|aarch64\)/g' feeds/luci/applications/luci-app-cpufreq/Makefile 20 | 21 | # Add autocore support for armvirt 22 | sed -i 's/TARGET_rockchip/TARGET_rockchip\|\|TARGET_armvirt/g' package/lean/autocore/Makefile 23 | 24 | # Set DISTRIB_REVISION 25 | sed -i "s/OpenWrt /Deng Build $(TZ=UTC-8 date "+%Y.%m.%d") @ OpenWrt /g" package/lean/default-settings/files/zzz-default-settings 26 | 27 | # Modify default IP(FROM 192.168.1.1 CHANGE TO 10.10.10.1) 28 | sed -i 's/192.168.1./10.10.10./g' package/base-files/files/bin/config_generate 29 | sed -i 's/192.168.1./10.10.10./g' package/base-files/luci2/bin/config_generate 30 | sed -i 's/192.168.1./10.10.10./g' package/base-files/Makefile 31 | sed -i 's/192.168.1./10.10.10./g' package/base-files/image-config.in 32 | 33 | # Modify system hostname(FROM OpenWrt CHANGE TO OpenWrt-N1) 34 | # sed -i 's/OpenWrt/OpenWrt-N1/g' package/base-files/files/bin/config_generate 35 | 36 | # Replace the default software source 37 | # sed -i 's#openwrt.proxy.ustclug.org#mirrors.bfsu.edu.cn\\/openwrt#' package/lean/default-settings/files/zzz-default-settings 38 | 39 | sed -i 's/invalid users = root/#invalid users = root/g' feeds/packages/net/samba4/files/smb.conf.template 40 | 41 | # 修复部分插件自启动脚本丢失可执行权限问题 42 | sed -i '/exit 0/i\chmod +x /etc/init.d/*' package/lean/default-settings/files/zzz-default-settings 43 | 44 | # 拉取软件包 45 | 46 | git clone https://github.com/ophub/luci-app-amlogic.git package/luci-app-amlogic 47 | git clone https://github.com/kenzok8/small-package package/small-package 48 | # git clone -b luci https://github.com/pexcn/openwrt-chinadns-ng.git package/luci-app-chinadns-ng 49 | # svn co https://github.com/immortalwrt-collections/openwrt-gowebdav/trunk/luci-app-gowebdav package/luci-app-gowebdav 50 | # svn co https://github.com/immortalwrt-collections/openwrt-gowebdav/trunk/gowebdav package/gowebdav 51 | git clone https://github.com/jerrykuku/luci-app-argon-config.git package/luci-app-argon-config 52 | git clone https://github.com/jerrykuku/luci-theme-argon.git package/luci-theme-argon 53 | git clone https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic.git package/luci-app-unblockneteasemusic 54 | svn co https://github.com/kiddin9/openwrt-packages/trunk/UnblockNeteaseMusic-Go package/UnblockNeteaseMusic-Go 55 | svn co https://github.com/kiddin9/openwrt-packages/trunk/luci-app-unblockneteasemusic-go package/luci-app-unblockneteasemusic-go 56 | 57 | 58 | # 删除重复包 59 | 60 | # rm -rf feeds/luci/applications/luci-app-netdata 61 | rm -rf feeds/luci/applications/luci-app-qbittorrent 62 | rm -rf feeds/packages/net/qBittorrent-static 63 | rm -rf feeds/packages/net/qBittorrent 64 | rm -rf package/small-package/luci-app-netdata 65 | # rm -rf package/small-package/luci-app-qbittorrent 66 | # rm -rf package/small-package/qBittorrent-static 67 | # rm -rf package/small-package/qBittorrent 68 | # rm -rf package/small-package/qbittorrent 69 | rm -rf feeds/luci/themes/luci-theme-argon 70 | rm -rf package/small-package/luci-app-openvpn-server 71 | rm -rf package/small-package/openvpn-easy-rsa-whisky 72 | rm -rf package/small-package/luci-app-wrtbwmon 73 | rm -rf package/small-package/wrtbwmon 74 | rm -rf package/small-package/luci-app-koolproxyR 75 | rm -rf package/small-package/luci-app-godproxy 76 | rm -rf package/small-package/luci-app-argon* 77 | rm -rf package/small-package/luci-theme-argon* 78 | rm -rf package/small-package/luci-app-amlogic 79 | rm -rf package/small-package/luci-app-unblockneteasemusic 80 | rm -rf package/small-package/upx-static 81 | rm -rf package/small-package/upx 82 | rm -rf package/small-package/firewall* 83 | rm -rf package/small-package/opkg 84 | rm -rf package/feeds/packages/aliyundrive-webdav 85 | rm -rf feeds/packages/multimedia/aliyundrive-webdav 86 | rm -rf package/feeds/packages/perl-xml-parser 87 | rm -rf package/feeds/packages/xfsprogs 88 | # 其他调整 89 | NAME=$"package/luci-app-unblockneteasemusic/root/usr/share/unblockneteasemusic" && mkdir -p $NAME/core 90 | curl 'https://api.github.com/repos/UnblockNeteaseMusic/server/commits?sha=enhanced&path=precompiled' -o commits.json 91 | echo "$(grep sha commits.json | sed -n "1,1p" | cut -c 13-52)">"$NAME/core_local_ver" 92 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/precompiled/app.js -o $NAME/core/app.js 93 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/precompiled/bridge.js -o $NAME/core/bridge.js 94 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/ca.crt -o $NAME/core/ca.crt 95 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/server.crt -o $NAME/core/server.crt 96 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/server.key -o $NAME/core/server.key 97 | 98 | sed -i 's#https://github.com/breakings/OpenWrt#https://github.com/quanjindeng/Actions_OpenWrt-Amlogic#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 99 | sed -i 's#ARMv8#openwrt_armvirt_iStore#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 100 | sed -i 's#opt/kernel#kernel#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 101 | 102 | sed -i 's#mount -t cifs#mount.cifs#g' feeds/luci/applications/luci-app-cifs-mount/root/etc/init.d/cifs 103 | 104 | #sed -i 's#<%+cbi/tabmenu%>##g' package/small-packages/luci-app-nginx-manager/luasrc/view/nginx-manager/index.htm 105 | 106 | # golang版本修复 107 | rm -rf feeds/packages/lang/golang 108 | git clone https://github.com/sbwml/packages_lang_golang feeds/packages/lang/golang 109 | 110 | # mosdns 111 | find ./ | grep Makefile | grep v2ray-geodata | xargs rm -f 112 | find ./ | grep Makefile | grep mosdns | xargs rm -f 113 | git clone https://github.com/sbwml/luci-app-mosdns package/mosdns 114 | git clone https://github.com/sbwml/v2ray-geodata package/geodata 115 | -------------------------------------------------------------------------------- /.github/workflows/编译固件(自用).yml: -------------------------------------------------------------------------------- 1 | name: 编译固件(自用) 2 | 3 | on: 4 | repository_dispatch: 5 | workflow_dispatch: 6 | 7 | #schedule: 8 | # - cron: 0 16 4,9,14,19,24,28,31 * * 9 | 10 | env: 11 | REPO_URL: https://github.com/coolsnowwolf/lede 12 | REPO_BRANCH: master 13 | FEEDS_CONF: feeds.conf.default 14 | CONFIG_FILE: .config-tiny 15 | DIY_P1_SH: diy-part1.sh 16 | DIY_P2_SH: diy-part2.sh 17 | TZ: Asia/Shanghai 18 | 19 | jobs: 20 | build: 21 | runs-on: ubuntu-latest 22 | 23 | steps: 24 | - name: Checkout 25 | uses: actions/checkout@v3 26 | 27 | - name: 检查服务器配置 28 | run: | 29 | echo "警告⚠" 30 | echo "分配的服务器性能有限,若选择的插件过多,务必注意CPU性能!" 31 | echo "云编译建议取消勾选Node.js及其相关插件!" 32 | echo "已知CPU型号(降序):8370C,8272CL,8171M,E5系列" 33 | echo "--------------------------CPU信息--------------------------" 34 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)" 35 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n" 36 | echo "--------------------------内存信息--------------------------" 37 | echo "已安装内存详细信息:" 38 | sudo lshw -short -C memory | grep GiB 39 | echo -e "\n" 40 | echo "--------------------------硬盘信息--------------------------" 41 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n" 42 | echo "硬盘详情:" 43 | df -Th 44 | 45 | - name: 初始化编译环境 46 | env: 47 | DEBIAN_FRONTEND: noninteractive 48 | run: | 49 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc 50 | sudo apt update -y 51 | sudo apt full-upgrade -y 52 | sudo apt install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ 53 | bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ 54 | git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ 55 | libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ 56 | mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \ 57 | libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \ 58 | vim wget xmlto xxd zlib1g-dev 59 | sudo -E apt-get -qq autoremove --purge 60 | sudo -E apt-get -qq clean 61 | sudo timedatectl set-timezone "$TZ" 62 | sudo mkdir -p /workdir 63 | sudo chown $USER:$GROUPS /workdir 64 | # 清理多余文件,腾出磁盘空间 65 | docker rmi $(docker images -q) 66 | # sudo -E apt-get remove -y --purge azure-cli ghc zulu* llvm* firefox google* dotnet* powershell mysql* php* android* 67 | # sudo rm -rf /etc/mysql /etc/php /swapfile 68 | 69 | - name: 克隆源码 70 | working-directory: /workdir 71 | run: | 72 | df -hT $PWD 73 | git clone $REPO_URL -b $REPO_BRANCH openwrt 74 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 75 | 76 | - name: 加载自定义feeds 77 | run: | 78 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 79 | chmod +x $DIY_P1_SH 80 | cd openwrt 81 | $GITHUB_WORKSPACE/$DIY_P1_SH 82 | 83 | - name: 更新feeds 84 | run: cd openwrt && ./scripts/feeds update -a 85 | 86 | - name: 安装feeds 87 | run: cd openwrt && ./scripts/feeds install -a 88 | 89 | - name: 加载自定义配置 90 | run: | 91 | [ -e files ] && mv files openwrt/files 92 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 93 | chmod +x $DIY_P2_SH 94 | cd openwrt 95 | $GITHUB_WORKSPACE/$DIY_P2_SH 96 | 97 | - name: 下载软件包 98 | id: package 99 | run: | 100 | cd openwrt 101 | make defconfig 102 | make download -j8 103 | find dl -size -1024c -exec ls -l {} \; 104 | find dl -size -1024c -exec rm -f {} \; 105 | 106 | - name: 编译固件 107 | id: compile 108 | run: | 109 | cd openwrt 110 | echo -e "$(nproc) thread compile" 111 | make -j$(nproc) || make -j1 || make -j1 V=s 112 | echo "status=success" >> $GITHUB_OUTPUT 113 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 114 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV 115 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 116 | 117 | - name: 清理磁盘空间 118 | if: (!cancelled()) 119 | run: | 120 | echo "清理之前:" 121 | df -hT 122 | mkdir openwrt-armvirt 123 | mv openwrt/bin/targets/*/*/*.tar.gz openwrt-armvirt/ 124 | echo -e "\n" 125 | echo "列出空间占用前10的目录或文件:" 126 | sudo du -h --max-depth=1 /workdir/openwrt |sort -nr | head -10 127 | rm -rf /workdir/openwrt/* 128 | echo -e "\n" 129 | echo "清理之后:" 130 | df -hT 131 | echo -e "\n" 132 | echo "当前路径文件" 133 | ls -l 134 | echo -e "\n" 135 | echo "列出空间占用前10的目录或文件:" 136 | sudo du -h --max-depth=1 /workdir/openwrt |sort -nr | head -10 137 | 138 | - name: 打包内核 139 | uses: unifreq/openwrt_packit@master 140 | env: 141 | WHOAMI: deng 142 | OPENWRT_ARMVIRT: openwrt-armvirt/*.tar.gz 143 | PACKAGE_SOC: s905d 144 | # KERNEL_AUTO_LATEST: false 145 | # KERNEL_REPO_URL: https://github.com/quanjindeng/Actions_OpenWrt-Amlogic/tree/main/kernel 146 | KERNEL_VERSION_NAME: 5.15.58_6.1.8 147 | 148 | - name: 发布固件 149 | uses: ncipollo/release-action@v1 150 | with: 151 | tag: openwrt_N1_${{ env.PACKAGED_OUTPUTDATE }} 152 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* 153 | allowUpdates: true 154 | token: ${{ secrets.GITHUB_TOKEN }} 155 | body: | 156 | 自用固件,插件较少! 157 | 如有其他需求,建议下载全插件版本固件! 158 | 159 | - name: 清理Actions空间 160 | uses: Mattraks/delete-workflow-runs@main 161 | with: 162 | token: ${{ secrets.GITHUB_TOKEN }} 163 | repository: ${{ github.repository }} 164 | keep_minimum_runs: 0 165 | retain_days: 7 166 | #retain_days: ${{ github.event.inputs.action_days }} 167 | 168 | - name: 删除多余releases 169 | uses: dev-drprasad/delete-older-releases@master 170 | with: 171 | repo: ${{ github.repository }} 172 | keep_latest: 5 173 | #keep_latest: ${{ github.event.inputs.rele }} 174 | delete_tags: true 175 | env: 176 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 177 | -------------------------------------------------------------------------------- /diy-part2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019-2020 P3TERX 4 | # 5 | # This is free software, licensed under the MIT License. 6 | # See /LICENSE for more information. 7 | # 8 | # https://github.com/P3TERX/Actions-OpenWrt 9 | # File name: diy-part2.sh 10 | # Description: OpenWrt DIY script part 2 (After Update feeds) 11 | # 12 | 13 | sed -i '/CYXluq4wUazHjmCDBCqXF/d' package/lean/default-settings/files/zzz-default-settings # 设置密码为空 14 | 15 | # Modify default theme(FROM uci-theme-bootstrap CHANGE TO luci-theme-material) 16 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' ./feeds/luci/collections/luci/Makefile 17 | 18 | # Modify some code adaptation 19 | #sed -i 's/LUCI_DEPENDS.*/LUCI_DEPENDS:=\@\(arm\|\|aarch64\)/g' feeds/luci/applications/luci-app-cpufreq/Makefile 20 | 21 | # Add autocore support for armvirt 22 | sed -i 's/TARGET_rockchip/TARGET_rockchip\|\|TARGET_armvirt/g' package/lean/autocore/Makefile 23 | 24 | # Set DISTRIB_REVISION 25 | sed -i "s/OpenWrt /Deng Build $(TZ=UTC-8 date "+%Y.%m.%d") @ OpenWrt /g" package/lean/default-settings/files/zzz-default-settings 26 | 27 | # Modify default IP(FROM 192.168.1.1 CHANGE TO 10.10.10.1) 28 | sed -i 's/192.168.1./10.10.10./g' package/base-files/files/bin/config_generate 29 | sed -i 's/192.168.1./10.10.10./g' package/base-files/luci2/bin/config_generate 30 | sed -i 's/192.168.1./10.10.10./g' package/base-files/Makefile 31 | sed -i 's/192.168.1./10.10.10./g' package/base-files/image-config.in 32 | 33 | # Modify system hostname(FROM OpenWrt CHANGE TO OpenWrt-N1) 34 | # sed -i 's/OpenWrt/OpenWrt-N1/g' package/base-files/files/bin/config_generate 35 | 36 | # Replace the default software source 37 | # sed -i 's#openwrt.proxy.ustclug.org#mirrors.bfsu.edu.cn\\/openwrt#' package/lean/default-settings/files/zzz-default-settings 38 | 39 | sed -i 's/invalid users = root/#invalid users = root/g' feeds/packages/net/samba4/files/smb.conf.template 40 | 41 | # 修复部分插件自启动脚本丢失可执行权限问题 42 | sed -i '/exit 0/i\chmod +x /etc/init.d/*' package/lean/default-settings/files/zzz-default-settings 43 | 44 | # 拉取软件包 45 | 46 | git clone https://github.com/ophub/luci-app-amlogic.git package/luci-app-amlogic 47 | git clone https://github.com/kenzok8/small-package package/small-package 48 | # git clone -b luci https://github.com/pexcn/openwrt-chinadns-ng.git package/luci-app-chinadns-ng 49 | # svn co https://github.com/immortalwrt-collections/openwrt-gowebdav/trunk/luci-app-gowebdav package/luci-app-gowebdav 50 | # svn co https://github.com/immortalwrt-collections/openwrt-gowebdav/trunk/gowebdav package/gowebdav 51 | git clone https://github.com/jerrykuku/luci-app-argon-config.git package/luci-app-argon-config 52 | git clone https://github.com/jerrykuku/luci-theme-argon.git package/luci-theme-argon 53 | git clone https://github.com/UnblockNeteaseMusic/luci-app-unblockneteasemusic.git package/luci-app-unblockneteasemusic 54 | svn co https://github.com/kiddin9/openwrt-packages/trunk/UnblockNeteaseMusic-Go package/UnblockNeteaseMusic-Go 55 | svn co https://github.com/kiddin9/openwrt-packages/trunk/luci-app-unblockneteasemusic-go package/luci-app-unblockneteasemusic-go 56 | git clone --depth 1 https://github.com/brvphoenix/luci-app-wrtbwmon package/deng/luci-app-wrtbwmon 57 | git clone --depth 1 https://github.com/brvphoenix/wrtbwmon package/deng/wrtbwmon 58 | 59 | 60 | # 删除重复包 61 | 62 | rm -rf package/small-package/luci-app-wechatpush 63 | # rm -rf feeds/luci/applications/luci-app-netdata 64 | rm -rf feeds/luci/applications/luci-app-qbittorrent 65 | rm -rf feeds/packages/net/qBittorrent-static 66 | rm -rf feeds/packages/net/qBittorrent 67 | rm -rf package/small-package/luci-app-netdata 68 | # rm -rf package/small-package/luci-app-qbittorrent 69 | # rm -rf package/small-package/qBittorrent-static 70 | # rm -rf package/small-package/qBittorrent 71 | # rm -rf package/small-package/qbittorrent 72 | rm -rf feeds/luci/themes/luci-theme-argon 73 | rm -rf package/small-package/luci-app-openvpn-server 74 | rm -rf package/small-package/openvpn-easy-rsa-whisky 75 | # rm -rf package/small-package/luci-app-wrtbwmon 76 | # rm -rf package/small-package/wrtbwmon 77 | rm -rf package/small-package/luci-app-koolproxyR 78 | rm -rf package/small-package/luci-app-godproxy 79 | rm -rf package/small-package/luci-app-argon* 80 | rm -rf package/small-package/luci-theme-argon* 81 | rm -rf package/small-package/luci-app-amlogic 82 | rm -rf package/small-package/luci-app-unblockneteasemusic 83 | rm -rf package/small-package/upx-static 84 | rm -rf package/small-package/upx 85 | rm -rf package/small-package/firewall* 86 | rm -rf package/small-package/opkg 87 | rm -rf package/feeds/packages/aliyundrive-webdav 88 | rm -rf feeds/packages/multimedia/aliyundrive-webdav 89 | rm -rf package/feeds/packages/perl-xml-parser 90 | rm -rf package/feeds/packages/lrzsz 91 | rm -rf package/feeds/packages/xfsprogs 92 | # 其他调整 93 | NAME=$"package/luci-app-unblockneteasemusic/root/usr/share/unblockneteasemusic" && mkdir -p $NAME/core 94 | curl 'https://api.github.com/repos/UnblockNeteaseMusic/server/commits?sha=enhanced&path=precompiled' -o commits.json 95 | echo "$(grep sha commits.json | sed -n "1,1p" | cut -c 13-52)">"$NAME/core_local_ver" 96 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/precompiled/app.js -o $NAME/core/app.js 97 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/precompiled/bridge.js -o $NAME/core/bridge.js 98 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/ca.crt -o $NAME/core/ca.crt 99 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/server.crt -o $NAME/core/server.crt 100 | curl -L https://github.com/UnblockNeteaseMusic/server/raw/enhanced/server.key -o $NAME/core/server.key 101 | 102 | sed -i 's#https://github.com/breakings/OpenWrt#https://github.com/quanjindeng/Actions_OpenWrt-Amlogic#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 103 | sed -i 's#ARMv8#openwrt_armvirt_v8#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 104 | sed -i 's#opt/kernel#kernel#g' package/luci-app-amlogic/luci-app-amlogic/root/etc/config/amlogic 105 | 106 | sed -i 's#mount -t cifs#mount.cifs#g' feeds/luci/applications/luci-app-cifs-mount/root/etc/init.d/cifs 107 | 108 | #sed -i 's#<%+cbi/tabmenu%>##g' package/small-packages/luci-app-nginx-manager/luasrc/view/nginx-manager/index.htm 109 | 110 | # golang版本修复 111 | rm -rf feeds/packages/lang/golang 112 | git clone https://github.com/sbwml/packages_lang_golang feeds/packages/lang/golang 113 | 114 | # mosdns 115 | find ./ | grep Makefile | grep v2ray-geodata | xargs rm -f 116 | find ./ | grep Makefile | grep mosdns | xargs rm -f 117 | git clone https://github.com/sbwml/luci-app-mosdns package/mosdns 118 | git clone https://github.com/sbwml/v2ray-geodata package/geodata 119 | -------------------------------------------------------------------------------- /.github/workflows/编译固件(immortalwrt).yml: -------------------------------------------------------------------------------- 1 | name: 编译固件(immortalwrt) 2 | 3 | on: 4 | repository_dispatch: 5 | workflow_dispatch: 6 | 7 | # schedule: 8 | # - cron: 0 16 * * 4 9 | 10 | env: 11 | REPO_URL: https://github.com/immortalwrt/immortalwrt 12 | #REPO_BRANCH: master 13 | FEEDS_CONF: feeds.conf.default 14 | CONFIG_FILE: .config-imm 15 | DIY_P1_SH: diy-part1.sh 16 | DIY_P2_SH: diy-part2-imm.sh 17 | TZ: Asia/Shanghai 18 | 19 | jobs: 20 | build: 21 | runs-on: ubuntu-22.04 22 | 23 | steps: 24 | - name: Checkout 25 | uses: actions/checkout@main 26 | 27 | - name: 检查服务器配置 28 | run: | 29 | echo "警告⚠" 30 | echo "分配的服务器性能有限,若选择的插件过多,务必注意CPU性能!" 31 | echo "云编译建议取消勾选Node.js及其相关插件!" 32 | echo "已知CPU型号(降序):8370C,8272CL,8171M,E5系列" 33 | echo "--------------------------CPU信息--------------------------" 34 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)" 35 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n" 36 | echo "--------------------------内存信息--------------------------" 37 | echo "已安装内存详细信息:" 38 | sudo lshw -short -C memory | grep GiB 39 | echo -e "\n" 40 | echo "--------------------------硬盘信息--------------------------" 41 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n" 42 | echo "硬盘详情:" 43 | df -Th 44 | 45 | - name: 初始化编译环境 46 | env: 47 | DEBIAN_FRONTEND: noninteractive 48 | run: | 49 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc 50 | sudo -E apt-get -qq update -y 51 | sudo -E apt-get -qq install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ 52 | bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ 53 | git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ 54 | libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ 55 | mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pip qemu-utils \ 56 | rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev 57 | sudo -E apt-get -qq autoremove --purge 58 | sudo -E apt-get -qq clean 59 | sudo timedatectl set-timezone "$TZ" 60 | sudo mkdir -p /workdir 61 | sudo chown $USER:$GROUPS /workdir 62 | # 清理多余文件,腾出磁盘空间 63 | docker rmi $(docker images -q) 64 | # sudo -E apt-get remove -y --purge azure-cli ghc zulu* llvm* firefox google* dotnet* powershell mysql* php* android* 65 | # sudo rm -rf /etc/mysql /etc/php /swapfile 66 | 67 | - name: 克隆源码 68 | working-directory: /workdir 69 | run: | 70 | df -hT $PWD 71 | git clone $REPO_URL openwrt 72 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 73 | 74 | - name: 编译工具链缓存 75 | uses: klever1988/cachewrtbuild@main 76 | with: 77 | ccache: 'false' 78 | prefix: ${{ github.workspace }}/openwrt 79 | 80 | - name: 加载自定义feeds 81 | run: | 82 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 83 | chmod +x $DIY_P1_SH 84 | cd openwrt 85 | $GITHUB_WORKSPACE/$DIY_P1_SH 86 | 87 | - name: 更新feeds 88 | run: cd openwrt && ./scripts/feeds update -a 89 | 90 | - name: 安装feeds 91 | run: cd openwrt && ./scripts/feeds install -a 92 | 93 | - name: 加载自定义配置 94 | run: | 95 | [ -e files ] && mv files openwrt/files 96 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 97 | chmod +x $DIY_P2_SH 98 | cd openwrt 99 | $GITHUB_WORKSPACE/$DIY_P2_SH 100 | 101 | - name: 下载软件包 102 | id: package 103 | run: | 104 | cd openwrt 105 | make defconfig 106 | make download -j8 107 | find dl -size -1024c -exec ls -l {} \; 108 | find dl -size -1024c -exec rm -f {} \; 109 | 110 | - name: 编译固件 111 | id: compile 112 | run: | 113 | cd openwrt 114 | echo -e "$(nproc) thread compile" 115 | make -j$(nproc) || make -j1 || make -j1 V=s 116 | echo "::set-output name=status::success" 117 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 118 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV 119 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 120 | 121 | - name: 清理磁盘空间 122 | if: (!cancelled()) 123 | run: | 124 | echo "清理之前:" 125 | df -hT 126 | mkdir openwrt-armvirt 127 | mv openwrt/bin/targets/*/*/*.tar.gz openwrt-armvirt/ 128 | echo -e "\n" 129 | echo "列出空间占用前10的目录或文件:" 130 | sudo du -h --max-depth=1 /workdir/openwrt |sort -nr | head -10 131 | rm -rf /workdir/openwrt/* 132 | echo -e "\n" 133 | echo "清理之后:" 134 | df -hT 135 | echo -e "\n" 136 | echo "当前路径文件" 137 | ls -l 138 | echo -e "\n" 139 | echo "列出空间占用前10的目录或文件:" 140 | sudo du -h --max-depth=1 /workdir/openwrt |sort -nr | head -10 141 | 142 | - name: 打包内核 143 | uses: unifreq/openwrt_packit@master 144 | env: 145 | WHOAMI: deng 146 | OPENWRT_ARMVIRT: openwrt-armvirt/*.tar.gz 147 | PACKAGE_SOC: s905d 148 | # KERNEL_AUTO_LATEST: false 149 | # KERNEL_REPO_URL: https://github.com/ophub/kernel/tree/main/pub/stable 150 | KERNEL_VERSION_NAME: 5.4.225 151 | 152 | - name: 发布固件 153 | uses: ncipollo/release-action@v1 154 | with: 155 | tag: openwrt_N1_immortalwrt_${{ env.PACKAGED_OUTPUTDATE }} 156 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/* 157 | allowUpdates: true 158 | token: ${{ secrets.GITHUB_TOKEN }} 159 | body: | 160 | 测试固件,使用 https://github.com/immortalwrt/immortalwrt 源码编译。 161 | 若非必要,不要下载! 162 | 163 | - name: 清理Actions空间 164 | uses: Mattraks/delete-workflow-runs@main 165 | with: 166 | token: ${{ secrets.GITHUB_TOKEN }} 167 | repository: ${{ github.repository }} 168 | keep_minimum_runs: 0 169 | retain_days: 7 170 | #retain_days: ${{ github.event.inputs.action_days }} 171 | 172 | - name: 删除多余releases 173 | uses: dev-drprasad/delete-older-releases@master 174 | with: 175 | repo: ${{ github.repository }} 176 | keep_latest: 5 177 | #keep_latest: ${{ github.event.inputs.rele }} 178 | delete_tags: true 179 | env: 180 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 181 | -------------------------------------------------------------------------------- /.github/workflows/编译固件.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2019-2020 P3TERX 3 | # 4 | # This is free software, licensed under the MIT License. 5 | # See /LICENSE for more information. 6 | # 7 | # https://github.com/P3TERX/Actions-OpenWrt 8 | # Description: Build OpenWrt using GitHub Actions 9 | # 10 | # 优化调整 by https://github.com/quanjindeng/Actions_OpenWrt-Amlogic 11 | # 12 | 13 | name: 编译固件 14 | 15 | on: 16 | repository_dispatch: 17 | workflow_dispatch: 18 | 19 | schedule: 20 | - cron: 0 16 * * 4 21 | 22 | env: 23 | REPO_URL: https://github.com/coolsnowwolf/lede 24 | REPO_BRANCH: master 25 | FEEDS_CONF: feeds.conf.default 26 | CONFIG_FILE: .config-full 27 | DIY_P1_SH: diy-part1.sh 28 | DIY_P2_SH: diy-part2.sh 29 | TZ: Asia/Shanghai 30 | 31 | jobs: 32 | build: 33 | runs-on: ubuntu-22.04 34 | 35 | steps: 36 | - name: 创建编译空间挂载点 37 | run: | 38 | sudo mkdir -p /workdir 39 | sudo chown $USER:$GROUPS /workdir 40 | 41 | - name: 最大化编译空间 42 | uses: easimon/maximize-build-space@master 43 | with: 44 | root-reserve-mb: 4096 45 | swap-size-mb: 1024 46 | temp-reserve-mb: 200 47 | build-mount-path: /workdir 48 | overprovision-lvm: 'true' 49 | remove-dotnet: 'true' 50 | remove-android: 'true' 51 | remove-haskell: 'true' 52 | remove-codeql: 'true' 53 | remove-docker-images: 'true' 54 | 55 | - name: 检查Actions 56 | uses: actions/checkout@v4 57 | 58 | - name: 检查服务器配置 59 | run: | 60 | echo "警告⚠" 61 | echo "分配的服务器性能有限,若选择的插件过多,务必注意CPU性能!" 62 | echo "云编译建议取消勾选Node.js及其相关插件!" 63 | echo "已知CPU型号(降序):8370C,8272CL,8171M,E5系列" 64 | echo "--------------------------CPU信息--------------------------" 65 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)" 66 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n" 67 | echo "--------------------------内存信息--------------------------" 68 | echo "已安装内存详细信息:" 69 | sudo lshw -short -C memory | grep GiB 70 | echo -e "\n" 71 | echo "--------------------------硬盘信息--------------------------" 72 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n" 73 | echo "硬盘详情:" 74 | df -Th 75 | 76 | - name: 初始化编译环境 77 | env: 78 | DEBIAN_FRONTEND: noninteractive 79 | run: | 80 | sudo apt-get update -y 81 | sudo apt-get full-upgrade -y 82 | sudo apt-get install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ 83 | bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ 84 | git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ 85 | libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ 86 | mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \ 87 | libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \ 88 | vim wget xmlto xxd zlib1g-dev 89 | sudo -E apt-get -qq autoremove --purge 90 | sudo -E apt-get -qq clean 91 | sudo timedatectl set-timezone "$TZ" 92 | echo "硬盘详情:" 93 | df -Th 94 | 95 | - name: 克隆源码 96 | working-directory: /workdir 97 | run: | 98 | git clone $REPO_URL -b $REPO_BRANCH openwrt 99 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 100 | 101 | - name: 加载自定义feeds 102 | run: | 103 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 104 | chmod +x $DIY_P1_SH 105 | cd openwrt 106 | $GITHUB_WORKSPACE/$DIY_P1_SH 107 | 108 | - name: 更新feeds 109 | run: cd openwrt && ./scripts/feeds update -a 110 | 111 | - name: 安装feeds 112 | run: cd openwrt && ./scripts/feeds install -a 113 | 114 | - name: 加载自定义配置 115 | run: | 116 | [ -e files ] && mv files openwrt/files 117 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 118 | chmod +x $DIY_P2_SH 119 | cd openwrt 120 | $GITHUB_WORKSPACE/$DIY_P2_SH 121 | 122 | - name: 下载软件包 123 | id: package 124 | run: | 125 | cd openwrt 126 | make defconfig 127 | make download -j8 128 | find dl -size -1024c -exec ls -l {} \; 129 | find dl -size -1024c -exec rm -f {} \; 130 | echo "硬盘详情:" 131 | df -Th 132 | 133 | - name: 编译固件 134 | id: compile 135 | run: | 136 | cd openwrt 137 | echo -e "$(nproc) thread compile" 138 | make -j$(nproc) || make -j1 || make -j1 V=s 139 | echo "status=success" >> $GITHUB_OUTPUT 140 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 141 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV 142 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 143 | 144 | - name: 清理磁盘空间 145 | if: (!cancelled()) 146 | run: | 147 | echo "清理之前:" 148 | df -hT 149 | mkdir openwrt-armvirt 150 | mkdir /workdir/upload 151 | cp openwrt/bin/targets/*/*/*.tar.gz /workdir/upload/ 152 | mv openwrt/bin/targets/*/*/*.tar.gz openwrt-armvirt/ 153 | echo -e "\n" 154 | echo "列出空间占用前10的目录或文件:" 155 | sudo du -h --max-depth=1 /workdir |sort -nr | head -10 156 | rm -rf /workdir/openwrt/ && sync 157 | echo -e "\n" 158 | echo "清理之后:" 159 | df -hT 160 | echo -e "\n" 161 | echo "/workdir路径文件" 162 | ls -l 163 | echo -e "\n" 164 | echo "列出空间占用前10的目录或文件:" 165 | sudo du -h --max-depth=1 /workdir |sort -nr | head -10 166 | 167 | - name: 打包内核 168 | uses: unifreq/openwrt_packit@master 169 | env: 170 | WHOAMI: deng 171 | OPENWRT_ARMVIRT: openwrt-armvirt/*.tar.gz 172 | PACKAGE_SOC: s905d 173 | # KERNEL_AUTO_LATEST: false 174 | # KERNEL_REPO_URL: https://github.com/quanjindeng/Actions_OpenWrt-Amlogic/tree/main/kernel 175 | KERNEL_VERSION_NAME: 5.15.105_6.6.1 176 | 177 | - name: 整理文件 178 | run: mv /opt/openwrt_packit/output/* /workdir/upload/ 179 | 180 | - name: 发布固件 181 | uses: ncipollo/release-action@v1 182 | with: 183 | tag: openwrt_armvirt_v8_${{ env.PACKAGED_OUTPUTDATE }} 184 | artifacts: /workdir/upload/* 185 | allowUpdates: true 186 | token: ${{ secrets.GITHUB_TOKEN }} 187 | body: | 188 | ### **适用于Amlogic平台的N1盒子OpenWrt固件--全插件** 189 | * **固件信息:** 190 | 默认IP: `10.10.10.1` 191 | 默认用户名: `root` 192 | 默认密码: `password` 193 | * **使用方法:** 194 | 1. 安装固件:写入U盘直接使用;U盘启动后可输入命令 `openwrt-install-amlogic` 按照英文提示写入到emmc 195 | 2. 更新固件:将固件放在 `/mnt/mmcblk2p4/` 目录下,输入命令 `openwrt-update-amlogic` 可直接更新 196 | 3. 登录Luci界面后,可直接使用`晶晨宝盒`插件进行写入emmc或者更新操作(使用前先按需求填写好插件设置),免去手动输入命令! 197 | * **更新说明:** 198 | 目前已集成大部分常用插件! 199 | * **N1云编译OP固件互助交流群:** 200 | https://t.me/OpenWrt_n1 201 | * **提示:** 202 | `openwrt_s905d_n1_XX_XX` 文件名才是固件! 203 | 204 | - name: 清理Actions空间 205 | uses: Mattraks/delete-workflow-runs@main 206 | with: 207 | token: ${{ secrets.GITHUB_TOKEN }} 208 | repository: ${{ github.repository }} 209 | keep_minimum_runs: 0 210 | retain_days: 7 211 | #retain_days: ${{ github.event.inputs.action_days }} 212 | 213 | - name: 删除多余releases 214 | uses: dev-drprasad/delete-older-releases@master 215 | with: 216 | repo: ${{ github.repository }} 217 | keep_latest: 6 218 | #keep_latest: ${{ github.event.inputs.rele }} 219 | delete_tags: true 220 | env: 221 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 222 | -------------------------------------------------------------------------------- /.github/workflows/编译固件(iStore).yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2019-2020 P3TERX 3 | # 4 | # This is free software, licensed under the MIT License. 5 | # See /LICENSE for more information. 6 | # 7 | # https://github.com/P3TERX/Actions-OpenWrt 8 | # Description: Build OpenWrt using GitHub Actions 9 | # 10 | 11 | name: 编译固件(iStore) 12 | 13 | on: 14 | repository_dispatch: 15 | workflow_dispatch: 16 | 17 | schedule: 18 | - cron: 0 16 15,28 * * 19 | 20 | env: 21 | REPO_URL: https://github.com/coolsnowwolf/lede 22 | REPO_BRANCH: master 23 | FEEDS_CONF: feeds.conf.default 24 | CONFIG_FILE: .config-istore 25 | DIY_P1_SH: diy-part1.sh 26 | DIY_P2_SH: diy-part2-istore.sh 27 | TZ: Asia/Shanghai 28 | 29 | jobs: 30 | build: 31 | runs-on: ubuntu-22.04 32 | 33 | steps: 34 | - name: 创建编译空间挂载点 35 | run: | 36 | sudo mkdir -p /workdir 37 | sudo chown $USER:$GROUPS /workdir 38 | 39 | - name: 最大化编译空间 40 | uses: easimon/maximize-build-space@master 41 | with: 42 | root-reserve-mb: 4096 43 | swap-size-mb: 1024 44 | temp-reserve-mb: 200 45 | build-mount-path: /workdir 46 | overprovision-lvm: 'true' 47 | remove-dotnet: 'true' 48 | remove-android: 'true' 49 | remove-haskell: 'true' 50 | remove-codeql: 'true' 51 | remove-docker-images: 'true' 52 | 53 | - name: 检查Actions 54 | uses: actions/checkout@v4 55 | 56 | - name: 检查服务器配置 57 | run: | 58 | echo "警告⚠" 59 | echo "分配的服务器性能有限,若选择的插件过多,务必注意CPU性能!" 60 | echo "云编译建议取消勾选Node.js及其相关插件!" 61 | echo "已知CPU型号(降序):8370C,8272CL,8171M,E5系列" 62 | echo "--------------------------CPU信息--------------------------" 63 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)" 64 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n" 65 | echo "--------------------------内存信息--------------------------" 66 | echo "已安装内存详细信息:" 67 | sudo lshw -short -C memory | grep GiB 68 | echo -e "\n" 69 | echo "--------------------------硬盘信息--------------------------" 70 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n" 71 | echo "硬盘详情:" 72 | df -Th 73 | 74 | - name: 初始化编译环境 75 | env: 76 | DEBIAN_FRONTEND: noninteractive 77 | run: | 78 | sudo apt-get update -y 79 | sudo apt-get full-upgrade -y 80 | sudo apt-get install -y ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential \ 81 | bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib \ 82 | git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libglib2.0-dev libgmp3-dev libltdl-dev \ 83 | libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libreadline-dev libssl-dev libtool lrzsz \ 84 | mkisofs msmtp nano ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools \ 85 | libpython3-dev qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip \ 86 | vim wget xmlto xxd zlib1g-dev 87 | sudo -E apt-get -qq autoremove --purge 88 | sudo -E apt-get -qq clean 89 | sudo timedatectl set-timezone "$TZ" 90 | echo "硬盘详情:" 91 | df -Th 92 | 93 | - name: 克隆源码 94 | working-directory: /workdir 95 | run: | 96 | df -hT $PWD 97 | git clone $REPO_URL -b $REPO_BRANCH openwrt 98 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 99 | 100 | - name: 加载自定义feeds 101 | run: | 102 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 103 | chmod +x $DIY_P1_SH 104 | cd openwrt 105 | $GITHUB_WORKSPACE/$DIY_P1_SH 106 | 107 | - name: 更新feeds 108 | run: cd openwrt && ./scripts/feeds update -a 109 | 110 | - name: 安装feeds 111 | run: cd openwrt && ./scripts/feeds install -a 112 | 113 | - name: 加载自定义配置 114 | run: | 115 | [ -e files ] && mv files openwrt/files 116 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 117 | chmod +x $DIY_P2_SH 118 | cd openwrt 119 | $GITHUB_WORKSPACE/$DIY_P2_SH 120 | 121 | - name: 下载软件包 122 | id: package 123 | run: | 124 | cd openwrt 125 | make defconfig 126 | make download -j8 127 | find dl -size -1024c -exec ls -l {} \; 128 | find dl -size -1024c -exec rm -f {} \; 129 | echo "硬盘详情:" 130 | df -Th 131 | 132 | - name: 编译固件 133 | id: compile 134 | run: | 135 | cd openwrt 136 | echo -e "$(nproc) thread compile" 137 | make -j$(nproc) || make -j1 || make -j1 V=s 138 | echo "status=success" >> $GITHUB_OUTPUT 139 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 140 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV 141 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 142 | 143 | - name: 清理磁盘空间 144 | if: (!cancelled()) 145 | run: | 146 | echo "清理之前:" 147 | df -hT 148 | mkdir openwrt-armvirt 149 | mkdir /workdir/upload 150 | cp openwrt/bin/targets/*/*/*.tar.gz /workdir/upload/ 151 | mv openwrt/bin/targets/*/*/*.tar.gz openwrt-armvirt/ 152 | echo -e "\n" 153 | echo "列出空间占用前10的目录或文件:" 154 | sudo du -h --max-depth=1 /workdir |sort -nr | head -10 155 | rm -rf /workdir/openwrt/ && sync 156 | echo -e "\n" 157 | echo "清理之后:" 158 | df -hT 159 | echo -e "\n" 160 | echo "/workdir路径文件" 161 | ls -l 162 | echo -e "\n" 163 | echo "列出空间占用前10的目录或文件:" 164 | sudo du -h --max-depth=1 /workdir |sort -nr | head -10 165 | 166 | - name: 打包内核 167 | uses: unifreq/openwrt_packit@master 168 | env: 169 | WHOAMI: deng 170 | OPENWRT_ARMVIRT: openwrt-armvirt/*.tar.gz 171 | PACKAGE_SOC: s905d 172 | # KERNEL_AUTO_LATEST: false 173 | # KERNEL_REPO_URL: https://github.com/quanjindeng/Actions_OpenWrt-Amlogic/tree/main/kernel 174 | KERNEL_VERSION_NAME: 5.15.105_6.6.1 175 | 176 | - name: 整理文件 177 | run: mv /opt/openwrt_packit/output/* /workdir/upload/ 178 | 179 | - name: 发布固件 180 | uses: ncipollo/release-action@v1 181 | with: 182 | tag: openwrt_armvirt_iStore_${{ env.PACKAGED_OUTPUTDATE }} 183 | artifacts: /workdir/upload/* 184 | allowUpdates: true 185 | token: ${{ secrets.GITHUB_TOKEN }} 186 | body: | 187 | ### **适用于Amlogic平台的N1盒子OpenWrt固件--精简版(含iStore插件)** 188 | * **固件信息:** 189 | 默认IP: `10.10.10.1` 190 | 默认用户名: `root` 191 | 默认密码: `password` 192 | * **使用方法:** 193 | 1. 安装固件:写入U盘直接使用;U盘启动后可输入命令 `openwrt-install-amlogic` 按照英文提示写入到emmc 194 | 2. 更新固件:将固件放在 `/mnt/mmcblk2p4/` 目录下,输入命令 `openwrt-update-amlogic` 可直接更新 195 | 3. 登录Luci界面后,可直接使用`晶晨宝盒`插件进行写入emmc或者更新操作(使用前先按需求填写好插件设置),免去手动输入命令! 196 | * **更新说明:** 197 | 精简版(含iStore插件)! 198 | * **N1云编译OP固件互助交流群:** 199 | https://t.me/OpenWrt_n1 200 | * **提示:** 201 | 建议自行添加iStore的软件源,并在软件源配置里禁用`# option check_signature`,之后刷新一下软件列表 202 | 自定义软件源: 203 | `src/gz is_nas_luci https://istore.linkease.com/repo/all/nas_luci` 204 | `src/gz is_store https://istore.linkease.com/repo/all/store` 205 | 固件升级后不会保留自行安装的插件,注意使用iStore插件备份! 206 | 固件更新频率:`每月一次` 207 | 208 | - name: 清理Actions空间 209 | uses: Mattraks/delete-workflow-runs@main 210 | with: 211 | token: ${{ secrets.GITHUB_TOKEN }} 212 | repository: ${{ github.repository }} 213 | keep_minimum_runs: 0 214 | retain_days: 7 215 | #retain_days: ${{ github.event.inputs.action_days }} 216 | 217 | - name: 删除多余releases 218 | uses: dev-drprasad/delete-older-releases@master 219 | with: 220 | repo: ${{ github.repository }} 221 | keep_latest: 6 222 | #keep_latest: ${{ github.event.inputs.rele }} 223 | delete_tags: true 224 | env: 225 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 226 | --------------------------------------------------------------------------------