├── .github └── workflows │ ├── Lean.yml │ ├── Lienol.yml │ ├── Update.yml │ ├── ctc_18.06.yml │ ├── ctc_24.10.yml │ ├── nanopi-r4s.yml │ ├── nanopi-r5s.yml │ └── nanopi-r6s.yml ├── Dockerfile ├── LICENSE ├── README.md └── customize.sh /.github/workflows/Lean.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Build OpenWrt using GitHub Actions 3 | # Lisence: MIT 4 | # Author: kenzo 5 | #================================================= 6 | 7 | name: Lean 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | inputs: 13 | ssh: 14 | description: 'ssh' 15 | required: false 16 | default: 'false' 17 | 18 | env: 19 | UPLOAD_BIN_DIR: false 20 | UPLOAD_FIRMWARE: true 21 | UPLOAD_COWTRANSFER: false 22 | UPLOAD_WETRANSFER: false 23 | UPLOAD_RELEASE: true 24 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 25 | PASSWORD: ${{ secrets.PASSWORD }} 26 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 27 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 28 | DOCKER_ID: ${{ secrets.DOCKER_ID }} 29 | DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }} 30 | TZ: Asia/Shanghai 31 | 32 | jobs: 33 | merge: 34 | runs-on: ubuntu-latest 35 | if: github.event.repository.owner.id == github.event.sender.id 36 | 37 | name: Build ${{matrix.target}} 38 | strategy: 39 | fail-fast: false 40 | matrix: 41 | target: [Lean] 42 | 43 | steps: 44 | - name: Checkout 45 | uses: actions/checkout@main 46 | 47 | - name: Free disk space 48 | uses: coder-xiaomo/free-disk-space@main 49 | with: 50 | tool-cache: false 51 | android: true 52 | dotnet: true 53 | haskell: true 54 | large-packages: true 55 | docker-images: true 56 | swap-storage: true 57 | 58 | - name: Initialization environment 59 | env: 60 | DEBIAN_FRONTEND: noninteractive 61 | run: | 62 | sudo -E apt-get -qq update 63 | sudo -E apt-get -qq install build-essential clang flex bison g++ gawk \ 64 | gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \ 65 | python3-setuptools rsync swig unzip zlib1g-dev file wget \ 66 | llvm python3-pyelftools libpython3-dev aria2 jq qemu-utils ccache rename \ 67 | libelf-dev device-tree-compiler libgmp3-dev libmpc-dev libfuse-dev 68 | sudo -E apt-get -qq autoremove --purge 69 | sudo -E apt-get -qq clean 70 | sudo timedatectl set-timezone "Asia/Shanghai" 71 | 72 | - name: Get current date 73 | id: date 74 | run: | 75 | echo "date=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_ENV 76 | echo "date2=$(date +'%m/%d %Y')" >> $GITHUB_ENV 77 | echo "date3=$(date +'%m.%d')" >> $GITHUB_ENV 78 | echo "DOCKERTAG=${{ secrets.DOCKER_ID }}/openwrt-6p:latest" >> $GITHUB_ENV 79 | VERSION="$(echo "${{github.event.action}}" | grep -Eo " [0-9.]+" | sed -e 's/ //')" || true 80 | [ "$VERSION" ] && echo "VERSION=$VERSION" >> $GITHUB_ENV || echo "VERSION=$(date +'%m.%d')" >> $GITHUB_ENV 81 | 82 | - name: Clone source code 83 | env: 84 | REPO_URL: https://github.com/coolsnowwolf/lede 85 | REPO_BRANCH: master 86 | run: | 87 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt 88 | cd openwrt 89 | sed -i '$a src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default 90 | 91 | - name: Free up disk space 92 | env: 93 | DEBIAN_FRONTEND: noninteractive 94 | run: | 95 | sudo mkdir -p -m 777 /mnt/openwrt/dl /mnt/openwrt/bin /mnt/openwrt/staging_dir 96 | ln -sf /mnt/openwrt/dl openwrt/dl 97 | ln -sf /mnt/openwrt/bin openwrt/bin 98 | ln -sf /mnt/openwrt/staging_dir openwrt/staging_dir 99 | 100 | - name: Update feeds 101 | working-directory: ./openwrt 102 | run: | 103 | ./scripts/feeds update -a 104 | 105 | - name: Defconfig ${{matrix.target}} 106 | env: 107 | CONFIG_FILE: '${{matrix.target}}.config' 108 | run: | 109 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 110 | chmod +x ./customize.sh && ./customize.sh 111 | cd openwrt 112 | rm -rf feeds/packages/lang/golang 113 | git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 114 | rm -rf feeds/luci/applications/luci-app-openclash 115 | cp -f feeds/smpackage/.github/diy/default-settings package/lean/default-settings/files/zzz-default-settings 116 | cp -f feeds/smpackage/.github/diy/banner package/base-files/files/etc/banner 117 | #cp -f feeds/smpackage/.github/diy/index_x86.htm package/lean/autocore/files/x86/index.htm 118 | sed -i "s/%D %V, %C/openwrt $(date +'%m.%d') by kenzo/g" package/base-files/files/etc/banner 119 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/luci/Makefile 120 | ./scripts/feeds update -a 121 | sed -i 's#GO_PKG_TARGET_VARS.*# #g' feeds/packages/utils/v2dat/Makefile 122 | ./scripts/feeds install -a 123 | cp -f feeds/smpackage/.github/diy/${{matrix.target}}.config .config && make defconfig 124 | sed -i 's/CONFIG_BINUTILS_VERSION="2.42"/CONFIG_BINUTILS_VERSION="2.43.1"/' .config 125 | 126 | - name: Download package 127 | working-directory: ./openwrt 128 | run: | 129 | make download -j$(($(nproc)+1)) 130 | find dl -size -1024c -exec rm -f {} \; 131 | 132 | - name: Cache 133 | uses: stupidloud/cachewrtbuild@main 134 | with: 135 | ccache: 'true' 136 | mixkey: ${{ matrix.target }} 137 | clean: ${{ contains(github.event.action, 'nocache') }} 138 | prefix: ${{ github.workspace }}/openwrt 139 | 140 | - name: Check space usage 141 | run: | 142 | shopt -s extglob 143 | cd openwrt 144 | if [[ -f staging_dir/*${{ env.MTARGET }}*/bin ]]; then 145 | rm -rf staging_dir/!(*${{ env.MTARGET }}*|host|hostpkg) build_dir/!(*${{ env.MTARGET }}*|host|hostpkg) 146 | fi 147 | df -hT 148 | 149 | - name: Compile the firmware 150 | working-directory: ./openwrt 151 | run: | 152 | echo -e "$(($(nproc)+1)) thread compile" 153 | make -j$(($(nproc)+1)) || make -j1 V=s 154 | 155 | - name: Upload bin directory 156 | uses: actions/upload-artifact@main 157 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 158 | with: 159 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 160 | path: openwrt/bin 161 | 162 | - name: Organize files 163 | id: organize 164 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 165 | run: | 166 | mkdir firmware 167 | mv -f openwrt/bin/targets/*/*/{*combined*,*sysupgrade*} ./firmware/ 2>/dev/null || true 168 | cp openwrt/.config ./firmware/${{matrix.target}}.config 169 | cp openwrt/build_dir/target-*/linux-*/linux-*/.config ./firmware/${{matrix.target}}_kernel.config 170 | cd firmware 171 | echo "v${{ env.date2 }}" > version.txt 172 | md5=$((md5sum *squashfs-sysupgrade* || md5sum *squashfs-combined-efi*) | awk '{print $1}') 2>/dev/null 173 | echo $md5 >> version.txt 174 | rename -v "s/^openwrt/${{ env.VERSION }}-openwrt/" * || true 175 | rename -v "s/friendlyarm_//" *gz || true 176 | echo $md5 >> version.txt 177 | echo ${{matrix.target}} >> version.txt 178 | rm -rf sha256sums 179 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 180 | 181 | - name: Deploy imagebuilder to server 182 | uses: easingthemes/ssh-deploy@main 183 | with: 184 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 185 | ARGS: "-avzr --exclude=" 186 | SOURCE: firmware/ 187 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 188 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 189 | REMOTE_USER: root 190 | TARGET: "/www/wwwroot/${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}}/" 191 | 192 | - name: Upload firmware directory 193 | uses: actions/upload-artifact@main 194 | if: steps.organize.outputs.status == 'success' && !cancelled() 195 | with: 196 | name: ${{ env.date3 }}_${{matrix.target}} 197 | path: ${{ env.FIRMWARE }} 198 | 199 | - name: Set Up Docker Buildx 200 | uses: docker/setup-buildx-action@master 201 | if: env.DOCKER_ID && env.DOCKER_PASSWD 202 | 203 | - name: Login To DockerHub 204 | uses: docker/login-action@master 205 | if: env.DOCKER_ID && env.DOCKER_PASSWD 206 | with: 207 | username: ${{ secrets.DOCKER_ID }} 208 | password: ${{ secrets.DOCKER_PASSWD }} 209 | 210 | - name: Build and push docker image 211 | uses: docker/build-push-action@master 212 | continue-on-error: true 213 | if: env.DOCKER_ID && env.DOCKER_PASSWD && ! contains(github.event.action, 'noser') 214 | with: 215 | platforms: ${{ env.ARCH }} 216 | file: Dockerfile 217 | context: . 218 | push: true 219 | tags: | 220 | ${{ secrets.DOCKER_ID }}/openwrt-6p:${{matrix.target}} 221 | ${{ env.DOCKERTAG }} 222 | 223 | - name: Upload firmware to cowtransfer 224 | id: cowtransfer 225 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 226 | run: | 227 | curl -fsSL git.io/file-transfer | sh 228 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 229 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 230 | echo "url=$(cat cowtransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 231 | 232 | - name: Upload firmware to WeTransfer 233 | id: wetransfer 234 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 235 | run: | 236 | curl -fsSL git.io/file-transfer | sh 237 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 238 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 239 | echo "url=$(cat wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 240 | 241 | - name: Generate release tag 242 | id: tag 243 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 244 | run: | 245 | echo -e "墙内外加速下载 🎈:\n" >> release.txt 246 | echo -e "[kenzo] (https://${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}})\n" >> release.txt 247 | touch release.txt 248 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 249 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 250 | echo "status=success" >> $GITHUB_OUTPUT 251 | 252 | - name: Upload firmware to release 253 | uses: softprops/action-gh-release@v2 254 | if: steps.tag.outputs.status == 'success' && !cancelled() 255 | env: 256 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 257 | with: 258 | files: "${{ env.FIRMWARE }}/*" 259 | name: ${{ env.date2 }} ${{matrix.target}} 260 | tag_name: ${{ env.date }}_${{matrix.target}} 261 | body_path: release.txt 262 | 263 | - name: Delete workflow runs 264 | uses: Mattraks/delete-workflow-runs@main 265 | with: 266 | retain_days: 1 267 | keep_minimum_runs: 0 268 | 269 | - name: Remove old Releases 270 | uses: dev-drprasad/delete-older-releases@master 271 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 272 | with: 273 | keep_latest: 6 274 | delete_tags: true 275 | env: 276 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 277 | 278 | -------------------------------------------------------------------------------- /.github/workflows/Lienol.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Build OpenWrt using GitHub Actions 3 | # Lisence: MIT 4 | # Author: kenzo 5 | #================================================= 6 | 7 | name: Lienol 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | inputs: 13 | ssh: 14 | description: 'ssh' 15 | required: false 16 | default: 'false' 17 | 18 | env: 19 | UPLOAD_BIN_DIR: false 20 | UPLOAD_FIRMWARE: true 21 | UPLOAD_COWTRANSFER: false 22 | UPLOAD_WETRANSFER: false 23 | UPLOAD_RELEASE: true 24 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 25 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 26 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 27 | DOCKER_ID: ${{ secrets.DOCKER_ID }} 28 | DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }} 29 | TZ: Asia/Shanghai 30 | 31 | jobs: 32 | merge: 33 | runs-on: ubuntu-latest 34 | if: github.event.repository.owner.id == github.event.sender.id 35 | 36 | name: Build ${{matrix.target}} 37 | strategy: 38 | fail-fast: false 39 | matrix: 40 | target: [Lienol] 41 | 42 | steps: 43 | - name: Checkout 44 | uses: actions/checkout@main 45 | 46 | - name: Free disk space 47 | uses: coder-xiaomo/free-disk-space@main 48 | with: 49 | tool-cache: false 50 | android: true 51 | dotnet: true 52 | haskell: true 53 | large-packages: true 54 | docker-images: true 55 | swap-storage: true 56 | 57 | - name: Initialization environment 58 | env: 59 | DEBIAN_FRONTEND: noninteractive 60 | run: | 61 | sudo -E apt-get -qq update 62 | sudo -E apt-get -qq install build-essential clang flex bison g++ gawk \ 63 | gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \ 64 | python3-setuptools rsync swig unzip zlib1g-dev file wget \ 65 | llvm python3-pyelftools libpython3-dev aria2 jq qemu-utils ccache rename \ 66 | libelf-dev device-tree-compiler libgmp3-dev libmpc-dev libfuse-dev 67 | sudo -E apt-get -qq autoremove --purge 68 | sudo -E apt-get -qq clean 69 | sudo timedatectl set-timezone "Asia/Shanghai" 70 | 71 | - name: Get current date 72 | id: date 73 | run: | 74 | echo "date=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_ENV 75 | echo "date2=$(date +'%m/%d %Y')" >> $GITHUB_ENV 76 | echo "date3=$(date +'%m.%d')" >> $GITHUB_ENV 77 | echo "DOCKERTAG=${{ secrets.DOCKER_ID }}/openwrt-6p:latest" >> $GITHUB_ENV 78 | VERSION="$(echo "${{github.event.action}}" | grep -Eo " [0-9.]+" | sed -e 's/ //')" || true 79 | [ "$VERSION" ] && echo "VERSION=$VERSION" >> $GITHUB_ENV || echo "VERSION=$(date +'%m.%d')" >> $GITHUB_ENV 80 | 81 | - name: Clone source code 82 | env: 83 | REPO_URL: https://github.com/Lienol/openwrt 84 | REPO_BRANCH: "24.10" 85 | run: | 86 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt 87 | cd openwrt 88 | sed -i '$a src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default 89 | 90 | - name: Free up disk space 91 | env: 92 | DEBIAN_FRONTEND: noninteractive 93 | run: | 94 | sudo mkdir -p -m 777 /mnt/openwrt/dl /mnt/openwrt/staging_dir /mnt/openwrt/build_dir 95 | ln -sf /mnt/openwrt/dl openwrt/dl 96 | ln -sf /mnt/openwrt/staging_dir openwrt/staging_dir 97 | ln -sf /mnt/openwrt/build_dir openwrt/build_dir 98 | 99 | - name: Update feeds 100 | working-directory: ./openwrt 101 | run: | 102 | ./scripts/feeds update -a 103 | 104 | - name: Defconfig ${{matrix.target}} 105 | env: 106 | CONFIG_FILE: '${{matrix.target}}.config' 107 | run: | 108 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 109 | chmod +x ./customize.sh && ./customize.sh 110 | cd openwrt 111 | rm -rf feeds/packages/lang/golang 112 | git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 113 | rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} 114 | rm -rf feeds/luci/themes/luci-theme-argon && rm -rf feeds/other/{luci-app-adguardhome,luci-app-dockerman} 115 | rm -rf feeds/lienol/luci-app-fileassistant && rm -rf feeds/packages/net/{adguardhome,smartdns} 116 | cp -f feeds/smpackage/.github/diy/zzz-default-settings package/default-settings/files/zzz-default-settings 117 | cp -f feeds/smpackage/.github/diy/banner package/base-files/files/etc/banner 118 | patch -p1 < "feeds/smpackage/.github/diy/patches/0004-luci-mod-status-firewall-disable-legacy-firewall-rul.patch" 119 | rm -rf feeds/smpackage/luci-theme-design && git clone -b js --single-branch https://github.com/kenzok78/luci-theme-design feeds/smpackage/luci-theme-design 120 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/luci/Makefile 121 | sed -i "s/%D %V, %C/openwrt $(date +'%m.%d') by kenzo/g" package/base-files/files/etc/banner 122 | ./scripts/feeds update -a && ./scripts/feeds install -a 123 | cp -f feeds/smpackage/.github/diy/${{matrix.target}}.config .config && make defconfig 124 | 125 | - name: Download package 126 | working-directory: ./openwrt 127 | run: | 128 | make download -j$(nproc) 129 | find dl -size -1024c -exec rm -f {} \; 130 | 131 | - name: Compile the firmware 132 | working-directory: ./openwrt 133 | run: | 134 | echo -e "$(($(nproc)+1)) thread compile" 135 | make -j$(($(nproc)+1)) || make -j1 V=s 136 | 137 | - name: Check space usage 138 | if: (!cancelled()) 139 | run: df -hT 140 | 141 | - name: Upload bin directory 142 | uses: actions/upload-artifact@main 143 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 144 | with: 145 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 146 | path: openwrt/bin 147 | 148 | - name: Organize files 149 | id: organize 150 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 151 | run: | 152 | mkdir firmware 153 | mv -f openwrt/bin/targets/*/*/{*combined*,*sysupgrade*} ./firmware/ 2>/dev/null || true 154 | cp openwrt/.config ./firmware/${{matrix.target}}.config 155 | cp openwrt/build_dir/target-*/linux-*/linux-*/.config ./firmware/${{matrix.target}}_kernel.config 156 | cd firmware 157 | echo "v${{ env.date2 }}" > version.txt 158 | md5=$((md5sum *squashfs-sysupgrade* || md5sum *squashfs-combined-efi*) | awk '{print $1}') 2>/dev/null 159 | echo $md5 >> version.txt 160 | rename -v "s/^openwrt/${{ env.VERSION }}-openwrt/" * || true 161 | rename -v "s/friendlyarm_//" *gz || true 162 | echo $md5 >> version.txt 163 | echo ${{matrix.target}} >> version.txt 164 | rm -rf sha256sums 165 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 166 | 167 | - name: Deploy imagebuilder to server 168 | uses: easingthemes/ssh-deploy@main 169 | with: 170 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 171 | ARGS: "-avzr --exclude=" 172 | SOURCE: firmware/ 173 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 174 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 175 | REMOTE_USER: root 176 | TARGET: "/www/wwwroot/${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}}/" 177 | 178 | - name: Upload firmware directory 179 | uses: actions/upload-artifact@main 180 | if: steps.organize.outputs.status == 'success' && !cancelled() 181 | with: 182 | name: ${{ env.date3 }}_${{matrix.target}} 183 | path: ${{ env.FIRMWARE }} 184 | 185 | - name: Set Up Docker Buildx 186 | uses: docker/setup-buildx-action@master 187 | if: env.DOCKER_ID && env.DOCKER_PASSWD 188 | 189 | - name: Login To DockerHub 190 | uses: docker/login-action@master 191 | if: env.DOCKER_ID && env.DOCKER_PASSWD 192 | with: 193 | username: ${{ secrets.DOCKER_ID }} 194 | password: ${{ secrets.DOCKER_PASSWD }} 195 | 196 | - name: Build and push docker image 197 | uses: docker/build-push-action@master 198 | continue-on-error: true 199 | if: env.DOCKER_ID && env.DOCKER_PASSWD && ! contains(github.event.action, 'noser') 200 | with: 201 | platforms: ${{ env.ARCH }} 202 | file: Dockerfile 203 | context: . 204 | push: true 205 | tags: | 206 | ${{ secrets.DOCKER_ID }}/openwrt-6p:${{matrix.target}} 207 | ${{ env.DOCKERTAG }} 208 | 209 | - name: Upload firmware to cowtransfer 210 | id: cowtransfer 211 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 212 | run: | 213 | curl -fsSL git.io/file-transfer | sh 214 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 215 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 216 | echo "url=$(cat cowtransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 217 | 218 | - name: Upload firmware to WeTransfer 219 | id: wetransfer 220 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 221 | run: | 222 | curl -fsSL git.io/file-transfer | sh 223 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 224 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 225 | echo "url=$(cat wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 226 | 227 | - name: Generate release tag 228 | id: tag 229 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 230 | run: | 231 | echo -e "墙内外加速下载 🎈:\n" >> release.txt 232 | echo -e "[kenzo] (https://${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}})\n" >> release.txt 233 | touch release.txt 234 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 235 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 236 | echo "status=success" >> $GITHUB_OUTPUT 237 | 238 | - name: Upload firmware to release 239 | uses: softprops/action-gh-release@v2 240 | if: steps.tag.outputs.status == 'success' && !cancelled() 241 | env: 242 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 243 | with: 244 | files: "${{ env.FIRMWARE }}/*" 245 | name: ${{ env.date2 }} ${{matrix.target}} 246 | tag_name: ${{ env.date }}_${{matrix.target}} 247 | body_path: release.txt 248 | 249 | - name: Delete workflow runs 250 | uses: Mattraks/delete-workflow-runs@main 251 | with: 252 | retain_days: 1 253 | keep_minimum_runs: 0 254 | 255 | - name: Remove old Releases 256 | uses: dev-drprasad/delete-older-releases@master 257 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 258 | with: 259 | keep_latest: 6 260 | delete_tags: true 261 | env: 262 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 263 | 264 | -------------------------------------------------------------------------------- /.github/workflows/Update.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2019-2021 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 | # File: .github/workflows/update-checker.yml 9 | # Description: Source code update checker 10 | # 11 | 12 | name: Update 13 | 14 | env: 15 | REPO_URL: https://github.com/kenzok8/small-package 16 | REPO_BRANCH: main 17 | TZ: Asia/Shanghai 18 | 19 | on: 20 | schedule: 21 | - cron: 0 9 * * SAT 22 | workflow_dispatch: 23 | inputs: 24 | version: 25 | description: 'Version' 26 | required: false 27 | default: '' 28 | 29 | jobs: 30 | jell: 31 | runs-on: ubuntu-latest 32 | 33 | steps: 34 | 35 | - name: Get Commit Hash 36 | id: getHash 37 | run: | 38 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH . 39 | echo "commitHash=$(git rev-parse HEAD)" >>$GITHUB_OUTPUT 40 | 41 | - name: Compare Commit Hash 42 | id: cacheHash 43 | uses: actions/cache@main 44 | with: 45 | path: .commitHash 46 | key: HEAD-${{ steps.getHash.outputs.commitHash }} 47 | 48 | - name: Save New Commit Hash 49 | if: steps.cacheHash.outputs.cache-hit != 'true' 50 | run: | 51 | echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash 52 | 53 | - name: set current date 54 | id: date 55 | run: | 56 | echo "date=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_ENV 57 | echo "date2=$(date +'%m/%d %Y')" >> $GITHUB_ENV 58 | echo "date3=$(date +'%m.%d')" >> $GITHUB_ENV 59 | sudo timedatectl set-timezone "$TZ" 60 | 61 | - name: Trigger build 62 | if: steps.cacheHash.outputs.cache-hit != 'true' 63 | uses: peter-evans/repository-dispatch@main 64 | with: 65 | token: ${{ secrets.REPO_TOKEN }} 66 | event-type: ${{ env.date3 }} ${{ github.event.inputs.version }} 67 | 68 | - name: Delete workflow runs 69 | uses: Mattraks/delete-workflow-runs@main 70 | with: 71 | retain_days: 1 72 | keep_minimum_runs: 1 73 | 74 | - name: Remove old Releases 75 | uses: dev-drprasad/delete-older-releases@master 76 | continue-on-error: true 77 | if: env.UPLOAD_FIRMWARE_FOR_RELEASE == 'true' && !cancelled() 78 | with: 79 | keep_latest: 3 80 | delete_tags: true 81 | env: 82 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 83 | 84 | 85 | -------------------------------------------------------------------------------- /.github/workflows/ctc_18.06.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Build OpenWrt using GitHub Actions 3 | # Lisence: MIT 4 | # Author: kenzo 5 | #================================================= 6 | 7 | name: openwrt_18.06 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | inputs: 13 | ssh: 14 | description: 'ssh' 15 | required: false 16 | default: 'false' 17 | 18 | env: 19 | UPLOAD_BIN_DIR: false 20 | UPLOAD_FIRMWARE: true 21 | UPLOAD_COWTRANSFER: false 22 | UPLOAD_WETRANSFER: false 23 | UPLOAD_RELEASE: true 24 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 25 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 26 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 27 | DOCKER_ID: ${{ secrets.DOCKER_ID }} 28 | DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }} 29 | TZ: Asia/Shanghai 30 | 31 | jobs: 32 | merge: 33 | runs-on: ubuntu-latest 34 | if: github.event.repository.owner.id == github.event.sender.id 35 | 36 | name: Build ${{matrix.target}} 37 | strategy: 38 | fail-fast: false 39 | matrix: 40 | target: [ctc_18.06] 41 | 42 | steps: 43 | - name: Checkout 44 | uses: actions/checkout@main 45 | 46 | - name: Free disk space 47 | uses: coder-xiaomo/free-disk-space@main 48 | with: 49 | tool-cache: false 50 | android: true 51 | dotnet: true 52 | haskell: true 53 | large-packages: true 54 | docker-images: true 55 | swap-storage: true 56 | 57 | - name: Set up Python 3.8 58 | uses: actions/setup-python@v2 59 | with: 60 | python-version: 3.8 61 | 62 | - name: Initialization environment 63 | env: 64 | DEBIAN_FRONTEND: noninteractive 65 | run: | 66 | sudo -E apt-get -qq update 67 | sudo -E apt-get -qq install build-essential clang flex bison g++ gawk \ 68 | gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \ 69 | python3-setuptools rsync swig unzip zlib1g-dev file wget \ 70 | llvm python3-pyelftools libpython3-dev aria2 jq qemu-utils ccache rename \ 71 | libelf-dev device-tree-compiler libgmp3-dev libmpc-dev libfuse-dev 72 | sudo -E apt-get -qq autoremove --purge 73 | sudo -E apt-get -qq clean 74 | sudo timedatectl set-timezone "Asia/Shanghai" 75 | 76 | - name: Get current date 77 | id: date 78 | run: | 79 | echo "date=$(date +'%m/%d_%Y_%H/%M')" >> $GITHUB_ENV 80 | echo "date2=$(date +'%Y/%m %d')" >> $GITHUB_ENV 81 | echo "date3=$(date +'%m.%d')" >> $GITHUB_ENV 82 | echo "DOCKERTAG=${{ secrets.DOCKER_ID }}/openwrt-6p:latest" >> $GITHUB_ENV 83 | VERSION="$(echo "${{github.event.action}}" | grep -Eo " [0-9.]+" | sed -e 's/ //')" || true 84 | [ "$VERSION" ] && echo "VERSION=$VERSION" >> $GITHUB_ENV || echo "VERSION=$(date +'%m.%d')" >> $GITHUB_ENV 85 | 86 | - name: Clone source code 87 | env: 88 | REPO_URL: https://github.com/immortalwrt/immortalwrt 89 | REPO_BRANCH: openwrt-18.06-k5.4 90 | run: | 91 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt 92 | cd openwrt 93 | sed -i '$a src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default 94 | 95 | - name: Free up disk space 96 | env: 97 | DEBIAN_FRONTEND: noninteractive 98 | run: | 99 | sudo mkdir -p -m 777 /mnt/openwrt/dl /mnt/openwrt/staging_dir /mnt/openwrt/build_dir 100 | ln -sf /mnt/openwrt/dl openwrt/dl 101 | ln -sf /mnt/openwrt/staging_dir openwrt/staging_dir 102 | ln -sf /mnt/openwrt/build_dir openwrt/build_dir 103 | 104 | - name: Update feeds 105 | working-directory: ./openwrt 106 | run: | 107 | ./scripts/feeds update -a 108 | 109 | - name: Defconfig ${{matrix.target}} 110 | env: 111 | CONFIG_FILE: '${{matrix.target}}.config' 112 | run: | 113 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 114 | chmod +x ./customize.sh && ./customize.sh 115 | cd openwrt 116 | rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} 117 | rm -rf feeds/packages/lang/golang 118 | git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 119 | rm -rf feeds/packages/net/{alist,adguardhome,brook,chinadns-ng,dns2socks,dns2tcp,hysteria,ipt2socks} 120 | rm -rf feeds/packages/net/{lua-neturl,microsocks,naiveproxy,pdnsd-alt,redsocks2,simple-obfs,sing-box,ssocks,tcping,tuic-client} 121 | rm -rf feeds/packages/net/{gost,mosdns,redsocks*,smartdns,trojan*,v2ray*,xray*} 122 | cp -f feeds/smpackage/.github/diy/default-settings package/emortal/default-settings/files/99-default-settings 123 | cp -f feeds/smpackage/.github/diy/banner package/emortal/default-settings/files/openwrt_banner 124 | cp -f feeds/smpackage/.github/diy/banner package/base-files/files/etc/banner 125 | cp -f feeds/smpackage/.github/diy/index_x86.htm package/emortal/autocore/files/generic/index.htm 126 | sed -i "s/%D %V, %C/openwrt $(date +'%m.%d') by kenzo/g" package/base-files/files/etc/banner 127 | ./scripts/feeds update -a && ./scripts/feeds install -a 128 | cp -f feeds/smpackage/.github/diy/${{matrix.target}}.config .config && make defconfig 129 | 130 | - name: Download package 131 | working-directory: ./openwrt 132 | run: | 133 | make download -j$(nproc) 134 | find dl -size -1024c -exec rm -f {} \; 135 | 136 | - name: Cache 137 | uses: klever1988/cachewrtbuild@main 138 | with: 139 | ccache: 'true' 140 | prefix: ${{ github.workspace }}/openwrt 141 | 142 | - name: Compile the firmware 143 | working-directory: ./openwrt 144 | run: | 145 | echo -e "$(($(nproc)+1)) thread compile" 146 | make -j$(($(nproc)+1)) || make -j1 V=s 147 | 148 | - name: Check space usage 149 | if: (!cancelled()) 150 | run: df -hT 151 | 152 | - name: Upload bin directory 153 | uses: actions/upload-artifact@main 154 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 155 | with: 156 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 157 | path: openwrt/bin 158 | 159 | - name: Organize files 160 | id: organize 161 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 162 | run: | 163 | mkdir firmware 164 | mv -f openwrt/bin/targets/*/*/{*combined*,*sysupgrade*} ./firmware/ 2>/dev/null || true 165 | cp openwrt/.config ./firmware/${{matrix.target}}.config 166 | cp openwrt/build_dir/target-*/linux-*/linux-*/.config ./firmware/${{matrix.target}}_kernel.config 167 | cd firmware 168 | echo "v${{ env.date2 }}" > version.txt 169 | md5=$((md5sum *squashfs-sysupgrade* || md5sum *squashfs-combined-efi*) | awk '{print $1}') 2>/dev/null 170 | echo $md5 >> version.txt 171 | rename -v "s/^immortalwrt/${{ env.VERSION }}-openwrt/" * || true 172 | rename -v "s/friendlyarm_//" *gz || true 173 | echo $md5 >> version.txt 174 | echo ${{matrix.target}} >> version.txt 175 | rm -rf sha256sums 176 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 177 | 178 | - name: Deploy imagebuilder to server 179 | uses: easingthemes/ssh-deploy@main 180 | with: 181 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 182 | ARGS: "-avzr --exclude=" 183 | SOURCE: firmware/ 184 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 185 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 186 | REMOTE_USER: root 187 | TARGET: "/www/wwwroot/${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}}/" 188 | 189 | - name: Upload firmware directory 190 | uses: actions/upload-artifact@main 191 | if: steps.organize.outputs.status == 'success' && !cancelled() 192 | with: 193 | name: ${{ env.date3 }}_${{matrix.target}} 194 | path: ${{ env.FIRMWARE }} 195 | 196 | - name: Set Up Docker Buildx 197 | uses: docker/setup-buildx-action@master 198 | if: env.DOCKER_ID && env.DOCKER_PASSWD 199 | 200 | - name: Login To DockerHub 201 | uses: docker/login-action@master 202 | if: env.DOCKER_ID && env.DOCKER_PASSWD 203 | with: 204 | username: ${{ secrets.DOCKER_ID }} 205 | password: ${{ secrets.DOCKER_PASSWD }} 206 | 207 | - name: Build and push docker image 208 | uses: docker/build-push-action@master 209 | continue-on-error: true 210 | if: env.DOCKER_ID && env.DOCKER_PASSWD && ! contains(github.event.action, 'noser') 211 | with: 212 | platforms: ${{ env.ARCH }} 213 | file: Dockerfile 214 | context: . 215 | push: true 216 | tags: | 217 | ${{ secrets.DOCKER_ID }}/openwrt-6p:${{matrix.target}} 218 | ${{ env.DOCKERTAG }} 219 | 220 | - name: Upload firmware to cowtransfer 221 | id: cowtransfer 222 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 223 | run: | 224 | curl -fsSL git.io/file-transfer | sh 225 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 226 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 227 | echo "url=$(cat cowtransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 228 | 229 | - name: Upload firmware to WeTransfer 230 | id: wetransfer 231 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 232 | run: | 233 | curl -fsSL git.io/file-transfer | sh 234 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 235 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 236 | echo "url=$(cat wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 237 | 238 | - name: Generate release tag 239 | id: tag 240 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 241 | run: | 242 | echo -e "墙内外加速下载 🎈:\n" >> release.txt 243 | echo -e "[kenzo] (https://${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}})\n" >> release.txt 244 | touch release.txt 245 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 246 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 247 | echo "status=success" >> $GITHUB_OUTPUT 248 | 249 | - name: Upload firmware to release 250 | uses: softprops/action-gh-release@v2 251 | if: steps.tag.outputs.status == 'success' && !cancelled() 252 | env: 253 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 254 | with: 255 | files: "${{ env.FIRMWARE }}/*" 256 | name: ${{ env.date2 }} ${{matrix.target}} 257 | tag_name: ${{ env.date }}_${{matrix.target}} 258 | body_path: release.txt 259 | 260 | - name: Delete workflow runs 261 | uses: Mattraks/delete-workflow-runs@main 262 | with: 263 | retain_days: 1 264 | keep_minimum_runs: 0 265 | 266 | - name: Remove old Releases 267 | uses: dev-drprasad/delete-older-releases@master 268 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 269 | with: 270 | keep_latest: 6 271 | delete_tags: true 272 | env: 273 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 274 | 275 | -------------------------------------------------------------------------------- /.github/workflows/ctc_24.10.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Build OpenWrt using GitHub Actions 3 | # Lisence: MIT 4 | # Author: kenzo 5 | #================================================= 6 | 7 | name: openwrt_24.10 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | inputs: 13 | ssh: 14 | description: 'ssh' 15 | required: false 16 | default: 'false' 17 | 18 | env: 19 | UPLOAD_BIN_DIR: false 20 | UPLOAD_FIRMWARE: true 21 | UPLOAD_COWTRANSFER: false 22 | UPLOAD_WETRANSFER: false 23 | UPLOAD_RELEASE: true 24 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 25 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 26 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 27 | DOCKER_ID: ${{ secrets.DOCKER_ID }} 28 | DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }} 29 | TZ: Asia/Shanghai 30 | 31 | jobs: 32 | build: 33 | runs-on: ubuntu-latest 34 | if: github.event.repository.owner.id == github.event.sender.id 35 | 36 | name: Build ${{matrix.target}} 37 | strategy: 38 | fail-fast: false 39 | matrix: 40 | target: [ctc_24.10] 41 | 42 | steps: 43 | - name: Checkout 44 | uses: actions/checkout@main 45 | 46 | - name: Free disk space 47 | uses: coder-xiaomo/free-disk-space@main 48 | with: 49 | tool-cache: false 50 | android: true 51 | dotnet: true 52 | haskell: true 53 | large-packages: true 54 | docker-images: true 55 | swap-storage: true 56 | 57 | - name: Initialization environment 58 | env: 59 | DEBIAN_FRONTEND: noninteractive 60 | run: | 61 | sudo -E apt-get -qq update 62 | sudo -E apt-get -qq install build-essential clang flex bison g++ gawk \ 63 | gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \ 64 | python3-setuptools rsync swig unzip zlib1g-dev file wget \ 65 | llvm python3-pyelftools libpython3-dev aria2 jq qemu-utils ccache rename \ 66 | libelf-dev device-tree-compiler libgmp3-dev libmpc-dev libfuse-dev 67 | sudo -E apt-get -qq autoremove --purge 68 | sudo -E apt-get -qq clean 69 | sudo timedatectl set-timezone "Asia/Shanghai" 70 | 71 | - name: Get current date 72 | id: date 73 | run: | 74 | echo "date=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_ENV 75 | echo "date2=$(date +'%m/%d %Y')" >> $GITHUB_ENV 76 | echo "date3=$(date +'%m.%d')" >> $GITHUB_ENV 77 | echo "DOCKERTAG=${{ secrets.DOCKER_ID }}/openwrt-6p:latest" >> $GITHUB_ENV 78 | VERSION="$(echo "${{github.event.action}}" | grep -Eo " [0-9.]+" | sed -e 's/ //')" || true 79 | [ "$VERSION" ] && echo "VERSION=$VERSION" >> $GITHUB_ENV || echo "VERSION=$(date +'%m.%d')" >> $GITHUB_ENV 80 | 81 | - name: Clone source code 82 | env: 83 | REPO_URL: https://github.com/immortalwrt/immortalwrt 84 | REPO_BRANCH: openwrt-24.10 85 | TZ: Asia/Shanghai 86 | run: | 87 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt 88 | cd openwrt 89 | sed -i '$a src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default 90 | 91 | - name: Free up disk space 92 | env: 93 | DEBIAN_FRONTEND: noninteractive 94 | run: | 95 | sudo mkdir -p -m 777 /mnt/openwrt/dl /mnt/openwrt/bin /mnt/openwrt/staging_dir 96 | ln -sf /mnt/openwrt/dl openwrt/dl 97 | ln -sf /mnt/openwrt/bin openwrt/bin 98 | ln -sf /mnt/openwrt/staging_dir openwrt/staging_dir 99 | 100 | - name: Update feeds 101 | working-directory: ./openwrt 102 | run: | 103 | ./scripts/feeds update -a 104 | 105 | - name: Defconfig ${{matrix.target}} 106 | env: 107 | CONFIG_FILE: '${{matrix.target}}.config' 108 | run: | 109 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 110 | chmod +x ./customize.sh && ./customize.sh 111 | cd openwrt 112 | rm -rf feeds/packages/lang/golang 113 | git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 114 | cp -f feeds/smpackage/.github/diy/default-settings package/emortal/default-settings/files/99-default-settings 115 | rm -rf feeds/packages/net/{alist,adguardhome,brook,gost,mosdns,redsocks*,smartdns,trojan*,v2ray*,xray*} 116 | rm -rf feeds/packages/luci/{luci-app-homeproxy,luci-app-openclash,luci-app-passwall} 117 | rm -rf feeds/smpackage/luci-theme-design && git clone -b js --single-branch https://github.com/kenzok78/luci-theme-design feeds/smpackage/luci-theme-design 118 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/luci/Makefile 119 | patch -p1 < "feeds/smpackage/.github/diy/patches/0004-luci-mod-status-firewall-disable-legacy-firewall-rul.patch" 120 | cp -f feeds/smpackage/.github/diy/banner package/base-files/files/etc/banner 121 | sed -i "s/%D %V, %C/openwrt $(date +'%m.%d') by kenzo/g" package/base-files/files/etc/banner 122 | #cp -Rf feeds/smpackage/.github/diy/.packages/files/* files 123 | ./scripts/feeds update -a && ./scripts/feeds install -a 124 | cp -f feeds/smpackage/.github/diy/${{matrix.target}}.config .config && make defconfig 125 | 126 | - name: Download package 127 | working-directory: ./openwrt 128 | run: | 129 | make download -j$(nproc) 130 | find dl -size -1024c -exec rm -f {} \; 131 | 132 | - name: Cache 133 | uses: klever1988/cachewrtbuild@main 134 | with: 135 | ccache: 'true' 136 | prefix: ${{ github.workspace }}/openwrt 137 | 138 | - name: Check space usage 139 | run: | 140 | shopt -s extglob 141 | cd openwrt 142 | if [[ -f staging_dir/*${{ env.MTARGET }}*/bin ]]; then 143 | rm -rf staging_dir/!(*${{ env.MTARGET }}*|host|hostpkg) build_dir/!(*${{ env.MTARGET }}*|host|hostpkg) 144 | fi 145 | df -hT 146 | 147 | - name: Compile the firmware 148 | working-directory: ./openwrt 149 | run: | 150 | echo -e "$(($(nproc)+1)) thread compile" 151 | make -j$(($(nproc)+1)) || make -j1 V=s 152 | 153 | - name: Upload bin directory 154 | uses: actions/upload-artifact@main 155 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 156 | with: 157 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 158 | path: openwrt/bin 159 | 160 | - name: Organize files 161 | id: organize 162 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 163 | run: | 164 | mkdir firmware 165 | mv -f openwrt/bin/targets/*/*/{*combined*,*sysupgrade*} ./firmware/ 2>/dev/null || true 166 | cp openwrt/.config ./firmware/${{matrix.target}}.config 167 | cp openwrt/build_dir/target-*/linux-*/linux-*/.config ./firmware/${{matrix.target}}_kernel.config 168 | cd firmware 169 | echo "v${{ env.date2 }}" > version.txt 170 | md5=$((md5sum *squashfs-sysupgrade* || md5sum *squashfs-combined-efi*) | awk '{print $1}') 2>/dev/null 171 | echo $md5 >> version.txt 172 | rename -v "s/^immortalwrt/${{ env.VERSION }}-openwrt/" * || true 173 | rename -v "s/friendlyarm_//" *gz 174 | echo $md5 >> version.txt 175 | echo ${{matrix.target}} >> version.txt 176 | rm -rf sha256sums 177 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 178 | 179 | - name: Deploy imagebuilder to server 180 | uses: easingthemes/ssh-deploy@main 181 | with: 182 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 183 | ARGS: "-avzr --exclude=" 184 | SOURCE: firmware/ 185 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 186 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 187 | REMOTE_USER: root 188 | TARGET: "/www/wwwroot/${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}}/" 189 | 190 | - name: Upload firmware directory 191 | uses: actions/upload-artifact@main 192 | if: steps.organize.outputs.status == 'success' && !cancelled() 193 | with: 194 | name: ${{ env.date3 }} _${{matrix.target}} 195 | path: ${{ env.FIRMWARE }} 196 | 197 | - name: Set Up Docker Buildx 198 | uses: docker/setup-buildx-action@master 199 | if: env.DOCKER_ID && env.DOCKER_PASSWD 200 | 201 | - name: Login To DockerHub 202 | uses: docker/login-action@master 203 | if: env.DOCKER_ID && env.DOCKER_PASSWD 204 | with: 205 | username: ${{ secrets.DOCKER_ID }} 206 | password: ${{ secrets.DOCKER_PASSWD }} 207 | 208 | - name: Build and push docker image 209 | uses: docker/build-push-action@master 210 | continue-on-error: true 211 | if: env.DOCKER_ID && env.DOCKER_PASSWD && ! contains(github.event.action, 'noser') 212 | with: 213 | platforms: ${{ env.ARCH }} 214 | file: Dockerfile 215 | context: . 216 | push: true 217 | tags: | 218 | ${{ secrets.DOCKER_ID }}/openwrt-6p:${{matrix.target}} 219 | ${{ env.DOCKERTAG }} 220 | 221 | - name: Upload firmware to cowtransfer 222 | id: cowtransfer 223 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 224 | run: | 225 | curl -fsSL git.io/file-transfer | sh 226 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 227 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 228 | echo "url=$(cat cowtransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 229 | 230 | - name: Upload firmware to WeTransfer 231 | id: wetransfer 232 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 233 | run: | 234 | curl -fsSL git.io/file-transfer | sh 235 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 236 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 237 | echo "url=$(cat wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 238 | 239 | - name: Generate release tag 240 | id: tag 241 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 242 | run: | 243 | echo -e "墙内外加速下载 🎈:\n" >> release.txt 244 | echo -e "[kenzo] (https://${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}})\n" >> release.txt 245 | touch release.txt 246 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 247 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 248 | echo "status=success" >> $GITHUB_OUTPUT 249 | 250 | - name: Upload firmware to release 251 | uses: softprops/action-gh-release@v2 252 | if: steps.tag.outputs.status == 'success' && !cancelled() 253 | env: 254 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 255 | with: 256 | files: "${{ env.FIRMWARE }}/*" 257 | name: ${{ env.date2 }} ${{matrix.target}} 258 | tag_name: ${{ env.date }}_${{matrix.target}} 259 | body_path: release.txt 260 | 261 | - name: Delete workflow runs 262 | uses: Mattraks/delete-workflow-runs@main 263 | with: 264 | retain_days: 1 265 | keep_minimum_runs: 0 266 | 267 | - name: Remove old Releases 268 | uses: dev-drprasad/delete-older-releases@master 269 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 270 | with: 271 | keep_latest: 6 272 | delete_tags: true 273 | env: 274 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 275 | 276 | -------------------------------------------------------------------------------- /.github/workflows/nanopi-r4s.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Build OpenWrt using GitHub Actions 3 | # Lisence: MIT 4 | # Author: kenzo 5 | #================================================= 6 | 7 | name: nanopi-r4s 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | inputs: 13 | ssh: 14 | description: 'ssh' 15 | required: false 16 | default: 'false' 17 | 18 | env: 19 | UPLOAD_BIN_DIR: false 20 | UPLOAD_FIRMWARE: true 21 | UPLOAD_COWTRANSFER: false 22 | UPLOAD_WETRANSFER: false 23 | UPLOAD_RELEASE: true 24 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 25 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 26 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 27 | DOCKER_ID: ${{ secrets.DOCKER_ID }} 28 | DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }} 29 | TZ: Asia/Shanghai 30 | 31 | jobs: 32 | build: 33 | runs-on: ubuntu-latest 34 | if: github.event.repository.owner.id == github.event.sender.id 35 | 36 | name: Build ${{matrix.target}} 37 | strategy: 38 | fail-fast: false 39 | matrix: 40 | target: [nanopi-r4s] 41 | 42 | steps: 43 | - name: Checkout 44 | uses: actions/checkout@main 45 | 46 | - name: Free disk space 47 | uses: coder-xiaomo/free-disk-space@main 48 | with: 49 | tool-cache: false 50 | android: true 51 | dotnet: true 52 | haskell: true 53 | large-packages: true 54 | docker-images: true 55 | swap-storage: true 56 | 57 | - name: Initialization environment 58 | env: 59 | DEBIAN_FRONTEND: noninteractive 60 | run: | 61 | sudo -E apt-get -qq update 62 | sudo -E apt-get -qq install build-essential clang flex bison g++ gawk \ 63 | gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \ 64 | python3-setuptools rsync swig unzip zlib1g-dev file wget \ 65 | llvm python3-pyelftools libpython3-dev aria2 jq qemu-utils ccache rename \ 66 | libelf-dev device-tree-compiler libgmp3-dev libmpc-dev libfuse-dev 67 | sudo -E apt-get -qq autoremove --purge 68 | sudo -E apt-get -qq clean 69 | sudo timedatectl set-timezone "Asia/Shanghai" 70 | 71 | - name: Get current date 72 | id: date 73 | run: | 74 | echo "date=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_ENV 75 | echo "date2=$(date +'%m/%d %Y')" >> $GITHUB_ENV 76 | echo "date3=$(date +'%m.%d')" >> $GITHUB_ENV 77 | echo "DOCKERTAG=${{ secrets.DOCKER_ID }}/openwrt-6p:latest" >> $GITHUB_ENV 78 | VERSION="$(echo "${{github.event.action}}" | grep -Eo " [0-9.]+" | sed -e 's/ //')" || true 79 | [ "$VERSION" ] && echo "VERSION=$VERSION" >> $GITHUB_ENV || echo "VERSION=$(date +'%m.%d')" >> $GITHUB_ENV 80 | 81 | - name: Clone source code 82 | env: 83 | REPO_URL: https://github.com/coolsnowwolf/lede 84 | REPO_BRANCH: master 85 | run: | 86 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt 87 | cd openwrt 88 | sed -i '$a src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default 89 | 90 | - name: Free up disk space 91 | env: 92 | DEBIAN_FRONTEND: noninteractive 93 | run: | 94 | sudo mkdir -p -m 777 /mnt/openwrt/dl /mnt/openwrt/staging_dir /mnt/openwrt/build_dir 95 | ln -sf /mnt/openwrt/dl openwrt/dl 96 | ln -sf /mnt/openwrt/staging_dir openwrt/staging_dir 97 | ln -sf /mnt/openwrt/build_dir openwrt/build_dir 98 | 99 | - name: Update feeds 100 | working-directory: ./openwrt 101 | run: | 102 | ./scripts/feeds update -a 103 | 104 | - name: Defconfig ${{matrix.target}} 105 | env: 106 | CONFIG_FILE: '${{matrix.target}}.config' 107 | run: | 108 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 109 | chmod +x ./customize.sh && ./customize.sh 110 | cd openwrt 111 | rm -rf feeds/packages/lang/golang 112 | git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 113 | rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} 114 | cp -f feeds/smpackage/.github/diy/default-settings package/lean/default-settings/files/zzz-default-settings 115 | cp -f feeds/smpackage/.github/diy/banner package/base-files/files/etc/banner 116 | cp -f feeds/smpackage/.github/diy/index_x86.htm package/lean/autocore/files/x86/index.htm 117 | sed -i "s/%D %V, %C/openwrt $(date +'%m.%d') by kenzo/g" package/base-files/files/etc/banner 118 | sed -i 's/luci-theme-bootstrap/luci-theme-argone/g' feeds/luci/collections/luci/Makefile 119 | ./scripts/feeds update -a 120 | sed -i 's#GO_PKG_TARGET_VARS.*# #g' feeds/packages/utils/v2dat/Makefile 121 | ./scripts/feeds install -a 122 | cp -f feeds/smpackage/.github/diy/${{matrix.target}}.config .config && make defconfig 123 | 124 | - name: Download package 125 | working-directory: ./openwrt 126 | run: | 127 | make download -j$(nproc) 128 | find dl -size -1024c -exec rm -f {} \; 129 | 130 | - name: Cache 131 | uses: klever1988/cachewrtbuild@main 132 | with: 133 | ccache: 'true' 134 | prefix: ${{ github.workspace }}/openwrt 135 | 136 | - name: Compile the firmware 137 | working-directory: ./openwrt 138 | run: | 139 | echo -e "$(($(nproc)+1)) thread compile" 140 | make -j$(($(nproc)+1)) || make -j1 V=s 141 | 142 | - name: Check space usage 143 | if: (!cancelled()) 144 | run: df -hT 145 | 146 | - name: Upload bin directory 147 | uses: actions/upload-artifact@main 148 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 149 | with: 150 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 151 | path: openwrt/bin 152 | 153 | - name: Organize files 154 | id: organize 155 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 156 | run: | 157 | mkdir firmware 158 | mv -f openwrt/bin/targets/*/*/{*combined*,*sysupgrade*} ./firmware/ 2>/dev/null || true 159 | cp openwrt/.config ./firmware/${{matrix.target}}.config 160 | cp openwrt/build_dir/target-*/linux-*/linux-*/.config ./firmware/${{matrix.target}}_kernel.config 161 | cd firmware 162 | echo "v${{ env.date2 }}" > version.txt 163 | md5=$((md5sum *squashfs-sysupgrade* || md5sum *squashfs-combined-efi*) | awk '{print $1}') 2>/dev/null 164 | echo $md5 >> version.txt 165 | rename -v "s/^openwrt/${{ env.VERSION }}-openwrt/" * || true 166 | rename -v "s/friendlyarm_//" *gz || true 167 | echo $md5 >> version.txt 168 | echo ${{matrix.target}} >> version.txt 169 | rm -rf sha256sums 170 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 171 | 172 | - name: Deploy imagebuilder to server 173 | uses: easingthemes/ssh-deploy@main 174 | with: 175 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 176 | ARGS: "-avzr --exclude=" 177 | SOURCE: firmware/ 178 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 179 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 180 | REMOTE_USER: root 181 | TARGET: "/www/wwwroot/${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}}/" 182 | 183 | - name: Upload firmware directory 184 | uses: actions/upload-artifact@main 185 | if: steps.organize.outputs.status == 'success' && !cancelled() 186 | with: 187 | name: ${{ env.date3 }} _NanoPi_R2S 188 | path: ${{ env.FIRMWARE }} 189 | 190 | - name: Set Up Docker Buildx 191 | uses: docker/setup-buildx-action@master 192 | if: env.DOCKER_ID && env.DOCKER_PASSWD 193 | 194 | - name: Login To DockerHub 195 | uses: docker/login-action@master 196 | if: env.DOCKER_ID && env.DOCKER_PASSWD 197 | with: 198 | username: ${{ secrets.DOCKER_ID }} 199 | password: ${{ secrets.DOCKER_PASSWD }} 200 | 201 | - name: Build and push docker image 202 | uses: docker/build-push-action@master 203 | continue-on-error: true 204 | if: env.DOCKER_ID && env.DOCKER_PASSWD && ! contains(github.event.action, 'noser') 205 | with: 206 | platforms: ${{ env.ARCH }} 207 | file: Dockerfile 208 | context: . 209 | push: true 210 | tags: | 211 | ${{ secrets.DOCKER_ID }}/openwrt-6p:${{matrix.target}} 212 | ${{ env.DOCKERTAG }} 213 | 214 | - name: Generate release tag 215 | id: tag 216 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 217 | run: | 218 | echo -e "墙内外加速下载 🎈:\n" >> release.txt 219 | echo -e "[kenzo] (https://${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}})\n" >> release.txt 220 | touch release.txt 221 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 222 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 223 | echo "status=success" >> $GITHUB_OUTPUT 224 | 225 | - name: Upload firmware to cowtransfer 226 | id: cowtransfer 227 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 228 | run: | 229 | curl -fsSL git.io/file-transfer | sh 230 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 231 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 232 | echo "url=$(cat cowtransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 233 | 234 | - name: Upload firmware to WeTransfer 235 | id: wetransfer 236 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 237 | run: | 238 | curl -fsSL git.io/file-transfer | sh 239 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 240 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 241 | echo "url=$(cat wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 242 | 243 | - name: Upload firmware to release 244 | uses: softprops/action-gh-release@v2 245 | if: steps.tag.outputs.status == 'success' && !cancelled() 246 | env: 247 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 248 | with: 249 | files: "${{ env.FIRMWARE }}/*" 250 | name: ${{ env.date2 }} ${{matrix.target}} 251 | tag_name: ${{ env.date }}_${{matrix.target}} 252 | body_path: release.txt 253 | 254 | - name: Delete workflow runs 255 | uses: Mattraks/delete-workflow-runs@main 256 | with: 257 | retain_days: 1 258 | keep_minimum_runs: 0 259 | 260 | - name: Remove old Releases 261 | uses: dev-drprasad/delete-older-releases@master 262 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 263 | with: 264 | keep_latest: 6 265 | delete_tags: true 266 | env: 267 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 268 | -------------------------------------------------------------------------------- /.github/workflows/nanopi-r5s.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Build OpenWrt using GitHub Actions 3 | # Lisence: MIT 4 | # Author: kenzo 5 | #================================================= 6 | 7 | name: nanopi-r5s 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | inputs: 13 | ssh: 14 | description: 'ssh' 15 | required: false 16 | default: 'false' 17 | 18 | env: 19 | UPLOAD_BIN_DIR: false 20 | UPLOAD_FIRMWARE: true 21 | UPLOAD_COWTRANSFER: false 22 | UPLOAD_WETRANSFER: false 23 | UPLOAD_RELEASE: true 24 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 25 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 26 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 27 | DOCKER_ID: ${{ secrets.DOCKER_ID }} 28 | DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }} 29 | TZ: Asia/Shanghai 30 | 31 | jobs: 32 | build: 33 | runs-on: ubuntu-latest 34 | if: github.event.repository.owner.id == github.event.sender.id 35 | 36 | name: Build ${{matrix.target}} 37 | strategy: 38 | fail-fast: false 39 | matrix: 40 | target: [nanopi-r5s] 41 | 42 | steps: 43 | - name: Checkout 44 | uses: actions/checkout@main 45 | 46 | - name: Free disk space 47 | uses: coder-xiaomo/free-disk-space@main 48 | with: 49 | tool-cache: false 50 | android: true 51 | dotnet: true 52 | haskell: true 53 | large-packages: true 54 | docker-images: true 55 | swap-storage: true 56 | 57 | - name: Initialization environment 58 | env: 59 | DEBIAN_FRONTEND: noninteractive 60 | run: | 61 | sudo -E apt-get -qq update 62 | sudo -E apt-get -qq install build-essential clang flex bison g++ gawk \ 63 | gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \ 64 | python3-setuptools rsync swig unzip zlib1g-dev file wget \ 65 | llvm python3-pyelftools libpython3-dev aria2 jq qemu-utils ccache rename \ 66 | libelf-dev device-tree-compiler libgmp3-dev libmpc-dev libfuse-dev 67 | sudo -E apt-get -qq autoremove --purge 68 | sudo -E apt-get -qq clean 69 | sudo timedatectl set-timezone "Asia/Shanghai" 70 | 71 | - name: Get current date 72 | id: date 73 | run: | 74 | echo "date=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_ENV 75 | echo "date2=$(date +'%m/%d %Y')" >> $GITHUB_ENV 76 | echo "date3=$(date +'%m.%d')" >> $GITHUB_ENV 77 | echo "DOCKERTAG=${{ secrets.DOCKER_ID }}/openwrt-6p:latest" >> $GITHUB_ENV 78 | VERSION="$(echo "${{github.event.action}}" | grep -Eo " [0-9.]+" | sed -e 's/ //')" || true 79 | [ "$VERSION" ] && echo "VERSION=$VERSION" >> $GITHUB_ENV || echo "VERSION=$(date +'%m.%d')" >> $GITHUB_ENV 80 | 81 | - name: Clone source code 82 | env: 83 | REPO_URL: https://github.com/coolsnowwolf/lede 84 | REPO_BRANCH: master 85 | run: | 86 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt 87 | cd openwrt 88 | sed -i '$a src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default 89 | 90 | - name: Free up disk space 91 | env: 92 | DEBIAN_FRONTEND: noninteractive 93 | run: | 94 | sudo mkdir -p -m 777 /mnt/openwrt/dl /mnt/openwrt/staging_dir /mnt/openwrt/build_dir 95 | ln -sf /mnt/openwrt/dl openwrt/dl 96 | ln -sf /mnt/openwrt/staging_dir openwrt/staging_dir 97 | ln -sf /mnt/openwrt/build_dir openwrt/build_dir 98 | 99 | - name: Update feeds 100 | working-directory: ./openwrt 101 | run: | 102 | ./scripts/feeds update -a 103 | 104 | - name: Defconfig ${{matrix.target}} 105 | env: 106 | CONFIG_FILE: '${{matrix.target}}.config' 107 | run: | 108 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 109 | chmod +x ./customize.sh && ./customize.sh 110 | cd openwrt 111 | rm -rf feeds/packages/lang/golang 112 | git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 113 | rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} 114 | cp -f feeds/smpackage/.github/diy/default-settings package/lean/default-settings/files/zzz-default-settings 115 | cp -f feeds/smpackage/.github/diy/banner package/base-files/files/etc/banner 116 | cp -f feeds/smpackage/.github/diy/index_x86.htm package/lean/autocore/files/x86/index.htm 117 | sed -i "s/%D %V, %C/openwrt $(date +'%m.%d') by kenzo/g" package/base-files/files/etc/banner 118 | sed -i 's/luci-theme-bootstrap/luci-theme-argone/g' feeds/luci/collections/luci/Makefile 119 | ./scripts/feeds update -a 120 | sed -i 's#GO_PKG_TARGET_VARS.*# #g' feeds/packages/utils/v2dat/Makefile 121 | ./scripts/feeds install -a 122 | cp -f feeds/smpackage/.github/diy/${{matrix.target}}.config .config && make defconfig 123 | 124 | - name: Download package 125 | working-directory: ./openwrt 126 | run: | 127 | make download -j$(nproc) 128 | find dl -size -1024c -exec rm -f {} \; 129 | 130 | - name: Cache 131 | uses: klever1988/cachewrtbuild@main 132 | with: 133 | ccache: 'true' 134 | prefix: ${{ github.workspace }}/openwrt 135 | 136 | - name: Compile the firmware 137 | working-directory: ./openwrt 138 | run: | 139 | echo -e "$(($(nproc)+1)) thread compile" 140 | make -j$(($(nproc)+1)) || make -j1 V=s 141 | 142 | - name: Check space usage 143 | if: (!cancelled()) 144 | run: df -hT 145 | 146 | - name: Upload bin directory 147 | uses: actions/upload-artifact@main 148 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 149 | with: 150 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 151 | path: openwrt/bin 152 | 153 | - name: Organize files 154 | id: organize 155 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 156 | run: | 157 | mkdir firmware 158 | mv -f openwrt/bin/targets/*/*/{*combined*,*sysupgrade*} ./firmware/ 2>/dev/null || true 159 | cp openwrt/.config ./firmware/${{matrix.target}}.config 160 | cp openwrt/build_dir/target-*/linux-*/linux-*/.config ./firmware/${{matrix.target}}_kernel.config 161 | cd firmware 162 | echo "v${{ env.date2 }}" > version.txt 163 | md5=$((md5sum *squashfs-sysupgrade* || md5sum *squashfs-combined-efi*) | awk '{print $1}') 2>/dev/null 164 | echo $md5 >> version.txt 165 | rename -v "s/^openwrt/${{ env.VERSION }}-openwrt/" * || true 166 | rename -v "s/friendlyarm_//" *gz || true 167 | echo $md5 >> version.txt 168 | echo ${{matrix.target}} >> version.txt 169 | rm -rf sha256sums 170 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 171 | 172 | - name: Deploy imagebuilder to server 173 | uses: easingthemes/ssh-deploy@main 174 | with: 175 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 176 | ARGS: "-avzr --exclude=" 177 | SOURCE: firmware/ 178 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 179 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 180 | REMOTE_USER: root 181 | TARGET: "/www/wwwroot/${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}}/" 182 | 183 | - name: Upload firmware directory 184 | uses: actions/upload-artifact@main 185 | if: steps.organize.outputs.status == 'success' && !cancelled() 186 | with: 187 | name: ${{ env.date3 }}_${{matrix.target}} 188 | path: ${{ env.FIRMWARE }} 189 | 190 | - name: Set Up Docker Build 191 | uses: docker/setup-buildx-action@master 192 | if: env.DOCKER_ID && env.DOCKER_PASSWD 193 | 194 | - name: Login To DockerHub 195 | uses: docker/login-action@master 196 | if: env.DOCKER_ID && env.DOCKER_PASSWD 197 | with: 198 | username: ${{ secrets.DOCKER_ID }} 199 | password: ${{ secrets.DOCKER_PASSWD }} 200 | 201 | - name: Build and push docker image 202 | uses: docker/build-push-action@master 203 | continue-on-error: true 204 | if: env.DOCKER_ID && env.DOCKER_PASSWD && ! contains(github.event.action, 'noser') && github.event.client_payload.target == 'x86_64' 205 | with: 206 | platforms: ${{ env.ARCH }} 207 | file: Dockerfile 208 | context: . 209 | push: true 210 | tags: | 211 | ${{ secrets.DOCKER_ID }}/openwrt-6p:${{matrix.target}} 212 | ${{ env.DOCKERTAG }} 213 | 214 | - name: Upload firmware to cowtransfer 215 | id: cowtransfer 216 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 217 | run: | 218 | curl -fsSL git.io/file-transfer | sh 219 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 220 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 221 | echo "url=$(cat cowtransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 222 | 223 | - name: Upload firmware to WeTransfer 224 | id: wetransfer 225 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 226 | run: | 227 | curl -fsSL git.io/file-transfer | sh 228 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 229 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 230 | echo "url=$(cat wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 231 | 232 | - name: Create release 233 | id: tag 234 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 235 | run: | 236 | echo -e "墙内外加速下载 🎈:\n" >> release.txt 237 | echo -e "[kenzo] (https://${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}})\n" >> release.txt 238 | touch release.txt 239 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 240 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 241 | echo "status=success" >> $GITHUB_OUTPUT 242 | 243 | - name: Upload firmware to release 244 | uses: softprops/action-gh-release@v2 245 | if: steps.tag.outputs.status == 'success' && !cancelled() 246 | env: 247 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 248 | with: 249 | files: "${{ env.FIRMWARE }}/*" 250 | name: ${{ env.date2 }} ${{matrix.target}} 251 | tag_name: ${{ env.date }}_${{matrix.target}} 252 | body_path: release.txt 253 | 254 | - name: Delete workflow runs 255 | uses: Mattraks/delete-workflow-runs@main 256 | with: 257 | retain_days: 1 258 | keep_minimum_runs: 0 259 | 260 | - name: Remove old Releases 261 | uses: dev-drprasad/delete-older-releases@master 262 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 263 | with: 264 | keep_latest: 6 265 | delete_tags: true 266 | env: 267 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 268 | -------------------------------------------------------------------------------- /.github/workflows/nanopi-r6s.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Build OpenWrt using GitHub Actions 3 | # Lisence: MIT 4 | # Author: kenzo 5 | #================================================= 6 | 7 | name: nanopi-r6s 8 | 9 | on: 10 | repository_dispatch: 11 | workflow_dispatch: 12 | inputs: 13 | ssh: 14 | description: 'ssh' 15 | required: false 16 | default: 'false' 17 | 18 | env: 19 | UPLOAD_BIN_DIR: false 20 | UPLOAD_FIRMWARE: true 21 | UPLOAD_COWTRANSFER: false 22 | UPLOAD_WETRANSFER: false 23 | UPLOAD_RELEASE: true 24 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 25 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 26 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 27 | DOCKER_ID: ${{ secrets.DOCKER_ID }} 28 | DOCKER_PASSWD: ${{ secrets.DOCKER_PASSWD }} 29 | TZ: Asia/Shanghai 30 | 31 | jobs: 32 | build: 33 | runs-on: ubuntu-latest 34 | if: github.event.repository.owner.id == github.event.sender.id 35 | 36 | name: Build ${{matrix.target}} 37 | strategy: 38 | fail-fast: false 39 | matrix: 40 | target: [nanopi-r6s] 41 | 42 | steps: 43 | - name: Checkout 44 | uses: actions/checkout@main 45 | 46 | - name: Free disk space 47 | uses: coder-xiaomo/free-disk-space@main 48 | with: 49 | tool-cache: false 50 | android: true 51 | dotnet: true 52 | haskell: true 53 | large-packages: true 54 | docker-images: true 55 | swap-storage: true 56 | 57 | - name: Initialization environment 58 | env: 59 | DEBIAN_FRONTEND: noninteractive 60 | run: | 61 | sudo -E apt-get -qq update 62 | sudo -E apt-get -qq install build-essential clang flex bison g++ gawk \ 63 | gcc-multilib g++-multilib gettext git libncurses5-dev libssl-dev \ 64 | python3-setuptools rsync swig unzip zlib1g-dev file wget \ 65 | llvm python3-pyelftools libpython3-dev aria2 jq qemu-utils ccache rename \ 66 | libelf-dev device-tree-compiler libgmp3-dev libmpc-dev libfuse-dev 67 | sudo -E apt-get -qq autoremove --purge 68 | sudo -E apt-get -qq clean 69 | sudo timedatectl set-timezone "Asia/Shanghai" 70 | 71 | - name: Get current date 72 | id: date 73 | run: | 74 | echo "date=$(date +'%Y.%m.%d-%H%M')" >> $GITHUB_ENV 75 | echo "date2=$(date +'%m/%d %Y')" >> $GITHUB_ENV 76 | echo "date3=$(date +'%m.%d')" >> $GITHUB_ENV 77 | echo "DOCKERTAG=${{ secrets.DOCKER_ID }}/openwrt-6p:latest" >> $GITHUB_ENV 78 | VERSION="$(echo "${{github.event.action}}" | grep -Eo " [0-9.]+" | sed -e 's/ //')" || true 79 | [ "$VERSION" ] && echo "VERSION=$VERSION" >> $GITHUB_ENV || echo "VERSION=$(date +'%m.%d')" >> $GITHUB_ENV 80 | 81 | - name: Clone source code 82 | env: 83 | REPO_URL: https://github.com/coolsnowwolf/lede 84 | REPO_BRANCH: master 85 | run: | 86 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt 87 | cd openwrt 88 | sed -i '$a src-git smpackage https://github.com/kenzok8/small-package' feeds.conf.default 89 | 90 | - name: Free up disk space 91 | env: 92 | DEBIAN_FRONTEND: noninteractive 93 | run: | 94 | sudo mkdir -p -m 777 /mnt/openwrt/dl /mnt/openwrt/staging_dir /mnt/openwrt/build_dir 95 | ln -sf /mnt/openwrt/dl openwrt/dl 96 | ln -sf /mnt/openwrt/staging_dir openwrt/staging_dir 97 | ln -sf /mnt/openwrt/build_dir openwrt/build_dir 98 | 99 | - name: Update feeds 100 | working-directory: ./openwrt 101 | run: | 102 | ./scripts/feeds update -a 103 | 104 | - name: Defconfig ${{matrix.target}} 105 | env: 106 | CONFIG_FILE: '${{matrix.target}}.config' 107 | run: | 108 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 109 | chmod +x ./customize.sh && ./customize.sh 110 | cd openwrt 111 | rm -rf feeds/packages/lang/golang 112 | git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 113 | rm -rf feeds/smpackage/{base-files,dnsmasq,firewall*,fullconenat,libnftnl,nftables,ppp,opkg,ucl,upx,vsftpd-alt,miniupnpd-iptables,wireless-regdb} 114 | cp -f feeds/smpackage/.github/diy/default-settings package/lean/default-settings/files/zzz-default-settings 115 | cp -f feeds/smpackage/.github/diy/banner package/base-files/files/etc/banner 116 | cp -f feeds/smpackage/.github/diy/index_x86.htm package/lean/autocore/files/x86/index.htm 117 | sed -i "s/%D %V, %C/openwrt $(date +'%m.%d') by kenzo/g" package/base-files/files/etc/banner 118 | sed -i 's/luci-theme-bootstrap/luci-theme-argone/g' feeds/luci/collections/luci/Makefile 119 | ./scripts/feeds update -a 120 | sed -i 's#GO_PKG_TARGET_VARS.*# #g' feeds/packages/utils/v2dat/Makefile 121 | ./scripts/feeds install -a 122 | cp -f feeds/smpackage/.github/diy/${{matrix.target}}.config .config && make defconfig 123 | 124 | - name: Download package 125 | working-directory: ./openwrt 126 | run: | 127 | make download -j$(nproc) 128 | find dl -size -1024c -exec rm -f {} \; 129 | 130 | - name: Cache 131 | uses: klever1988/cachewrtbuild@main 132 | with: 133 | ccache: 'true' 134 | prefix: ${{ github.workspace }}/openwrt 135 | 136 | - name: Compile the firmware 137 | working-directory: ./openwrt 138 | run: | 139 | echo -e "$(($(nproc)+1)) thread compile" 140 | make -j$(($(nproc)+1)) || make -j1 V=s 141 | 142 | - name: Check space usage 143 | if: (!cancelled()) 144 | run: df -hT 145 | 146 | - name: Upload bin directory 147 | uses: actions/upload-artifact@main 148 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' 149 | with: 150 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 151 | path: openwrt/bin 152 | 153 | - name: Organize files 154 | id: organize 155 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 156 | run: | 157 | mkdir firmware 158 | mv -f openwrt/bin/targets/*/*/{*combined*,*sysupgrade*} ./firmware/ 2>/dev/null || true 159 | cp openwrt/.config ./firmware/${{matrix.target}}.config 160 | cp openwrt/build_dir/target-*/linux-*/linux-*/.config ./firmware/${{matrix.target}}_kernel.config 161 | cd firmware 162 | echo "v${{ env.date2 }}" > version.txt 163 | md5=$((md5sum *squashfs-sysupgrade* || md5sum *squashfs-combined-efi*) | awk '{print $1}') 2>/dev/null 164 | echo $md5 >> version.txt 165 | rename -v "s/^openwrt/${{ env.VERSION }}-openwrt/" * || true 166 | rename -v "s/friendlyarm_//" *gz || true 167 | echo $md5 >> version.txt 168 | echo ${{matrix.target}} >> version.txt 169 | rm -rf sha256sums 170 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 171 | 172 | - name: Deploy imagebuilder to server 173 | uses: easingthemes/ssh-deploy@main 174 | with: 175 | SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} 176 | ARGS: "-avzr --exclude=" 177 | SOURCE: firmware/ 178 | REMOTE_HOST: ${{ secrets.REMOTE_HOST }} 179 | REMOTE_PORT: ${{ secrets.REMOTE_PORT }} 180 | REMOTE_USER: root 181 | TARGET: "/www/wwwroot/${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}}/" 182 | 183 | - name: Upload firmware directory 184 | uses: actions/upload-artifact@main 185 | if: steps.organize.outputs.status == 'success' && !cancelled() 186 | with: 187 | name: ${{ env.date3 }}_${{matrix.target}} 188 | path: ${{ env.FIRMWARE }} 189 | 190 | - name: Set Up Docker Build 191 | uses: docker/setup-buildx-action@master 192 | if: env.DOCKER_ID && env.DOCKER_PASSWD 193 | 194 | - name: Login To DockerHub 195 | uses: docker/login-action@master 196 | if: env.DOCKER_ID && env.DOCKER_PASSWD 197 | with: 198 | username: ${{ secrets.DOCKER_ID }} 199 | password: ${{ secrets.DOCKER_PASSWD }} 200 | 201 | - name: Build and push docker image 202 | uses: docker/build-push-action@master 203 | continue-on-error: true 204 | if: env.DOCKER_ID && env.DOCKER_PASSWD && ! contains(github.event.action, 'noser') && github.event.client_payload.target == 'x86_64' 205 | with: 206 | platforms: ${{ env.ARCH }} 207 | file: Dockerfile 208 | context: . 209 | push: true 210 | tags: | 211 | ${{ secrets.DOCKER_ID }}/openwrt-6p:${{matrix.target}} 212 | ${{ env.DOCKERTAG }} 213 | 214 | - name: Upload firmware to cowtransfer 215 | id: cowtransfer 216 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 217 | run: | 218 | curl -fsSL git.io/file-transfer | sh 219 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 220 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 221 | echo "url=$(cat cowtransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 222 | 223 | - name: Upload firmware to WeTransfer 224 | id: wetransfer 225 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 226 | run: | 227 | curl -fsSL git.io/file-transfer | sh 228 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 229 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 230 | echo "url=$(cat wetransfer.log | grep https | cut -f3 -d" ")" >> $GITHUB_OUTPUT 231 | 232 | - name: Create release 233 | id: tag 234 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 235 | run: | 236 | echo -e "ǽ����������� ??:\n" >> release.txt 237 | echo -e "[kenzo] (https://${{ secrets.REMOTE_HOST }}/op/firmware/${{matrix.target}})\n" >> release.txt 238 | touch release.txt 239 | [ $UPLOAD_COWTRANSFER = true ] && echo "?? [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 240 | [ $UPLOAD_WETRANSFER = true ] && echo "?? [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 241 | echo "status=success" >> $GITHUB_OUTPUT 242 | 243 | - name: Upload firmware to release 244 | uses: softprops/action-gh-release@v2 245 | if: steps.tag.outputs.status == 'success' && !cancelled() 246 | env: 247 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 248 | with: 249 | files: "${{ env.FIRMWARE }}/*" 250 | name: ${{ env.date2 }} ${{matrix.target}} 251 | tag_name: ${{ env.date }}_${{matrix.target}} 252 | body_path: release.txt 253 | 254 | - name: Delete workflow runs 255 | uses: Mattraks/delete-workflow-runs@main 256 | with: 257 | retain_days: 1 258 | keep_minimum_runs: 0 259 | 260 | - name: Remove old Releases 261 | uses: dev-drprasad/delete-older-releases@master 262 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 263 | with: 264 | keep_latest: 6 265 | delete_tags: true 266 | env: 267 | GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }} 268 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM scratch 2 | 3 | MAINTAINER kenzok8 "https://github.com/kenzok8/openwrt_Build" 4 | 5 | ADD openwrt/bin/targets/*/*/*rootfs*.tar.gz / 6 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #### AutoBuild-OpenWrt 2 | [1]: https://img.shields.io/badge/license-GPLV2-brightgreen.svg 3 | [2]: /LICENSE 4 | [3]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg 5 | [4]: https://github.com/kenzok8/openwrt_Build/pulls 6 | [5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg 7 | [6]: https://github.com/kenzok8/openwrt_Build/issues/new 8 | [7]: https://img.shields.io/github/v/release/hyird/Action-Openwrt 9 | [8]: https://github.com/kenzok8/openwrt_Build/releases 10 | [10]: https://img.shields.io/badge/Contact-telegram-blue 11 | [11]: https://t.me/joinchat/JjxmyRZZXJWb74I-sCrryA 12 | [12]: https://github.com/kenzok8/openwrt_Build/actions/workflows/Lean.yml/badge.svg 13 | [13]: https://github.com/kenzok8/openwrt_Build/actions 14 | 15 | [![license][1]][2] 16 | [![GitHub Stars](https://img.shields.io/github/stars/kenzok8/openwrt_Build.svg?style=flat-square&label=Stars)](https://github.com/kenzok8/openwrt_Build/stargazers) 17 | [![GitHub Forks](https://img.shields.io/github/forks/kenzok8/openwrt_Build.svg?style=flat-square&label=Forks)](https://github.com/kenzok8/openwrt_Build) 18 | [![PRs Welcome][3]][4] 19 | [![Issue Welcome][5]][6] 20 | [![AutoBuild][12]][13] 21 | 22 | Telegram 23 | 24 | 25 | 26 | 27 | ##### [openwrt固件与插件下载](https://op.dllkids.xyz/op/firmware/) 28 | 29 | ##### [docker镜像下载](https://hub.docker.com/r/kenzok8/openwrt-6p/tags) 30 | 31 | #### 源码来源: 32 | [![esir](https://img.shields.io/badge/AutoBuild-esir-red.svg?style=flat&logo=appveyor)](https://github.com/esirplayground/AutoBuild-OpenWrt) 33 | [![Lienol](https://img.shields.io/badge/passwall-openwrt-blueviolet.svg?style=flat&logo=appveyor)](https://github.com/xiaorouji/openwrt-passwall) 34 | [![immortalwrt](https://img.shields.io/badge/immortalwrt-openwrt-orange.svg?style=flat&logo=appveyor)](https://github.com/immortalwrt/immortalwrt) 35 | [![Lean](https://img.shields.io/badge/package-Lean-blueviolet.svg?style=flat&logo=appveyor)](https://github.com/coolsnowwolf/lede) 36 | [![P3TERX](https://img.shields.io/badge/Actions-P3TERX-success.svg?style=flat&logo=appveyor)](https://github.com/P3TERX/Actions-OpenWrt) 37 | 38 | ##### 固件发布: 39 | 40 | [![GitHub release (latest by date)](https://img.shields.io/github/v/release/kenzok8/openwrt_Build?style=for-the-badge&label=固件下载)](https://github.com/kenzok8/openwrt_Build/releases/latest) 41 | 42 | 43 | ##### 固件下载链接 44 | 45 | - [Lienol_24.10固件地址](https://op.dllkids.xyz/op/firmware/Lienol/) 46 | - [Lean固件地址](https://op.dllkids.xyz/op/firmware/Lean/) 47 | - [immortalwrt-24.10固件](https://op.dllkids.xyz/op/firmware/ctc_24.10/) 48 | - [immortalwrt-18.06固件](https://op.dllkids.xyz/op/firmware/ctc_18.06/) 49 | - [nanopi-r5s固件下载](https://op.dllkids.xyz/op/firmware/nanopi-r5s/) 50 | - [nanopi-r6s固件下载](https://op.dllkids.xyz/op/firmware/nanopi-r6s/) 51 | 52 | ### 默认插件包含: 53 | 54 | + Mosdns 55 | + openclash 56 | + SSR Plus 57 | + homeproxy 58 | + mihomo 59 | + 动态DDNS 60 | + UPNP 自动端口转发 61 | + 默认多个主题 62 | + 默认管理 IP: 192.168.1.251, 用户名 root,密码 password 63 | 64 | * 修改默认ip 65 | 66 | ```bash 67 | sed -i 's/192.168.1.1/192.168.3.1/g' package/base-files/files/bin/config_generate 68 | ``` 69 | * 替换终端为bash 70 | ```bash 71 | sed -i 's/\/bin\/ash/\/bin\/bash/' package/base-files/files/etc/passwd 72 | ``` 73 | 74 | * 添加新的主题 75 | ```bash 76 | git clone https://github.com/kenzok8/luci-theme-ifit.git package/lean/luci-theme-ifit 77 | ``` 78 | * 添加常用软件包 79 | ```bash 80 | git clone https://github.com/kenzok8/openwrt-packages.git package/openwrt-packages 81 | ``` 82 | * 删除默认密码 83 | ```bash 84 | sed -i "/CYXluq4wUazHjmCDBCqXF/d" package/lean/default-settings/files/zzz-default-settings 85 | ``` 86 | 87 | * 取消bootstrap为默认主题 88 | ```bash 89 | sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/luci/Makefile 90 | ``` 91 | -------------------------------------------------------------------------------- /customize.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #=============================================== 3 | # Modify default IP 4 | sed -i 's/192.168.1.1/192.168.1.251/g' openwrt/package/base-files/files/bin/config_generate 5 | 6 | # Modify default theme 7 | #sed -i 's/luci-theme-bootstrap/luci-theme-argon/g' feeds/luci/collections/luci/Makefile 8 | 9 | # Modify hostname 10 | #sed -i 's/OpenWrt/kenzo/g' openwrt/package/base-files/files/bin/config_generate 11 | 12 | #2. Custom settings 13 | #sed -i 's?zstd$?zstd ucl upx\n$(curdir)/upx/compile := $(curdir)/ucl/compile?g' tools/Makefile 14 | #sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite/' package/Makefile 15 | #sed -i 's/root:.*/root:$1$tTPCBw1t$ldzfp37h5lSpO9VXk4uUE\/:18336:0:99999:7:::/g' package/base-files/files/etc/shadow 16 | --------------------------------------------------------------------------------