├── .github └── workflows │ ├── build-minimal.yml │ ├── build-release.yml │ ├── build-snapshots.yml │ └── openwrt-core.yml └── README.md /.github/workflows/build-minimal.yml: -------------------------------------------------------------------------------- 1 | name: Build minimal 2 | 3 | on: 4 | workflow_dispatch: 5 | repository_dispatch: 6 | types: [minimal] 7 | 8 | jobs: 9 | build: 10 | name: Build ${{ matrix.model }}-${{ matrix.tag.version }} 11 | runs-on: ubuntu-24.04 12 | defaults: 13 | run: 14 | shell: bash 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | model: 19 | - nanopi-r4s 20 | - nanopi-r5s 21 | - x86_64 22 | - netgear_r8500 23 | tag: 24 | - type: rc2 25 | version: openwrt-24.10 26 | 27 | steps: 28 | - name: Setup variables 29 | run: | 30 | sudo timedatectl set-timezone 'Asia/Shanghai' 31 | git config --global user.name 'actions' 32 | git config --global user.email 'action@github.com' 33 | echo build_dir="/builder" >> "$GITHUB_ENV" 34 | 35 | - name: Show system 36 | run: | 37 | echo -e "\n\e[1;32mCPU:\e[0m" 38 | echo "$(grep 'model name' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}') ($(grep 'cpu MHz' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}')MHz) x $(grep processor /proc/cpuinfo | wc -l)" 39 | echo -e "\n\e[1;32mMemory:\e[0m" 40 | free -h 41 | echo -e "\n\e[1;32mStorage:\e[0m" 42 | df -Th / /mnt 43 | echo -e "\n\e[1;32mSystem:\e[0m" 44 | lsb_release -a 45 | echo -e "\n\e[1;32mKernel:\e[0m" 46 | uname -a 47 | echo 48 | 49 | - name: Free disk space 50 | uses: sbwml/actions@free-disk 51 | with: 52 | build-mount-path: /builder 53 | 54 | - name: Build System Setup 55 | uses: sbwml/actions@openwrt-build-setup 56 | 57 | - name: Install LLVM 58 | uses: sbwml/actions@install-llvm 59 | 60 | - name: Restore Cached 61 | uses: actions/cache/restore@v4 62 | with: 63 | path: /builder/.ccache 64 | key: ${{ matrix.tag.version }}-${{ matrix.model }} 65 | 66 | - name: Compile OpenWrt 67 | id: compile 68 | continue-on-error: true 69 | working-directory: /builder 70 | env: 71 | git_name: private 72 | git_password: ${{ secrets.ftp_password }} 73 | run: | 74 | [ "${{ matrix.model }}" != "netgear_r8500" ] && export KERNEL_CLANG_LTO=y 75 | export BUILD_FAST=y ENABLE_CCACHE=y ENABLE_OTA=y ENABLE_BPF=y ENABLE_LTO=y ENABLE_LRNG=y MINIMAL_BUILD=y USE_GCC15=y ENABLE_MOLD=y 76 | bash <(curl -sS ${{ secrets.script_url_general }}) ${{ matrix.tag.type }} ${{ matrix.model }} 77 | cd openwrt 78 | tags=$(git describe --abbrev=0 --tags) 79 | echo "latest_release=$tags" >>$GITHUB_ENV 80 | 81 | - name: Extensive logs after a failed compilation 82 | if: steps.compile.outcome == 'failure' 83 | working-directory: /builder 84 | run: | 85 | cd openwrt 86 | make V=s IGNORE_ERRORS="n m" 87 | 88 | - name: Prepare Firmware Files 89 | working-directory: /builder 90 | run: | 91 | mkdir -p rom info 92 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 93 | cp -a openwrt/bin/targets/rockchip/*/*.img.gz rom/ 94 | cp -a openwrt/bin/targets/rockchip/*/*-r4s.manifest info/manifest.txt 95 | cp -a openwrt/bin/targets/rockchip/*/config.buildinfo info/config.buildinfo 96 | cd rom && sha256sum * > ../info/sha256sums.txt 97 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 98 | cp -a openwrt/bin/targets/rockchip/*/*.img.gz rom/ 99 | cp -a openwrt/bin/targets/rockchip/*/*.manifest info/manifest.txt 100 | cp -a openwrt/bin/targets/rockchip/*/config.buildinfo info/config.buildinfo 101 | cd rom && sha256sum * > ../info/sha256sums.txt 102 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 103 | cp -a openwrt/bin/targets/x86/*/*-ext4-combined-efi.img.gz rom/ 104 | cp -a openwrt/bin/targets/x86/*/*-squashfs-combined-efi.img.gz rom/ 105 | cp -a openwrt/bin/targets/x86/*/*-generic-rootfs.tar.gz rom/ 106 | cp -a openwrt/bin/targets/x86/*/*-x86-64-generic.manifest info/manifest.txt 107 | cp -a openwrt/bin/targets/x86/*/config.buildinfo info/config.buildinfo 108 | cd rom && sha256sum * > ../info/sha256sums.txt 109 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 110 | cp -a openwrt/bin/targets/bcm53xx/generic/*-bcm53xx-generic-netgear_r8500-squashfs.chk rom/ 111 | cp -a openwrt/bin/targets/bcm53xx/generic/*.manifest info/manifest.txt 112 | cp -a openwrt/bin/targets/bcm53xx/generic/config.buildinfo info/config.buildinfo 113 | cd rom && sha256sum * > ../info/sha256sums.txt 114 | fi 115 | cd .. 116 | tar zcf rom/buildinfo_${{ matrix.model }}.tar.gz info 117 | 118 | - name: Install aliyunpan & login 119 | working-directory: /builder 120 | timeout-minutes: 1 121 | run: | 122 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 123 | device_id=${{ secrets.device_id_r4s_minimal }} 124 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 125 | device_id=${{ secrets.device_id_r5s_minimal }} 126 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 127 | device_id=${{ secrets.device_id_x86_minimal }} 128 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 129 | device_id=${{ secrets.device_id_netgear_minimal }} 130 | fi 131 | sudo wget -q ${{ secrets.aliyunpan_go }} -O /bin/aliyunpan 132 | sudo chmod 0755 /bin/aliyunpan 133 | sudo sh -c 'echo "${{ secrets.aliyunpan_us_node }} api.alipan.com auth.alipan.com www.alipan.com" >> /etc/hosts' 134 | export ALIYUNPAN_CONFIG_DIR="$(pwd)/.aliyunpan" 135 | aliyun_token=`curl -s ${{ secrets.aliyun_token }} | openssl enc -aes-256-cfb -pbkdf2 -a -d -k ${{ secrets.token_dec }}` 136 | aliyunpan config set -device_id=$device_id >/dev/null 2>&1 137 | echo 138 | echo $aliyun_token | aliyunpan login 139 | 140 | - name: Upload artifacts 141 | uses: actions/upload-artifact@v4 142 | with: 143 | name: ${{ matrix.model }}-${{ matrix.tag.version }} 144 | path: ${{ env.build_dir }}/rom/*.* 145 | 146 | - name: Upload Firmware - Minimal 147 | working-directory: /builder 148 | timeout-minutes: 45 149 | run: | 150 | export ALIYUNPAN_CONFIG_DIR="$(pwd)/.aliyunpan" 151 | version=$(cat openwrt/version.txt) 152 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 153 | aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/nanopi-r4s/minimal/${{ matrix.tag.version }}/$version/ 154 | aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/nanopi-r4s/minimal/${{ matrix.tag.version }}/$version/ 155 | aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/nanopi-r4s/minimal/${{ matrix.tag.version }}/$version/ 156 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r4s-ext4-sysupgrade.img.gz openwrt/nanopi-r4s/minimal/${{ matrix.tag.version }}/$version/ 157 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r4s-squashfs-sysupgrade.img.gz openwrt/nanopi-r4s/minimal/${{ matrix.tag.version }}/$version/ 158 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 159 | aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/nanopi-r5s/minimal/${{ matrix.tag.version }}/$version/ 160 | aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/nanopi-r5s/minimal/${{ matrix.tag.version }}/$version/ 161 | aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/nanopi-r5s/minimal/${{ matrix.tag.version }}/$version/ 162 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5c-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/minimal/${{ matrix.tag.version }}/$version/ 163 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5c-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/minimal/${{ matrix.tag.version }}/$version/ 164 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5s-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/minimal/${{ matrix.tag.version }}/$version/ 165 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5s-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/minimal/${{ matrix.tag.version }}/$version/ 166 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 167 | aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/x86_64/minimal/${{ matrix.tag.version }}/$version/ 168 | aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/x86_64/minimal/${{ matrix.tag.version }}/$version/ 169 | aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/x86_64/minimal/${{ matrix.tag.version }}/$version/ 170 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-generic-rootfs.tar.gz openwrt/x86_64/minimal/${{ matrix.tag.version }}/$version/ 171 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-ext4-combined-efi.img.gz openwrt/x86_64/minimal/${{ matrix.tag.version }}/$version/ 172 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-squashfs-combined-efi.img.gz openwrt/x86_64/minimal/${{ matrix.tag.version }}/$version/ 173 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 174 | aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/netgear-r8500/minimal/${{ matrix.tag.version }}/$version/ 175 | aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/netgear-r8500/minimal/${{ matrix.tag.version }}/$version/ 176 | aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/netgear-r8500/minimal/${{ matrix.tag.version }}/$version/ 177 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*.chk openwrt/netgear-r8500/minimal/${{ matrix.tag.version }}/$version/ 178 | fi 179 | aliyunpan recycle delete -all 180 | echo y | aliyunpan logout 181 | 182 | - name: Release OTA 183 | uses: SamKirkland/FTP-Deploy-Action@v4.3.5 184 | with: 185 | username: openwrt 186 | server: ${{ secrets.ftp_address }} 187 | password: ${{ secrets.ftp_password }} 188 | server-dir: minimal/${{ matrix.model }}/ 189 | local-dir: ${{ env.build_dir }}/openwrt/ota/ 190 | dangerous-clean-slate: true 191 | -------------------------------------------------------------------------------- /.github/workflows/build-release.yml: -------------------------------------------------------------------------------- 1 | name: Build releases 2 | 3 | on: 4 | workflow_dispatch: 5 | repository_dispatch: 6 | types: [release] 7 | 8 | jobs: 9 | build: 10 | name: Build ${{ matrix.model }}-${{ matrix.tag.version }} 11 | runs-on: ubuntu-24.04 12 | defaults: 13 | run: 14 | shell: bash 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | model: 19 | - armv8 20 | - nanopi-r4s 21 | - nanopi-r5s 22 | - x86_64 23 | - netgear_r8500 24 | tag: 25 | - type: rc2 26 | version: openwrt-24.10 27 | 28 | steps: 29 | - name: Setup variables 30 | run: | 31 | sudo timedatectl set-timezone 'Asia/Shanghai' 32 | git config --global user.name 'actions' 33 | git config --global user.email 'action@github.com' 34 | echo build_dir="/builder" >> "$GITHUB_ENV" 35 | 36 | - name: Show system 37 | run: | 38 | echo -e "\n\e[1;32mCPU:\e[0m" 39 | echo "$(grep 'model name' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}') ($(grep 'cpu MHz' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}')MHz) x $(grep processor /proc/cpuinfo | wc -l)" 40 | echo -e "\n\e[1;32mMemory:\e[0m" 41 | free -h 42 | echo -e "\n\e[1;32mStorage:\e[0m" 43 | df -Th / /mnt 44 | echo -e "\n\e[1;32mSystem:\e[0m" 45 | lsb_release -a 46 | echo -e "\n\e[1;32mKernel:\e[0m" 47 | uname -a 48 | echo 49 | 50 | - name: Free disk space 51 | uses: sbwml/actions@free-disk 52 | with: 53 | build-mount-path: /builder 54 | 55 | - name: Build System Setup 56 | uses: sbwml/actions@openwrt-build-setup 57 | 58 | - name: Install LLVM 59 | uses: sbwml/actions@install-llvm 60 | 61 | - name: Restore Cached 62 | uses: actions/cache/restore@v4 63 | with: 64 | path: /builder/.ccache 65 | key: ${{ matrix.tag.version }}-${{ matrix.model }} 66 | 67 | - name: Compile OpenWrt 68 | id: compile 69 | continue-on-error: true 70 | working-directory: /builder 71 | env: 72 | git_name: private 73 | git_password: ${{ secrets.ftp_password }} 74 | private_url: ${{ secrets.private_url }} 75 | run: | 76 | [ "${{ matrix.model }}" != "netgear_r8500" ] && export KERNEL_CLANG_LTO=y 77 | export BUILD_FAST=y ENABLE_CCACHE=y ENABLE_OTA=y ENABLE_BPF=y ENABLE_LTO=y ENABLE_LRNG=y USE_GCC15=y ENABLE_MOLD=y 78 | bash <(curl -sS ${{ secrets.script_url_general }}) ${{ matrix.tag.type }} ${{ matrix.model }} 79 | cd openwrt 80 | tags=$(git describe --abbrev=0 --tags) 81 | echo "latest_release=$tags" >>$GITHUB_ENV 82 | 83 | - name: Extensive logs after a failed compilation 84 | if: steps.compile.outcome == 'failure' 85 | working-directory: /builder 86 | run: | 87 | cd openwrt 88 | make V=s IGNORE_ERRORS="n m" 89 | 90 | - name: Delete Cached 91 | continue-on-error: true 92 | working-directory: /builder 93 | env: 94 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 95 | GH_REPO: ${{ github.repository }} 96 | run: | 97 | gh cache delete ${{ matrix.tag.version }}-${{ matrix.model }} || true 98 | 99 | - name: Save Cached 100 | uses: actions/cache/save@v4 101 | with: 102 | path: /builder/.ccache 103 | key: ${{ matrix.tag.version }}-${{ matrix.model }} 104 | 105 | - name: Prepare Firmware Files 106 | working-directory: /builder 107 | run: | 108 | mkdir -p rom info 109 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 110 | cp -a openwrt/bin/targets/rockchip/*/*.img.gz rom/ 111 | cp -a openwrt/bin/targets/rockchip/*/*-r4s.manifest info/manifest.txt 112 | cp -a openwrt/bin/targets/rockchip/*/config.buildinfo info/config.buildinfo 113 | cd rom && sha256sum * > ../info/sha256sums.txt 114 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 115 | cp -a openwrt/bin/targets/rockchip/*/*.img.gz rom/ 116 | cp -a openwrt/bin/targets/rockchip/*/*.manifest info/manifest.txt 117 | cp -a openwrt/bin/targets/rockchip/*/config.buildinfo info/config.buildinfo 118 | cd rom && sha256sum * > ../info/sha256sums.txt 119 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 120 | cp -a openwrt/bin/targets/x86/*/*-ext4-combined-efi.img.gz rom/ 121 | cp -a openwrt/bin/targets/x86/*/*-squashfs-combined-efi.img.gz rom/ 122 | cp -a openwrt/bin/targets/x86/*/*-generic-rootfs.tar.gz rom/ 123 | cp -a openwrt/bin/targets/x86/*/*-x86-64-generic.manifest info/manifest.txt 124 | cp -a openwrt/bin/targets/x86/*/config.buildinfo info/config.buildinfo 125 | cd rom && sha256sum * > ../info/sha256sums.txt 126 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 127 | cp -a openwrt/bin/targets/bcm53xx/generic/*-bcm53xx-generic-netgear_r8500-squashfs.chk rom/ 128 | cp -a openwrt/bin/targets/bcm53xx/generic/*.manifest info/manifest.txt 129 | cp -a openwrt/bin/targets/bcm53xx/generic/config.buildinfo info/config.buildinfo 130 | cd rom && sha256sum * > ../info/sha256sums.txt 131 | elif [ "${{ matrix.model }}" = "armv8" ]; then 132 | tar zcf rom/u-boot-qemu_armv8.tar.gz -C openwrt/bin/targets/armsr/armv8*/ ./u-boot-qemu_armv8 133 | cp -a openwrt/bin/targets/armsr/armv8*/*-generic-initramfs-kernel.bin rom/ 134 | cp -a openwrt/bin/targets/armsr/armv8*/*-generic-kernel.bin rom/ 135 | cp -a openwrt/bin/targets/armsr/armv8*/*-generic-ext4-combined-efi.img.gz rom/ 136 | cp -a openwrt/bin/targets/armsr/armv8*/*-generic-squashfs-combined-efi.img.gz rom/ 137 | cp -a openwrt/bin/targets/armsr/armv8*/*-rootfs.tar.gz rom/ 138 | cp -a openwrt/bin/targets/armsr/armv8*/*.manifest info/manifest.txt 139 | cp -a openwrt/bin/targets/armsr/armv8*/config.buildinfo info/config.buildinfo 140 | cd rom && sha256sum * > ../info/sha256sums.txt 141 | fi 142 | cd .. 143 | tar zcf rom/buildinfo_${{ matrix.model }}.tar.gz info 144 | 145 | - name: Create virtual machine images 146 | if: ${{ matrix.model == 'x86_64' }} 147 | working-directory: /builder 148 | run: | 149 | mkdir -p virtual_images 150 | cp -a openwrt/bin/targets/x86/*/*-generic-squashfs-combined-efi.img.gz virtual_images/ 151 | gzip -dq virtual_images/*-generic-squashfs-combined-efi.img.gz || true 152 | cd virtual_images 153 | image_name=$(basename -s .img *.img) 154 | qemu-img convert -f raw -O qcow2 *.img $image_name.qcow2 155 | qemu-img convert -f raw -O vpc *.img $image_name.vhd 156 | qemu-img convert -f raw -O vmdk *.img $image_name.vmdk 157 | rm -f *.img 158 | sha256sum * > sha256sums.txt 159 | echo "

x86_64 虚拟机平台镜像

" > README.md 160 | 161 | - name: Create release 162 | uses: ncipollo/release-action@v1.14.0 163 | with: 164 | name: OpenWrt-${{ env.latest_release }} 165 | allowUpdates: true 166 | tag: ${{ env.latest_release }} 167 | commit: main 168 | replacesArtifacts: true 169 | token: ${{ secrets.workflow_token }} 170 | artifacts: | 171 | ${{ env.build_dir }}/rom/* 172 | 173 | - name: Install aliyunpan & login 174 | if: ${{ matrix.model != 'armv8' }} 175 | continue-on-error: true 176 | working-directory: /builder 177 | timeout-minutes: 1 178 | run: | 179 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 180 | device_id=${{ secrets.device_id_r4s }} 181 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 182 | device_id=${{ secrets.device_id_r5s }} 183 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 184 | device_id=${{ secrets.device_id_x86 }} 185 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 186 | device_id=${{ secrets.device_id_netgear }} 187 | fi 188 | sudo wget -q ${{ secrets.aliyunpan_go }} -O /bin/aliyunpan 189 | sudo chmod 0755 /bin/aliyunpan 190 | sudo sh -c 'echo "${{ secrets.aliyunpan_us_node }} api.alipan.com auth.alipan.com www.alipan.com" >> /etc/hosts' 191 | export ALIYUNPAN_CONFIG_DIR="$(pwd)/.aliyunpan" 192 | aliyun_token=`curl -s ${{ secrets.aliyun_token }} | openssl enc -aes-256-cfb -pbkdf2 -a -d -k ${{ secrets.token_dec }}` 193 | aliyunpan config set -device_id=$device_id >/dev/null 2>&1 194 | echo 195 | echo $aliyun_token | aliyunpan login 196 | 197 | - name: Upload Firmware - releases 198 | if: ${{ matrix.model != 'armv8' }} 199 | id: upload 200 | continue-on-error: true 201 | working-directory: /builder 202 | timeout-minutes: 20 203 | run: | 204 | export ALIYUNPAN_CONFIG_DIR="$(pwd)/.aliyunpan" 205 | version=$(cat openwrt/version.txt) 206 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 207 | aliyunpan upload --timeout 20 --retry 5 --ow info/config.buildinfo openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/ 208 | aliyunpan upload --timeout 20 --retry 5 --ow info/manifest.txt openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/ 209 | aliyunpan upload --timeout 20 --retry 5 --ow info/sha256sums.txt openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/ 210 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-r4s-ext4-sysupgrade.img.gz openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/ 211 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-r4s-squashfs-sysupgrade.img.gz openwrt/nanopi-r4s/releases/${{ matrix.tag.version }}/$version/ 212 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 213 | aliyunpan upload --timeout 20 --retry 5 --ow info/config.buildinfo openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/ 214 | aliyunpan upload --timeout 20 --retry 5 --ow info/manifest.txt openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/ 215 | aliyunpan upload --timeout 20 --retry 5 --ow info/sha256sums.txt openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/ 216 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-r5c-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/ 217 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-r5c-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/ 218 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-r5s-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/ 219 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-r5s-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/releases/${{ matrix.tag.version }}/$version/ 220 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 221 | aliyunpan upload --timeout 20 --retry 5 --ow info/config.buildinfo openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/ 222 | aliyunpan upload --timeout 20 --retry 5 --ow info/manifest.txt openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/ 223 | aliyunpan upload --timeout 20 --retry 5 --ow info/sha256sums.txt openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/ 224 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-generic-rootfs.tar.gz openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/ 225 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-ext4-combined-efi.img.gz openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/ 226 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*-squashfs-combined-efi.img.gz openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/ 227 | # virtual machine images 228 | aliyunpan upload --timeout 20 --retry 5 --ow virtual_images/README.md openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/virtual_machine_images/ 229 | aliyunpan upload --timeout 20 --retry 5 --ow virtual_images/sha256sums.txt openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/virtual_machine_images/ 230 | aliyunpan upload --timeout 20 --retry 5 --ow virtual_images/*.vmdk openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/virtual_machine_images/ 231 | aliyunpan upload --timeout 20 --retry 5 --ow virtual_images/*.vhd openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/virtual_machine_images/ 232 | aliyunpan upload --timeout 20 --retry 5 --ow virtual_images/*.qcow2 openwrt/x86_64/releases/${{ matrix.tag.version }}/$version/virtual_machine_images/ 233 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 234 | aliyunpan upload --timeout 20 --retry 5 --ow info/config.buildinfo openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/ 235 | aliyunpan upload --timeout 20 --retry 5 --ow info/manifest.txt openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/ 236 | aliyunpan upload --timeout 20 --retry 5 --ow info/sha256sums.txt openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/ 237 | aliyunpan upload --timeout 20 --retry 5 --ow rom/*.chk openwrt/netgear-r8500/releases/${{ matrix.tag.version }}/$version/ 238 | fi 239 | aliyunpan recycle delete -all 240 | echo y | aliyunpan logout 241 | 242 | - name: Retry Upload Firmware - releases 243 | if: steps.upload.outcome == 'failure' 244 | run: | 245 | sshpass -p ${{ secrets.user_password }} ssh -o StrictHostKeyChecking=no root@${{ secrets.guangzhou_address }} >/dev/null 2>&1 246 | sshpass -p ${{ secrets.user_password }} ssh root@${{ secrets.guangzhou_address }} "/opt/sbin/fw-upload ${{ matrix.model }}" 247 | 248 | - name: Release OTA 249 | uses: SamKirkland/FTP-Deploy-Action@v4.3.5 250 | with: 251 | username: openwrt 252 | server: ${{ secrets.ftp_address }} 253 | password: ${{ secrets.ftp_password }} 254 | server-dir: release/${{ matrix.model }}/ 255 | local-dir: ${{ env.build_dir }}/openwrt/ota/ 256 | dangerous-clean-slate: true 257 | -------------------------------------------------------------------------------- /.github/workflows/build-snapshots.yml: -------------------------------------------------------------------------------- 1 | name: Build SNAPSHOT 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: 0 16 * * * 7 | 8 | jobs: 9 | build: 10 | name: Build ${{ matrix.model }}-${{ matrix.tag.version }} 11 | runs-on: ubuntu-24.04 12 | defaults: 13 | run: 14 | shell: bash 15 | strategy: 16 | fail-fast: false 17 | matrix: 18 | model: 19 | - armv8 20 | - nanopi-r4s 21 | - nanopi-r5s 22 | - x86_64 23 | - netgear_r8500 24 | tag: 25 | - type: dev 26 | version: openwrt-24.10 27 | 28 | steps: 29 | - name: Setup variables 30 | run: | 31 | sudo timedatectl set-timezone 'Asia/Shanghai' 32 | git config --global user.name 'actions' 33 | git config --global user.email 'action@github.com' 34 | echo build_dir="/builder" >> "$GITHUB_ENV" 35 | 36 | - name: Show system 37 | run: | 38 | echo -e "\n\e[1;32mCPU:\e[0m" 39 | echo "$(grep 'model name' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}') ($(grep 'cpu MHz' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}')MHz) x $(grep processor /proc/cpuinfo | wc -l)" 40 | echo -e "\n\e[1;32mMemory:\e[0m" 41 | free -h 42 | echo -e "\n\e[1;32mStorage:\e[0m" 43 | df -Th / /mnt 44 | echo -e "\n\e[1;32mSystem:\e[0m" 45 | lsb_release -a 46 | echo -e "\n\e[1;32mKernel:\e[0m" 47 | uname -a 48 | echo 49 | 50 | - name: Free disk space 51 | uses: sbwml/actions@free-disk 52 | with: 53 | build-mount-path: /builder 54 | 55 | - name: Build System Setup 56 | uses: sbwml/actions@openwrt-build-setup 57 | 58 | - name: Install LLVM 59 | uses: sbwml/actions@install-llvm 60 | 61 | - name: Restore Cached 62 | uses: actions/cache/restore@v4 63 | with: 64 | path: /builder/.ccache 65 | key: ${{ matrix.tag.version }}-${{ matrix.model }} 66 | 67 | - name: Compile OpenWrt 68 | id: compile 69 | continue-on-error: true 70 | working-directory: /builder 71 | env: 72 | git_name: private 73 | git_password: ${{ secrets.ftp_password }} 74 | private_url: ${{ secrets.private_url }} 75 | run: | 76 | [ "${{ matrix.model }}" != "netgear_r8500" ] && export KERNEL_CLANG_LTO=y 77 | export BUILD_FAST=y ENABLE_CCACHE=y ENABLE_BPF=y ENABLE_LTO=y ENABLE_LRNG=y USE_GCC15=y ENABLE_MOLD=y 78 | bash <(curl -sS ${{ secrets.script_url_general }}) ${{ matrix.tag.type }} ${{ matrix.model }} 79 | build_date=$(date "+%Y-%m-%d") 80 | echo "build_date=$build_date" >> $GITHUB_ENV 81 | 82 | - name: Extensive logs after a failed compilation 83 | if: steps.compile.outcome == 'failure' 84 | working-directory: /builder 85 | run: | 86 | cd openwrt 87 | make V=s IGNORE_ERRORS="n m" 88 | 89 | - name: Assemble Artifact 90 | working-directory: /builder 91 | run: | 92 | mkdir -p rom info 93 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 94 | cp -a openwrt/bin/targets/rockchip/*/*.img.gz rom/ 95 | cp -a openwrt/bin/targets/rockchip/*/*-r4s.manifest info/manifest.txt 96 | cp -a openwrt/bin/targets/rockchip/*/config.buildinfo info/config.buildinfo 97 | cd rom && sha256sum *gz > ../info/sha256sums.txt 98 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 99 | cp -a openwrt/bin/targets/rockchip/*/*.img.gz rom/ 100 | cp -a openwrt/bin/targets/rockchip/*/*.manifest info/manifest.txt 101 | cp -a openwrt/bin/targets/rockchip/*/config.buildinfo info/config.buildinfo 102 | cd rom && sha256sum *gz > ../info/sha256sums.txt 103 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 104 | cp -a openwrt/bin/targets/x86/*/*-ext4-combined-efi.img.gz rom/ 105 | cp -a openwrt/bin/targets/x86/*/*-squashfs-combined-efi.img.gz rom/ 106 | cp -a openwrt/bin/targets/x86/*/*-generic-rootfs.tar.gz rom/ 107 | cp -a openwrt/bin/targets/x86/*/*-x86-64-generic.manifest info/manifest.txt 108 | cp -a openwrt/bin/targets/x86/*/config.buildinfo info/config.buildinfo 109 | cd rom && sha256sum *gz > ../info/sha256sums.txt 110 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 111 | cp -a openwrt/bin/targets/bcm53xx/generic/*-bcm53xx-generic-netgear_r8500-squashfs.chk rom/ 112 | cp -a openwrt/bin/targets/bcm53xx/generic/*.manifest info/manifest.txt 113 | cp -a openwrt/bin/targets/bcm53xx/generic/config.buildinfo info/config.buildinfo 114 | cd rom && sha256sum * > ../info/sha256sums.txt 115 | elif [ "${{ matrix.model }}" = "armv8" ]; then 116 | tar zcf rom/u-boot-qemu_armv8.tar.gz -C openwrt/bin/targets/armsr/armv8*/ ./u-boot-qemu_armv8 117 | cp -a openwrt/bin/targets/armsr/armv8*/*-generic-initramfs-kernel.bin rom/ 118 | cp -a openwrt/bin/targets/armsr/armv8*/*-generic-kernel.bin rom/ 119 | cp -a openwrt/bin/targets/armsr/armv8*/*-generic-ext4-combined-efi.img.gz rom/ 120 | cp -a openwrt/bin/targets/armsr/armv8*/*-generic-squashfs-combined-efi.img.gz rom/ 121 | cp -a openwrt/bin/targets/armsr/armv8*/*-rootfs.tar.gz rom/ 122 | cp -a openwrt/bin/targets/armsr/armv8*/*.manifest info/manifest.txt 123 | cp -a openwrt/bin/targets/armsr/armv8*/config.buildinfo info/config.buildinfo 124 | cd rom && sha256sum * > ../info/sha256sums.txt 125 | fi 126 | echo current_hour="$(date +'%H')" >> "$GITHUB_ENV" 127 | 128 | - name: Upload artifacts 129 | uses: actions/upload-artifact@v4 130 | with: 131 | name: ${{ env.build_date }}-${{ matrix.model }}-${{ matrix.tag.version }} 132 | path: ${{ env.build_dir }}/rom/*.* 133 | 134 | - name: Install aliyunpan & login 135 | if: ${{ matrix.model != 'armv8' && env.current_hour >= '0' && env.current_hour <= '10' }} 136 | working-directory: /builder 137 | continue-on-error: true 138 | run: | 139 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 140 | device_id=${{ secrets.device_id_r4s_dev }} 141 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 142 | device_id=${{ secrets.device_id_r5s_dev }} 143 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 144 | device_id=${{ secrets.device_id_x86_dev }} 145 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 146 | device_id=${{ secrets.device_id_netgear_dev }} 147 | fi 148 | sudo wget -q ${{ secrets.aliyunpan_go }} -O /bin/aliyunpan 149 | sudo chmod 0755 /bin/aliyunpan 150 | sudo sh -c 'echo "${{ secrets.aliyunpan_us_node }} api.alipan.com auth.alipan.com www.alipan.com" >> /etc/hosts' 151 | export ALIYUNPAN_CONFIG_DIR="$(pwd)/.aliyunpan" 152 | aliyun_token=`curl -s ${{ secrets.aliyun_token }} | openssl enc -aes-256-cfb -pbkdf2 -a -d -k ${{ secrets.token_dec }}` 153 | aliyunpan config set -device_id=$device_id >/dev/null 2>&1 154 | echo 155 | echo $aliyun_token | aliyunpan login 156 | 157 | - name: Upload Firmware - snapshots 158 | if: ${{ matrix.model != 'armv8' && env.current_hour >= '0' && env.current_hour <= '10' }} 159 | working-directory: /builder 160 | timeout-minutes: 30 161 | continue-on-error: true 162 | run: | 163 | export ALIYUNPAN_CONFIG_DIR="$(pwd)/.aliyunpan" 164 | DATE=$(date "+%Y-%m-%d") 165 | branch=24.10-SNAPSHOT 166 | if [ "${{ matrix.model }}" = "nanopi-r4s" ]; then 167 | aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/nanopi-r4s/snapshots/$branch/$DATE/ 168 | aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/nanopi-r4s/snapshots/$branch/$DATE/ 169 | aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/nanopi-r4s/snapshots/$branch/$DATE/ 170 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r4s-ext4-sysupgrade.img.gz openwrt/nanopi-r4s/snapshots/$branch/$DATE/ 171 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r4s-squashfs-sysupgrade.img.gz openwrt/nanopi-r4s/snapshots/$branch/$DATE/ 172 | elif [ "${{ matrix.model }}" = "nanopi-r5s" ]; then 173 | aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/nanopi-r5s/snapshots/$branch/$DATE/ 174 | aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/nanopi-r5s/snapshots/$branch/$DATE/ 175 | aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/nanopi-r5s/snapshots/$branch/$DATE/ 176 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5c-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/snapshots/$branch/$DATE/ 177 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5c-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/snapshots/$branch/$DATE/ 178 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5s-ext4-sysupgrade.img.gz openwrt/nanopi-r5s/snapshots/$branch/$DATE/ 179 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-r5s-squashfs-sysupgrade.img.gz openwrt/nanopi-r5s/snapshots/$branch/$DATE/ 180 | elif [ "${{ matrix.model }}" = "x86_64" ]; then 181 | aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/x86_64/snapshots/$branch/$DATE/ 182 | aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/x86_64/snapshots/$branch/$DATE/ 183 | aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/x86_64/snapshots/$branch/$DATE/ 184 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-generic-rootfs.tar.gz openwrt/x86_64/snapshots/$branch/$DATE/ 185 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-ext4-combined-efi.img.gz openwrt/x86_64/snapshots/$branch/$DATE/ 186 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*-squashfs-combined-efi.img.gz openwrt/x86_64/snapshots/$branch/$DATE/ 187 | elif [ "${{ matrix.model }}" = "netgear_r8500" ]; then 188 | aliyunpan upload --timeout 30 --retry 10 --ow info/config.buildinfo openwrt/netgear-r8500/snapshots/$branch/$DATE/ 189 | aliyunpan upload --timeout 30 --retry 10 --ow info/manifest.txt openwrt/netgear-r8500/snapshots/$branch/$DATE/ 190 | aliyunpan upload --timeout 30 --retry 10 --ow info/sha256sums.txt openwrt/netgear-r8500/snapshots/$branch/$DATE/ 191 | aliyunpan upload --timeout 30 --retry 10 --ow rom/*.chk openwrt/netgear-r8500/snapshots/$branch/$DATE/ 192 | fi 193 | aliyunpan recycle delete -all 194 | echo y | aliyunpan logout 195 | 196 | - name: Copy build info 197 | working-directory: /builder 198 | run: | 199 | cp -a info/* rom/ 200 | 201 | - name: Upload Firmware - FTP 202 | uses: SamKirkland/FTP-Deploy-Action@v4.3.5 203 | with: 204 | dangerous-clean-slate: true 205 | username: snapshot 206 | server: ${{ secrets.ftp_address }} 207 | password: ${{ secrets.ftp_password }} 208 | server-dir: ${{ matrix.model }}/ 209 | local-dir: ${{ env.build_dir }}/rom/ 210 | -------------------------------------------------------------------------------- /.github/workflows/openwrt-core.yml: -------------------------------------------------------------------------------- 1 | name: Build OpenWrt Core 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | jobs: 7 | build: 8 | name: Build ${{ matrix.model }} Core 9 | runs-on: ubuntu-24.04 10 | defaults: 11 | run: 12 | shell: bash 13 | strategy: 14 | fail-fast: false 15 | matrix: 16 | model: 17 | - armv8 18 | - nanopi-r5s 19 | - x86_64 20 | - netgear_r8500 21 | tag: 22 | - type: rc2 23 | version: openwrt-24.10 24 | 25 | steps: 26 | - name: Setup variables 27 | run: | 28 | sudo timedatectl set-timezone 'Asia/Shanghai' 29 | git config --global user.name 'actions' 30 | git config --global user.email 'action@github.com' 31 | echo build_dir="/builder" >> "$GITHUB_ENV" 32 | 33 | - name: Show system 34 | run: | 35 | echo -e "\n\e[1;32mCPU:\e[0m" 36 | echo "$(grep 'model name' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}') ($(grep 'cpu MHz' /proc/cpuinfo | head -1 | awk -F ': ' '{print $2}')MHz) x $(grep processor /proc/cpuinfo | wc -l)" 37 | echo -e "\n\e[1;32mMemory:\e[0m" 38 | free -h 39 | echo -e "\n\e[1;32mStorage:\e[0m" 40 | df -Th / /mnt 41 | echo -e "\n\e[1;32mSystem:\e[0m" 42 | lsb_release -a 43 | echo -e "\n\e[1;32mKernel:\e[0m" 44 | uname -a 45 | echo 46 | 47 | - name: Free disk space 48 | uses: sbwml/actions@free-disk 49 | with: 50 | build-mount-path: /builder 51 | 52 | - name: Build System Setup 53 | uses: sbwml/actions@openwrt-build-setup 54 | 55 | - name: Install LLVM 56 | uses: sbwml/actions@install-llvm 57 | 58 | - name: Compile OpenWrt 59 | id: compile 60 | continue-on-error: true 61 | working-directory: /builder 62 | env: 63 | git_name: private 64 | git_password: ${{ secrets.ftp_password }} 65 | run: | 66 | [ "${{ matrix.model }}" != "netgear_r8500" ] && export KERNEL_CLANG_LTO=y ENABLE_DPDK=y 67 | export BUILD_FAST=y ENABLE_CCACHE=y ENABLE_OTA=y ENABLE_BPF=y ENABLE_LTO=y ENABLE_LRNG=y USE_GCC15=y ENABLE_MOLD=y MINIMAL_BUILD=y OPENWRT_CORE=y 68 | bash <(curl -sS ${{ secrets.script_url_general }}) ${{ matrix.tag.type }} ${{ matrix.model }} 69 | 70 | - name: Extensive logs after a failed compilation 71 | if: steps.compile.outcome == 'failure' 72 | working-directory: /builder 73 | run: | 74 | cd openwrt 75 | make V=s IGNORE_ERRORS="n m" 76 | 77 | - name: Prepare files 78 | working-directory: /builder 79 | run: | 80 | base_name=$(basename ${{ env.build_dir }}/openwrt/*-*.tar.gz) 81 | kmod_name=$(echo $base_name | sed 's/~/-/g') 82 | mv ${{ env.build_dir }}/openwrt/*-*.tar.gz ${{ env.build_dir }}/openwrt/$kmod_name 83 | 84 | - name: Release kernel modules 85 | uses: ncipollo/release-action@v1.14.0 86 | with: 87 | name: kmod-snapshot 88 | allowUpdates: true 89 | prerelease: true 90 | tag: snapshot 91 | commit: main 92 | replacesArtifacts: true 93 | token: ${{ secrets.workflow_token }} 94 | artifacts: | 95 | ${{ env.build_dir }}/openwrt/*-*.tar.gz 96 | 97 | - name: Sync kernel modules 98 | uses: peter-evans/repository-dispatch@v3 99 | with: 100 | token: ${{ secrets.workflow_token }} 101 | repository: sbwml/openwrt_core 102 | event-type: sync 103 | 104 | - name: Delete Cached 105 | continue-on-error: true 106 | working-directory: /builder 107 | env: 108 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 109 | GH_REPO: ${{ github.repository }} 110 | run: | 111 | gh cache delete ${{ matrix.tag.version }}-${{ matrix.model }} || true 112 | 113 | - name: Save Cached 114 | uses: actions/cache/save@v4 115 | with: 116 | path: /builder/.ccache 117 | key: ${{ matrix.tag.version }}-${{ matrix.model }} 118 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

2 | 3 |

4 | 5 |

OpenWrt for FriendlyElec NanoPi R4S / R5S & X86_64

6 | 7 |

8 | 9 |

10 | 11 |

12 | 基于原生 OpenWrt 更改与优化的固件,提供高效、稳定的使用体验! 13 |

14 | 15 | ------- 16 | 17 | ## 固件下载 18 | 19 | **NanoPi R4S: https://r4s.cooluc.com** 20 | 21 | **NanoPi R5S: https://r5s.cooluc.com** 22 | 23 | **X86_64: https://x86.cooluc.com** 24 | 25 | **Netgear R8500: https://r8500.cooluc.com** 26 | 27 | **24.10-SNAPSHOT: https://snapshot.cooluc.com** 28 | 29 | ## 版本信息 30 | 31 | **[Releases](https://r5s.cooluc.com/releases):正式版 - 基于 [OpenWrt](https://github.com/openwrt/openwrt/releases) 最新 Releases 源代码和软件包编译(推荐) - [Linux 6.12 LTS](https://kernel.org/)** 32 | 33 | **[Snapshots](https://r5s.cooluc.com/snapshots):开发版 - 基于 [OpenWrt](https://github.com/openwrt/openwrt/tree/openwrt-24.10) 最新 openwrt-24.10 分支源代码和软件包编译 - [Linux 6.12 LTS](https://kernel.org/)(每夜构建)** 34 | 35 | **[Minimal](https://r5s.cooluc.com/minimal):轻量版 - 基于 [OpenWrt](https://github.com/openwrt/openwrt/releases) 最新 Releases 源代码和软件包编译,无内置插件(不推荐) - [Linux 6.12 LTS](https://kernel.org/)** 36 | 37 | ------ 38 | 39 | ## 默认信息 40 | 41 | - **管理地址:[http://10.0.0.1](http://10.0.0.1) 或 [http://openwrt.lan](http://openwrt.lan)** 42 | - **账户:root** 43 | - **密码:无** 44 | 45 | ------ 46 | 47 | ## 基本状况 48 | 49 | | 基本 | 状态 | 基本 | 状态 | 50 | |:-------------------------------------------------:|:----:|:----------------------------:|:----:| 51 | | kmod 内核模块安装 | ✅ | 全锥型 NAT(NFT、BCM 双方案)| ✅ | 52 | | SS AES 硬件加速 | ✅ | 构建优化(O3、LTO) | ✅ | 53 | | GPU 硬件加速 | ✅ | 内核/模块 优化(Clang/LLVM ThinLTO) | ✅ | 54 | | HDMI 终端输出 | ✅ | 在线 OTA 升级(squashfs) | ✅ | 55 | | RTC 时钟 (HYM8563) | ✅ | 固件重置(squashfs) | ✅ | 56 | | BBRv3 拥塞控制 | ✅ | LLVM-BPF 支持 | ✅ | 57 | | TCP Brutal 拥塞控制 | ✅ | Shortcut-FE(支持 UDP 入站) | ✅ | 58 | | KVM 虚拟化支持 | ✅ | LRNG 随机数(v57) | ✅ | 59 | | NGINX & CURL HTTP3/QUIC 支持 | ✅ | PWM 风扇控制 | ✅ | 60 | 61 | 62 | | 内置插件 | 状态 | 内置插件 | 状态 | 63 | |:------------------------:|:----:|:----------------:|:----:| 64 | | PassWall | ✅ | Docker | ✅ | 65 | | HomeProxy | ✅ | TTY 终端 | ✅ | 66 | | FileBrowser | ✅ | NetData 监控 | ✅ | 67 | | qBittorrent | ✅ | DiskMan 磁盘管理 | ✅ | 68 | | MosDNS | ✅ | CPU 性能调节 | ✅ | 69 | | 动态 DNS | ✅ | SQM 列队管理 | ✅ | 70 | | Watchcat | ✅ | nlbw 宽带监控 | ✅ | 71 | | KMS 服务器 | ✅ | Socat | ✅ | 72 | | FRP 客户端 | ✅ | 应用过滤 | ✅ | 73 | | 网络唤醒 | ✅ | 访问控制 | ✅ | 74 | | 网络共享(Samba) | ✅ | UPnP | ✅ | 75 | | 锐捷认证 | ✅ | IP 限速 | ✅ | 76 | | Aria2 | ✅ | WireGuard | ✅ | 77 | | Alist 文件列表 | ✅ | L2TP | ✅ | 78 | | USB 打印服务器 | ✅ | ZeroTier | ✅ | 79 | | 隔空播放(AirConnect) | ✅ | WebDav | ✅ | 80 | | 自定义命令 | ✅ | AirPlay 2 | ✅ | 81 | | 网速测试 | ✅ | NATMap | ✅ | 82 | 83 | ✅ 可用 84 | 85 | ❌ 不可用 86 | 87 | ⏳ 计划中 88 | 89 | 特别说明: 90 | 91 | * *AirPlay 2:一款简单易用的 AirPlay 音频播放器,需要外接 USB 声卡使用。* 92 | 93 |
94 | LuCI 菜单概览 95 |
96 | ├── 状态 97 |  ├── 概览
98 |  ├── 路由
99 |  ├── 防火墙
100 |  ├── 系统日志
101 |  ├── 系统进程
102 |  ├── 实时信息
103 |  ├── WireGuard
104 |  └── 释放内存 105 |
106 |
107 | ├── 系统 108 |  ├── 系统
109 |  ├── 管理权
110 |  ├── 软件包
111 |  ├── 启动项
112 |  ├── 计划任务
113 |  ├── 挂载点
114 |  ├── 终端
115 |  ├── 磁盘管理
116 |  ├── LED 配置
117 |  ├── 在线升级
118 |  ├── 备份/升级
119 |  ├── 自定义命令
120 |  ├── 文件管理器
121 |  ├── 定时重启
122 |  ├── 主题设置
123 |  ├── CPU 性能调节
124 |  └── 重启 125 |
126 |
127 | ├── 服务 128 |  ├── PassWall
129 |  ├── HomeProxy
130 |  ├── qBittorrent
131 |  ├── MosDNS
132 |  ├── 动态 DNS
133 |  ├── Watchcat
134 |  ├── KMS 服务器
135 |  ├── 隔空播放
136 |  ├── AirPlay 2
137 |  ├── Aria2
138 |  ├── FRP 客户端
139 |  ├── 锐捷认证
140 |  ├── NATMap
141 |  ├── 网络共享
142 |  ├── 网络唤醒
143 |  └── ZeroTier 144 |
145 |
146 | ├── Docker 147 |  ├── 概览
148 |  ├── 容器
149 |  ├── 镜像
150 |  ├── 网络
151 |  ├── 卷标
152 |  ├── 事件
153 |  └── 配置 154 |
155 |
156 | ├── 网络存储 157 |  ├── Alist 文件列表
158 |  ├── USB 打印服务器
159 |  └── WebDav 160 |
161 |
162 | ├── 网络 163 |  ├── 接口
164 |  ├── 路由
165 |  ├── DHCP/DNS
166 |  ├── 网络诊断
167 |  ├── 网速测试
168 |  ├── SQM 队列管理
169 |  ├── 防火墙
170 |  ├── UPnP IGD 和 PCP
171 |  ├── 带宽监控
172 |  ├── 应用过滤
173 |  ├── Socat
174 |  └── 网速控制 175 |
176 |  └── 退出 177 |
178 | 179 | ------ 180 | 181 | ## 固件格式 182 | 183 | **固件分为两个文件系统,[SquashFS](https://zh.wikipedia.org/wiki/SquashFS) 和 [Ext4](https://zh.wikipedia.org/wiki/Ext4)。** 184 | 185 | **SquashFS(推荐):固件文件名带有 “squashfs”,SquashFS 为只读文件系统,支持系统重置,更能避免 SD 卡文件系统触发写保护,支持在线 OTA 升级,适合绝大部分用户使用。** 186 | 187 | **Ext4:固件文件名带有 “ext4”,Ext4 文件系统具备整个分区可读写性质,更适合熟悉 Linux 系统的用户使用,但意外断电有几率造成分区写入保护。** 188 | 189 | 190 | ------ 191 | 192 | ## NanoPi R4S/R5S 固件烧写(SD) 193 | 194 | **推荐工具:** 195 | 196 | **SD卡容量:2GB 或更多** 197 | 198 | *固件文件无需解压,直接使用工具写入 microSD 卡* 199 | 200 | ------ 201 | 202 | ## 固件烧写(NanoPi R5S eMMC) 203 | 204 | ### 准备工具 205 | 206 | - **电脑(Windows),其它操作系统自行搜索相关工具** 207 | - **数据线:USB-A to USB-A 或 Type-C to USB-A** 208 | - **瑞芯微开发工具:**RKDevTool_Release_v2.84.zip 209 | 210 | - **Mask 设备驱动:**DriverAssitant_v5.1.1.zip 211 | 212 | ### 准备固件 213 | 214 | - **下载固件文件,并解压出 .img** 215 | 216 | ### 操作过程 217 | 218 | - **安装 Mask 设备驱动** 219 | 220 | - **Mask 模式连接电脑(R5S 断电状态下,取下 SD 卡,使用数据线连接电脑。长按 “Mask” 按钮,接通 R5S 电源直至电脑发现新设备后释放 “Mask” 按钮)** 221 | 222 | 223 | 224 | 225 | 226 | - **打开 瑞芯微开发工具:正常状态:(发现一个Maskrom设备) 缺少驱动:(没有发现设备)** 227 | 228 | **安装步骤:** 229 | 230 | **① 点击 “system” 路径选择按钮(选择 zip 解压出来的 IMG 文件)** 231 | 232 | 233 | 234 | 235 | 236 | **② 点击 “执行”(固件写入完成后会自动重启进入 OpenWrt 系统)** 237 | 238 | 239 | 240 | - ***注意:通过电脑烧写固件请使用本站下载的 [瑞芯微开发工具](https://media.cooluc.com/%E8%BD%AF%E4%BB%B6/RKDevTool/RKDevTool_Release_v2.84.zip)。*** 241 | 242 | ------ 243 | 244 | ## 固件烧写(SD to eMMC) 245 | 246 | ```shell 247 | # 1、下载最新 Releases 固件并通过 SD 卡启动 248 | # 2、使用 Xftp 等工具上传一份固件到 /tmp 目录,或通过终端 wget 在线下载固件到 /tmp 目录 249 | 250 | # 3、使用内建命令写入固件到 eMMC 存储(请根据实际文件名称与路径) 251 | 252 | emmc-install /tmp/openwrt-24.10.0-rockchip-armv8-friendlyarm_nanopi-r5s-squashfs-sysupgrade.img.gz 253 | 254 | ``` 255 | 256 | **固件写入完成后,取下 SD 卡,手动断电重启即可完成。** 257 | 258 | ------ 259 | 260 | ## RTC 硬件时钟(HYM8563) 261 | 262 | **本固件支持 RTC 硬件时钟读取/同步,当设备断电时,重新通电启动系统时间不会错乱** *(注意:设备需要安装 RTC 电池后使用)* 263 | 264 | **首次安装 RTC 电池写入时间命令** 265 | 266 | ```shell 267 | hwclock -w -f /dev/rtc1 268 | ``` 269 | 270 | **测试时间读取(返回当前时间表示正常)** 271 | 272 | ```shell 273 | hwclock -f /dev/rtc1 274 | ``` 275 | 276 | ------ 277 | 278 | ## 开源地址 279 | 280 | **构建脚本:** [https://init2.cooluc.com](https://init2.cooluc.com) 281 | 282 | **构建脚本(存档):** [https://github.com/sbwml/r4s_build_script](https://github.com/sbwml/r4s_build_script) 283 | 284 | **构建来源:** [https://github.com/sbwml/builder](https://github.com/sbwml/builder) 285 | --------------------------------------------------------------------------------