├── .config ├── .github └── workflows │ ├── build_openwrt.yml │ ├── config_gene.yml │ └── update-checker.yml ├── 1.config ├── LICENSE ├── README.md ├── diy-part1.sh ├── diy-part2.sh ├── istoreos固件 ├── istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part1.rar ├── istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part2.rar ├── istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part3.rar ├── istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part1.rar ├── istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part2.rar └── istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part3.rar ├── patches ├── 0001-show-soc-status-on-luci.patch ├── 0002-show-soc-status-on-luci.patch ├── 0003-add-coremark-luci.patch └── 0004-add-coremark-packages.patch ├── scripts ├── 011-fix-mbo-modules-build.patch ├── init-settings.sh ├── preset-adguard-core.sh ├── preset-clash-core.sh └── preset-terminal-tools.sh └── uboot及刷机命令 ├── u-boot.mbn └── 刷机步骤.txt /.github/workflows/build_openwrt.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright (c) 2019-2020 P3TERX 3 | # 4 | # This is free software, licensed under the MIT License. 5 | # See /LICENSE for more information. 6 | # 7 | # https://github.com/P3TERX/Actions-OpenWrt 8 | # Description: Build OpenWrt using GitHub Actions 9 | # 10 | 11 | name: IPQ60XX-WIFI(EMMC) 12 | 13 | on: 14 | repository_dispatch: 15 | workflow_dispatch: 16 | inputs: 17 | ssh: 18 | description: 'SSH connection to Actions' 19 | required: false 20 | default: 'false' 21 | #默认不登录ssh 22 | 23 | #登录ssh 24 | #required: false 25 | #default: 'true' 26 | 27 | 28 | cache: 29 | description: 'Cache wrt build' 30 | required: false 31 | default: 'true' 32 | 33 | env: 34 | REPO_URL: https://github.com/breeze303/openwrt-6.x.git 35 | REPO_BRANCH: main 36 | FEEDS_CONF: feeds.conf.default 37 | PATCHES_FILE_1: patches/0001-show-soc-status-on-luci.patch 38 | CONFIG_FILE: .config 39 | DIY_P1_SH: diy-part1.sh 40 | DIY_P2_SH: diy-part2.sh 41 | CLASH_KERNEL: amd64 42 | UPLOAD_BIN_DIR: false 43 | UPLOAD_FIRMWARE: true 44 | UPLOAD_COWTRANSFER: false 45 | UPLOAD_WETRANSFER: false 46 | UPLOAD_RELEASE: true 47 | TZ: Asia/Shanghai 48 | 49 | jobs: 50 | build: 51 | runs-on: ubuntu-22.04 52 | 53 | steps: 54 | - name: 创建编译空间挂载点 55 | run: | 56 | sudo mkdir -p /workdir 57 | sudo chown $USER:$GROUPS /workdir 58 | 59 | - name: 最大化编译空间 60 | uses: easimon/maximize-build-space@master 61 | with: 62 | root-reserve-mb: 2048 63 | swap-size-mb: 1024 64 | build-mount-path: /workdir 65 | overprovision-lvm: 'true' 66 | remove-dotnet: 'true' 67 | remove-android: 'true' 68 | remove-haskell: 'true' 69 | remove-codeql: 'true' 70 | remove-docker-images: 'true' 71 | 72 | - name: Checkout 73 | uses: actions/checkout@v3 74 | 75 | - name: 检查服务器配置 76 | run: | 77 | echo "警告⚠" 78 | echo "分配的服务器性能有限,若选择的插件过多,务必注意CPU性能!" 79 | echo "云编译建议取消勾选Node.js及其相关插件!" 80 | echo "已知CPU型号(降序):8370C,8272CL,8171M,E5系列" 81 | echo "--------------------------CPU信息--------------------------" 82 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)" 83 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n" 84 | echo "--------------------------内存信息--------------------------" 85 | echo "已安装内存详细信息:" 86 | sudo lshw -short -C memory | grep GiB 87 | echo -e "\n" 88 | echo "--------------------------硬盘信息--------------------------" 89 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n" 90 | echo "硬盘详情:" 91 | df -Th 92 | 93 | - name: 初始化编译环境 94 | env: 95 | DEBIAN_FRONTEND: noninteractive 96 | run: | 97 | sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android $AGENT_TOOLSDIRECTORY 98 | sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true 99 | sudo -E apt-get -y update 100 | sudo -E apt-get -y install $(curl -fsSL is.gd/depends_ubuntu_2204) 101 | sudo -E systemctl daemon-reload 102 | sudo -E apt-get -y autoremove --purge 103 | sudo -E apt-get -y clean 104 | sudo apt-get update 105 | sudo apt update 106 | sudo timedatectl set-timezone "$TZ" 107 | 108 | 109 | 110 | - name: Clone source code 111 | working-directory: /workdir 112 | run: | 113 | df -hT $PWD 114 | git clone $REPO_URL -b $REPO_BRANCH openwrt 115 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 116 | 117 | - name: cache 118 | if: github.event.inputs.cache == 'true' && github.event.inputs.cache != 'false' 119 | uses: klever1988/cachewrtbuild@main 120 | with: 121 | ccache: 'true' 122 | prefix: ${{ github.workspace }}/openwrt 123 | 124 | - name: Load custom feeds 125 | run: | 126 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 127 | chmod +x $DIY_P1_SH 128 | cd openwrt 129 | $GITHUB_WORKSPACE/$DIY_P1_SH 130 | 131 | - name: Update feeds 132 | run: cd openwrt && ./scripts/feeds update -a 133 | 134 | - name: Install feeds 135 | run: cd openwrt && ./scripts/feeds install -a -f 136 | 137 | 138 | 139 | - name: Openwrt AutoUpdate 140 | run: | 141 | TEMP=$(date +"OpenWrt_%Y%m%d_%H%M%S_")$(git rev-parse --short HEAD) 142 | echo "RELEASE_TAG=$TEMP" >> $GITHUB_ENV 143 | #required>>add "DISTRIB_GITHUB" to "zzz-default-settings" 144 | #sed -i "/DISTRIB_DESCRIPTION=/a\sed -i '/DISTRIB_GITHUB/d' /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings 145 | #sed -i "/DISTRIB_GITHUB/a\echo \"DISTRIB_GITHUB=\'https://github.com/${{github.repository}}\'\" >> /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings 146 | #required>>add "DISTRIB_VERSIONS" to "zzz-default-settings" 147 | #sed -i "/DISTRIB_DESCRIPTION=/a\sed -i '/DISTRIB_VERSIONS/d' /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings 148 | #sed -i "/DISTRIB_VERSIONS/a\echo \"DISTRIB_VERSIONS=\'${TEMP:8}\'\" >> /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings 149 | #nonessential>>add "github.actor" to "DISTRIB_DESCRIPTION" in "zzz-default-settings" 150 | #sed -i "s/OpenWrt /${{github.actor}} compiled (${TEMP:8}) \/ OpenWrt /g" openwrt/package/lean/default-settings/files/zzz-default-settings 151 | 152 | - name: Load custom configuration 153 | run: | 154 | [ -e files ] && mv files openwrt/files 155 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 156 | chmod +x $DIY_P2_SH 157 | cd openwrt 158 | $GITHUB_WORKSPACE/$DIY_P2_SH 159 | #cat package/lean/default-settings/files/zzz-default-settings 160 | rm -rf package/feeds/small/v2ray-geodata 161 | 162 | - name: SSH connection to Actions 163 | uses: P3TERX/ssh2actions@v1.0.0 164 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') 165 | env: 166 | TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} 167 | TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} 168 | 169 | - name: Download package 170 | id: package 171 | run: | 172 | cd openwrt 173 | make defconfig 174 | make download -j8 175 | find dl -size -1024c -exec ls -l {} \; 176 | find dl -size -1024c -exec rm -f {} \; 177 | 178 | - name: Compile the firmware 179 | id: compile 180 | run: | 181 | cd openwrt 182 | echo -e "$(nproc) thread compile" 183 | make -j$(nproc) || make -j1 || make -j1 V=s 184 | #make -j1 V=s 185 | echo "::set-output name=status::success" 186 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 187 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV 188 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 189 | 190 | - name: Check space usage 191 | if: (!cancelled()) 192 | run: df -hT 193 | 194 | - name: Upload bin directory 195 | uses: actions/upload-artifact@main 196 | if: steps.compile.outputs.status == 'success' && env.UPLOAD_BIN_DIR == 'true' && !cancelled() 197 | with: 198 | name: OpenWrt_bin${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 199 | path: openwrt/bin 200 | 201 | - name: Get environment path 202 | id: environment 203 | if: env.UPLOAD_BIN_DIR == 'true' && !cancelled() 204 | run: | 205 | cd openwrt/bin/ 206 | echo "WORKSPACE_DIR=$PWD" >> $GITHUB_ENV 207 | cd targets/*/* 208 | echo "UPLOAD_PATH=$PWD" >> $GITHUB_ENV 209 | echo "::set-output name=status::success" 210 | 211 | - name: Compressed kernel packages 212 | uses: thedoctor0/zip-release@master 213 | if: steps.environment.outputs.status == 'success' && steps.compile.outputs.status == 'success' && !cancelled() 214 | with: 215 | type: tar 216 | path: packages/ 217 | directory: ${{ env.UPLOAD_PATH }}/ 218 | filename: ${{ env.UPLOAD_PATH }}/OpenWrt_firmware_kernel_packages${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}.tar.gz 219 | 220 | - name: Compressed firmware packages 221 | uses: thedoctor0/zip-release@master 222 | if: steps.environment.outputs.status == 'success' && steps.compile.outputs.status == 'success' && !cancelled() 223 | with: 224 | type: tar 225 | path: packages/ 226 | directory: ${{ env.WORKSPACE_DIR }}/ 227 | filename: ${{ env.UPLOAD_PATH }}/OpenWrt_firmware_packages${{ env.DEVICE_NAME }}${{ env.FILE_DATE }}.tar.gz 228 | 229 | - name: Organize files 230 | id: organize 231 | if: env.UPLOAD_FIRMWARE == 'true' && steps.compile.outputs.status == 'success' && !cancelled() 232 | run: | 233 | cd openwrt/bin/targets/*/* 234 | rm -rf packages 235 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 236 | echo "::set-output name=status::success" 237 | 238 | - name: Upload firmware directory 239 | uses: actions/upload-artifact@main 240 | if: steps.organize.outputs.status == 'success' && !cancelled() 241 | with: 242 | name: OpenWrt_firmware${{ env.DEVICE_NAME }}${{ env.FILE_DATE }} 243 | path: ${{ env.FIRMWARE }} 244 | 245 | - name: Upload firmware to cowtransfer 246 | id: cowtransfer 247 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled() 248 | run: | 249 | curl -fsSL git.io/file-transfer | sh 250 | ./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log 251 | echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)" 252 | echo "::set-output name=url::$(cat cowtransfer.log | grep https | cut -f3 -d" ")" 253 | 254 | - name: Upload firmware to WeTransfer 255 | id: wetransfer 256 | if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled() 257 | run: | 258 | curl -fsSL git.io/file-transfer | sh 259 | ./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log 260 | echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)" 261 | echo "::set-output name=url::$(cat wetransfer.log | grep https | cut -f3 -d" ")" 262 | 263 | - name: Generate release tag 264 | id: tag 265 | if: env.UPLOAD_RELEASE == 'true' && steps.compile.outputs.status == 'success' && !cancelled() 266 | run: | 267 | touch release.txt 268 | [ $UPLOAD_COWTRANSFER = true ] && echo "🔗 [Cowtransfer](${{ steps.cowtransfer.outputs.url }})" >> release.txt 269 | [ $UPLOAD_WETRANSFER = true ] && echo "🔗 [WeTransfer](${{ steps.wetransfer.outputs.url }})" >> release.txt 270 | echo "::set-output name=status::success" 271 | 272 | - name: Upload firmware to release 273 | uses: softprops/action-gh-release@v1 274 | if: steps.tag.outputs.status == 'success' && !cancelled() 275 | env: 276 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 277 | with: 278 | tag_name: ${{ env.RELEASE_TAG }} 279 | body_path: release.txt 280 | files: ${{ env.FIRMWARE }}/* 281 | 282 | - name: Delete workflow runs 283 | uses: GitRML/delete-workflow-runs@main 284 | with: 285 | retain_days: 7 286 | keep_minimum_runs: 7 287 | 288 | - name: Remove old Releases 289 | uses: dev-drprasad/delete-older-releases@v0.1.0 290 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 291 | with: 292 | keep_latest: 7 293 | delete_tags: true 294 | env: 295 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 296 | -------------------------------------------------------------------------------- /.github/workflows/config_gene.yml: -------------------------------------------------------------------------------- 1 | name: r2s config 2 | 3 | on: 4 | repository_dispatch: 5 | workflow_dispatch: 6 | inputs: 7 | ssh: 8 | description: 'SSH connection to Actions' 9 | required: false 10 | default: 'true' 11 | type: choice 12 | options: 13 | - true 14 | - false 15 | 16 | 17 | env: 18 | REPO_URL: https://github.com/breeze303/openwrt-6.x.git 19 | REPO_BRANCH: main 20 | FEEDS_CONF: feeds.conf.default 21 | PATCHES_FILE_1: patches/0001-show-soc-status-on-luci.patch 22 | CONFIG_FILE: .config 23 | DIY_P1_SH: diy-part1.sh 24 | DIY_P2_SH: diy-part2.sh 25 | CLASH_KERNEL: amd64 26 | UPLOAD_BIN_DIR: false 27 | UPLOAD_FIRMWARE: true 28 | UPLOAD_COWTRANSFER: false 29 | UPLOAD_WETRANSFER: false 30 | UPLOAD_RELEASE: true 31 | TZ: Asia/Shanghai 32 | 33 | 34 | CONFIG: r2s 35 | 36 | 37 | jobs: 38 | build: 39 | runs-on: ubuntu-22.04 40 | 41 | steps: 42 | - name: 创建编译空间挂载点 43 | run: | 44 | sudo mkdir -p /workdir 45 | sudo chown $USER:$GROUPS /workdir 46 | 47 | - name: 最大化编译空间 48 | uses: easimon/maximize-build-space@master 49 | with: 50 | root-reserve-mb: 2048 51 | swap-size-mb: 1024 52 | build-mount-path: /workdir 53 | overprovision-lvm: 'true' 54 | remove-dotnet: 'true' 55 | remove-android: 'true' 56 | remove-haskell: 'true' 57 | remove-codeql: 'true' 58 | remove-docker-images: 'true' 59 | 60 | - name: Checkout 61 | uses: actions/checkout@v3 62 | 63 | - name: 检查服务器配置 64 | run: | 65 | echo "警告⚠" 66 | echo "分配的服务器性能有限,若选择的插件过多,务必注意CPU性能!" 67 | echo "云编译建议取消勾选Node.js及其相关插件!" 68 | echo "已知CPU型号(降序):8370C,8272CL,8171M,E5系列" 69 | echo "--------------------------CPU信息--------------------------" 70 | echo "CPU物理数量:$(cat /proc/cpuinfo| grep "physical id"| sort| uniq| wc -l)" 71 | echo -e "CPU核心及版本信息:$(cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c) \n" 72 | echo "--------------------------内存信息--------------------------" 73 | echo "已安装内存详细信息:" 74 | sudo lshw -short -C memory | grep GiB 75 | echo -e "\n" 76 | echo "--------------------------硬盘信息--------------------------" 77 | echo -e "硬盘数量:$(ls /dev/sd* | grep -v [1-9] | wc -l) \n" 78 | echo "硬盘详情:" 79 | df -Th 80 | 81 | - name: 初始化编译环境 82 | env: 83 | DEBIAN_FRONTEND: noninteractive 84 | run: | 85 | sudo rm -rf /usr/share/dotnet /etc/apt/sources.list.d /usr/local/lib/android $AGENT_TOOLSDIRECTORY 86 | sudo -E apt-get -y purge azure-cli ghc* zulu* llvm* firefox google* dotnet* powershell openjdk* mongodb* moby* || true 87 | sudo -E apt-get -y update 88 | sudo -E apt-get -y install $(curl -fsSL is.gd/depends_ubuntu_2204) 89 | sudo -E systemctl daemon-reload 90 | sudo -E apt-get -y autoremove --purge 91 | sudo -E apt-get -y clean 92 | sudo timedatectl set-timezone "$TZ" 93 | 94 | - name: Clone source code 95 | working-directory: /workdir 96 | run: | 97 | df -hT $PWD 98 | git clone $REPO_URL -b $REPO_BRANCH openwrt 99 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 100 | 101 | - name: cache 102 | if: github.event.inputs.cache == 'true' && github.event.inputs.cache != 'false' 103 | uses: klever1988/cachewrtbuild@main 104 | with: 105 | ccache: 'true' 106 | prefix: ${{ github.workspace }}/openwrt 107 | 108 | - name: Load custom feeds 109 | run: | 110 | [ -e $FEEDS_CONF ] && mv $FEEDS_CONF openwrt/feeds.conf.default 111 | chmod +x $DIY_P1_SH 112 | cd openwrt 113 | $GITHUB_WORKSPACE/$DIY_P1_SH 114 | 115 | - name: Update feeds 116 | run: cd openwrt && ./scripts/feeds update -a 117 | 118 | - name: Install feeds 119 | run: cd openwrt && ./scripts/feeds install -a -f 120 | 121 | #- name: Apply patches(安装补丁) 122 | # run: | 123 | # git config --global user.name "OpenWrt Builder" 124 | # git config --global user.email "buster-openwrt@ovvo.uk" 125 | #cp $PATCHES_FILE_1 openwrt/feeds/luci 126 | #cd openwrt/feeds/luci 127 | #git am 0001-show-soc-status-on-luci.patch 128 | 129 | - name: Openwrt AutoUpdate 130 | run: | 131 | TEMP=$(date +"OpenWrt_%Y%m%d_%H%M%S_")$(git rev-parse --short HEAD) 132 | echo "RELEASE_TAG=$TEMP" >> $GITHUB_ENV 133 | #required>>add "DISTRIB_GITHUB" to "zzz-default-settings" 134 | #sed -i "/DISTRIB_DESCRIPTION=/a\sed -i '/DISTRIB_GITHUB/d' /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings 135 | #sed -i "/DISTRIB_GITHUB/a\echo \"DISTRIB_GITHUB=\'https://github.com/${{github.repository}}\'\" >> /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings 136 | #required>>add "DISTRIB_VERSIONS" to "zzz-default-settings" 137 | #sed -i "/DISTRIB_DESCRIPTION=/a\sed -i '/DISTRIB_VERSIONS/d' /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings 138 | #sed -i "/DISTRIB_VERSIONS/a\echo \"DISTRIB_VERSIONS=\'${TEMP:8}\'\" >> /etc/openwrt_release" openwrt/package/lean/default-settings/files/zzz-default-settings 139 | #nonessential>>add "github.actor" to "DISTRIB_DESCRIPTION" in "zzz-default-settings" 140 | #sed -i "s/OpenWrt /${{github.actor}} compiled (${TEMP:8}) \/ OpenWrt /g" openwrt/package/lean/default-settings/files/zzz-default-settings 141 | 142 | - name: Load custom configuration 143 | run: | 144 | [ -e files ] && mv files openwrt/files 145 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE openwrt/.config 146 | chmod +x $DIY_P2_SH 147 | cd openwrt 148 | $GITHUB_WORKSPACE/$DIY_P2_SH 149 | #cat package/lean/default-settings/files/zzz-default-settings 150 | 151 | - name: SSH链接管理 152 | uses: P3TERX/ssh2actions@v1.0.0 153 | if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false') || contains(github.event.action, 'ssh') 154 | 155 | - name: 提取config 156 | id: organize 157 | if: env.UPLOAD_FIRMWARE == 'true' && !cancelled() 158 | run: | 159 | cd openwrt 160 | make defconfig 161 | ls -a 162 | sudo mkdir ${{ env.CONFIG }}config && sudo cp .config ${{ env.CONFIG }}config/${{ env.CONFIG }}.config 163 | cd ${{ env.CONFIG }}config 164 | ls 165 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 166 | echo "status=success" >> $GITHUB_OUTPUT 167 | echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV 168 | 169 | - name: 上传config 170 | uses: actions/upload-artifact@main 171 | if: steps.organize.outputs.status == 'success' && !cancelled() 172 | with: 173 | name: ${{ env.CONFIG }}_config${{ env.FILE_DATE }} 174 | path: ${{ env.FIRMWARE }} 175 | 176 | - name: 生成发布标签 177 | id: tag 178 | if: env.UPLOAD_RELEASE == 'true' && !cancelled() 179 | run: | 180 | echo "::set-output name=release_tag::$(date +"%Y.%m.%d-%H%M")" 181 | touch release.txt 182 | echo "status=success" >> $GITHUB_OUTPUT 183 | 184 | - name: 上传config文件并发布 185 | uses: softprops/action-gh-release@v1 186 | if: steps.tag.outputs.status == 'success' && !cancelled() 187 | env: 188 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 189 | with: 190 | tag_name: ${{ steps.tag.outputs.release_tag }} 191 | body_path: release.txt 192 | files: ${{ env.FIRMWARE }}/* 193 | -------------------------------------------------------------------------------- /.github/workflows/update-checker.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 Checker 13 | 14 | env: 15 | REPO_URL: https://github.com/coolsnowwolf/lede 16 | REPO_BRANCH: master 17 | 18 | on: 19 | workflow_dispatch: 20 | inputs: 21 | update: 22 | description: 'Forced Updating' 23 | required: false 24 | default: 'false' 25 | schedule: 26 | - cron: 0 16 */3 * * 27 | 28 | jobs: 29 | check: 30 | runs-on: ubuntu-latest 31 | 32 | steps: 33 | 34 | - name: Get Commit Hash 35 | id: getHash 36 | run: | 37 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH . 38 | echo "::set-output name=commitHash::$(git rev-parse HEAD)" 39 | 40 | - name: Compare Commit Hash 41 | id: cacheHash 42 | uses: actions/cache@v2 43 | with: 44 | path: .commitHash 45 | key: HEAD-${{ steps.getHash.outputs.commitHash }} 46 | 47 | - name: Save New Commit Hash 48 | if: steps.cacheHash.outputs.cache-hit != 'true' 49 | run: | 50 | echo ${{ steps.getHash.outputs.commitHash }} | tee .commitHash 51 | 52 | - name: Trigger build 53 | if: steps.cacheHash.outputs.cache-hit != 'true' || github.event.inputs.update == 'true' 54 | uses: peter-evans/repository-dispatch@v1 55 | with: 56 | token: ${{ secrets.ACTIONS_TRIGGER_PAT }} 57 | event-type: Source Code Update 58 | 59 | - name: Delete workflow runs 60 | uses: GitRML/delete-workflow-runs@main 61 | with: 62 | retain_days: 7 63 | keep_minimum_runs: 7 64 | -------------------------------------------------------------------------------- /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 | **English** | [中文](https://p3terx.com/archives/build-openwrt-with-github-actions.html) 2 | 3 | # Actions-OpenWrt 4 | 5 | [![LICENSE](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square&label=LICENSE)](https://github.com/P3TERX/Actions-OpenWrt/blob/master/LICENSE) 6 | ![GitHub Stars](https://img.shields.io/github/stars/P3TERX/Actions-OpenWrt.svg?style=flat-square&label=Stars&logo=github) 7 | ![GitHub Forks](https://img.shields.io/github/forks/P3TERX/Actions-OpenWrt.svg?style=flat-square&label=Forks&logo=github) 8 | 9 | A template for building OpenWrt with GitHub Actions 10 | 11 | ## Usage 12 | 13 | - Click the [Use this template](https://github.com/P3TERX/Actions-OpenWrt/generate) button to create a new repository. 14 | - Generate `.config` files using [Lean's OpenWrt](https://github.com/coolsnowwolf/lede) source code. ( You can change it through environment variables in the workflow file. ) 15 | - Push `.config` file to the GitHub repository. 16 | - Select `Build OpenWrt` on the Actions page. 17 | - Click the `Run workflow` button. 18 | - When the build is complete, click the `Artifacts` button in the upper right corner of the Actions page to download the binaries. 19 | 20 | ## Tips 21 | 22 | - It may take a long time to create a `.config` file and build the OpenWrt firmware. Thus, before create repository to build your own firmware, you may check out if others have already built it which meet your needs by simply [search `Actions-Openwrt` in GitHub](https://github.com/search?q=Actions-openwrt). 23 | - Add some meta info of your built firmware (such as firmware architecture and installed packages) to your repository introduction, this will save others' time. 24 | 25 | ## Credits 26 | 27 | - [Microsoft Azure](https://azure.microsoft.com) 28 | - [GitHub Actions](https://github.com/features/actions) 29 | - [OpenWrt](https://github.com/openwrt/openwrt) 30 | - [Lean's OpenWrt](https://github.com/coolsnowwolf/lede) 31 | - [tmate](https://github.com/tmate-io/tmate) 32 | - [mxschmitt/action-tmate](https://github.com/mxschmitt/action-tmate) 33 | - [csexton/debugger-action](https://github.com/csexton/debugger-action) 34 | - [Cowtransfer](https://cowtransfer.com) 35 | - [WeTransfer](https://wetransfer.com/) 36 | - [Mikubill/transfer](https://github.com/Mikubill/transfer) 37 | - [softprops/action-gh-release](https://github.com/softprops/action-gh-release) 38 | - [ActionsRML/delete-workflow-runs](https://github.com/ActionsRML/delete-workflow-runs) 39 | - [dev-drprasad/delete-older-releases](https://github.com/dev-drprasad/delete-older-releases) 40 | - [peter-evans/repository-dispatch](https://github.com/peter-evans/repository-dispatch) 41 | 42 | ## License 43 | 44 | [MIT](https://github.com/P3TERX/Actions-OpenWrt/blob/main/LICENSE) © [**P3TERX**](https://p3terx.com) 45 | -------------------------------------------------------------------------------- /diy-part1.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019-2020 P3TERX 4 | # 5 | # This is free software, licensed under the MIT License. 6 | # See /LICENSE for more information. 7 | # 8 | # https://github.com/P3TERX/Actions-OpenWrt 9 | # File name: diy-part1.sh 10 | # Description: OpenWrt DIY script part 1 (Before Update feeds) 11 | # 12 | 13 | # Uncomment a feed source 14 | #sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default 15 | #sed -i '$a src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default 16 | #sed -i '$a src-git kenzo https://github.com//kiddin9/openwrt-packages' feeds.conf.default 17 | #rm -rf feeds/packages/net/{xray-core,v2ray-core,v2ray-geodata,sing-box} 18 | 19 | #git clone https://github.com/kiddin9/openwrt-packages 20 | #shopt -s extglob 21 | #rm -rf openwrt-packages/!luci-app-netdata 22 | #cp -r openwrt-packages/luci-app-netdata package/ 23 | #rm -rf openwrt-packages 24 | 25 | sed -i '1i src-git kenzo https://github.com/kenzok8/openwrt-packages' feeds.conf.default 26 | sed -i '2i src-git small https://github.com/kenzok8/small' feeds.conf.default 27 | 28 | ./scripts/feeds update -a && rm -rf feeds/luci/applications/luci-app-mosdns 29 | rm -rf feeds/packages/net/{alist,adguardhome,mosdns,xray*,v2ray*,v2ray*,sing*,smartdns} 30 | rm -rf feeds/packages/utils/v2dat 31 | rm -rf feeds/packages/lang/golang 32 | git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 33 | ./scripts/feeds install -a 34 | 35 | 36 | git clone https://github.com/f8q8/luci-app-autoreboot package/luci-app-autoreboot 37 | 38 | #克隆passwall环境插件 39 | git clone https://github.com/xiaorouji/openwrt-passwall-packages package/helloworld 40 | #git clone --depth=1 -b 18.06 https://github.com/kiddin9/luci-theme-edge package/luci-theme-edge 41 | #git clone --depth=1 https://github.com/derisamedia/luci-theme-alpha package/luci-theme-alpha 42 | #克隆的源码放在small文件夹,预先建立small文件夹 43 | mkdir package/small 44 | pushd package/small 45 | 46 | #克隆源码 47 | 48 | #passwall2 49 | #git clone -b main --depth 1 https://github.com/xiaorouji/openwrt-passwall2.git 50 | #git clone -b luci-smartdns-dev --depth 1 https://github.com/xiaorouji/openwrt-passwall.git 51 | git clone -b main --depth 1 https://github.com/xiaorouji/openwrt-passwall.git 52 | git clone --depth=1 -b master https://github.com/jerrykuku/luci-theme-argon package/luci-theme-argon 53 | git clone --depth=1 -b master https://github.com/jerrykuku/luci-app-argon-config package/luci-app-argon-config 54 | #mosdns 55 | #git clone -b v5 --depth 1 https://github.com/sbwml/luci-app-mosdns.git 56 | #git clone --depth=1 https://github.com/fw876/helloworld.git 57 | 58 | popd 59 | -------------------------------------------------------------------------------- /diy-part2.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright (c) 2019-2020 P3TERX 4 | # 5 | # This is free software, licensed under the MIT License. 6 | # See /LICENSE for more information. 7 | # 8 | # https://github.com/P3TERX/Actions-OpenWrt 9 | # File name: diy-part2.sh 10 | # Description: OpenWrt DIY script part 2 (After Update feeds) 11 | # 12 | 13 | 14 | 15 | 16 | #替换为新版本golang 17 | #rm -rf feeds/packages/lang/golang 18 | #git clone https://github.com/kenzok8/golang feeds/packages/lang/golang 19 | #./scripts/feeds install -a -f 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part1.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinCSDN/Openwrt_Ax1800pro_jdc/9bbae3a41c4017b4237ba143a813b0664ce68f98/istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part1.rar -------------------------------------------------------------------------------- /istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part2.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinCSDN/Openwrt_Ax1800pro_jdc/9bbae3a41c4017b4237ba143a813b0664ce68f98/istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part2.rar -------------------------------------------------------------------------------- /istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part3.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinCSDN/Openwrt_Ax1800pro_jdc/9bbae3a41c4017b4237ba143a813b0664ce68f98/istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-kernel-rootfs.part3.rar -------------------------------------------------------------------------------- /istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part1.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinCSDN/Openwrt_Ax1800pro_jdc/9bbae3a41c4017b4237ba143a813b0664ce68f98/istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part1.rar -------------------------------------------------------------------------------- /istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part2.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinCSDN/Openwrt_Ax1800pro_jdc/9bbae3a41c4017b4237ba143a813b0664ce68f98/istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part2.rar -------------------------------------------------------------------------------- /istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part3.rar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinCSDN/Openwrt_Ax1800pro_jdc/9bbae3a41c4017b4237ba143a813b0664ce68f98/istoreos固件/istoreos-ipq60xx-23.09.09-jdcloud_ax1800_pro-squashfs-sysupgrade.part3.rar -------------------------------------------------------------------------------- /patches/0001-show-soc-status-on-luci.patch: -------------------------------------------------------------------------------- 1 | From 6607061537b4007182f51d31ba4af3427082d45c Mon Sep 17 00:00:00 2001 2 | From: pexcn 3 | Date: Sun, 3 Mar 2024 15:31:06 +0800 4 | Subject: [PATCH] show soc status on luci 5 | 6 | Signed-off-by: pexcn 7 | --- 8 | modules/luci-base/root/sbin/soc-status | 63 +++++++++++++++++++ 9 | .../luci-base/root/usr/share/rpcd/ucode/luci | 51 +++++++++++++++ 10 | .../view/status/include/10_system.js | 30 ++++++++- 11 | .../usr/share/rpcd/acl.d/luci-mod-status.json | 2 +- 12 | 4 files changed, 142 insertions(+), 4 deletions(-) 13 | create mode 100755 modules/luci-base/root/sbin/soc-status 14 | 15 | diff --git a/modules/luci-base/root/sbin/soc-status b/modules/luci-base/root/sbin/soc-status 16 | new file mode 100755 17 | index 0000000000..467b3247bf 18 | --- /dev/null 19 | +++ b/modules/luci-base/root/sbin/soc-status 20 | @@ -0,0 +1,63 @@ 21 | +#!/bin/sh 22 | +# shellcheck disable=SC2155 23 | + 24 | +get_cpu_freq() { 25 | + local value="$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq 2>/dev/null)" 26 | + [ -n "$value" ] || value="0" 27 | + echo "$value" 28 | +} 29 | + 30 | +get_cpu_governor() { 31 | + local value="$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor 2>/dev/null)" 32 | + [ -n "$value" ] || value="unknown" 33 | + echo "$value" 34 | +} 35 | + 36 | +get_cpu_temp() { 37 | + local value="$(cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null | sort -n | tail -1)" 38 | + [ -n "$value" ] || value="-1" 39 | + echo "$value" 40 | +} 41 | + 42 | +get_wifi_temp() { 43 | + local value="$(cat /sys/class/ieee80211/phy*/hwmon*/temp*_input 2>/dev/null | sort -n | tail -1)" 44 | + [ -n "$value" ] || value="-1" 45 | + echo "$value" 46 | +} 47 | + 48 | +get_cpu_usage() { 49 | + local value="$(top -b -n1 | awk '/^CPU/ { print 100-$8 }')" 50 | + [ -n "$value" ] || value="-1" 51 | + echo "$value" 52 | +} 53 | + 54 | +get_nss_usage() { 55 | + local value="$(grep '%' /sys/kernel/debug/qca-nss-drv/stats/cpu_load_ubi 2>/dev/null | awk '{print $2}' | sed 's/%//')" 56 | + [ -n "$value" ] || value="-1" 57 | + echo "$value" 58 | +} 59 | + 60 | +case "$1" in 61 | + cpu_freq) 62 | + get_cpu_freq 63 | + ;; 64 | + cpu_governor) 65 | + get_cpu_governor 66 | + ;; 67 | + cpu_temp) 68 | + get_cpu_temp | awk '{ printf("%.1f\n", $1/1000) }' 69 | + ;; 70 | + wifi_temp) 71 | + get_wifi_temp | awk '{ printf("%.1f\n", $1/1000) }' 72 | + ;; 73 | + cpu_usage) 74 | + get_cpu_usage 75 | + ;; 76 | + nss_usage) 77 | + get_nss_usage 78 | + ;; 79 | + *) 80 | + echo "Usage: $0 {cpu_freq|cpu_governor|cpu_temp|wifi_temp|cpu_usage|nss_usage}" 81 | + exit 1 82 | + ;; 83 | +esac 84 | diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci 85 | index 3c4fea4691..abccca886e 100644 86 | --- a/modules/luci-base/root/usr/share/rpcd/ucode/luci 87 | +++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci 88 | @@ -581,6 +581,57 @@ const methods = { 89 | 90 | return { result: ports }; 91 | } 92 | + }, 93 | + 94 | + getCoreInfo: { 95 | + call: function() { 96 | + let fd; 97 | + let result = {}; 98 | + 99 | + fd = popen('soc-status cpu_freq'); 100 | + result.cpufreq = trim(fd.read('all')); 101 | + fd.close(); 102 | + 103 | + fd = popen('soc-status cpu_governor'); 104 | + result.governor = trim(fd.read('all')); 105 | + fd.close(); 106 | + 107 | + return result; 108 | + } 109 | + }, 110 | + 111 | + getCoreTemp: { 112 | + call: function() { 113 | + let fd; 114 | + let result = {}; 115 | + 116 | + fd = popen('soc-status cpu_temp'); 117 | + result.cpu = trim(fd.read('all')); 118 | + fd.close(); 119 | + 120 | + fd = popen('soc-status wifi_temp'); 121 | + result.wifi = trim(fd.read('all')); 122 | + fd.close(); 123 | + 124 | + return result; 125 | + } 126 | + }, 127 | + 128 | + getCoreUsage: { 129 | + call: function() { 130 | + let fd; 131 | + let result = {}; 132 | + 133 | + fd = popen('soc-status cpu_usage'); 134 | + result.cpu = trim(fd.read('all')); 135 | + fd.close(); 136 | + 137 | + fd = popen('soc-status nss_usage'); 138 | + result.nss = trim(fd.read('all')); 139 | + fd.close(); 140 | + 141 | + return result; 142 | + } 143 | } 144 | }; 145 | 146 | diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 147 | index 45f7b4acae..032f74bdd4 100644 148 | --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 149 | +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 150 | @@ -8,6 +8,21 @@ var callLuciVersion = rpc.declare({ 151 | method: 'getVersion' 152 | }); 153 | 154 | +var callCoreInfo = rpc.declare({ 155 | + object: 'luci', 156 | + method: 'getCoreInfo' 157 | +}); 158 | + 159 | +var callCoreTemp = rpc.declare({ 160 | + object: 'luci', 161 | + method: 'getCoreTemp' 162 | +}); 163 | + 164 | +var callCoreUsage = rpc.declare({ 165 | + object: 'luci', 166 | + method: 'getCoreUsage' 167 | +}); 168 | + 169 | var callSystemBoard = rpc.declare({ 170 | object: 'system', 171 | method: 'board' 172 | @@ -25,14 +40,20 @@ return baseclass.extend({ 173 | return Promise.all([ 174 | L.resolveDefault(callSystemBoard(), {}), 175 | L.resolveDefault(callSystemInfo(), {}), 176 | - L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }) 177 | + L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }), 178 | + L.resolveDefault(callCoreInfo(), {}), 179 | + L.resolveDefault(callCoreTemp(), {}), 180 | + L.resolveDefault(callCoreUsage(), {}) 181 | ]); 182 | }, 183 | 184 | render: function(data) { 185 | var boardinfo = data[0], 186 | systeminfo = data[1], 187 | - luciversion = data[2]; 188 | + luciversion = data[2], 189 | + coreinfo = data[3], 190 | + coretemp = data[4], 191 | + coreusage = data[5]; 192 | 193 | luciversion = luciversion.branch + ' ' + luciversion.revision; 194 | 195 | @@ -64,7 +85,10 @@ return baseclass.extend({ 196 | systeminfo.load[0] / 65535.0, 197 | systeminfo.load[1] / 65535.0, 198 | systeminfo.load[2] / 65535.0 199 | - ) : null 200 | + ) : null, 201 | + _('核心频率'), coreinfo.cpufreq / 1000 + ' MHz ' + '(' + coreinfo.governor + ')', 202 | + _('核心温度'), 'CPU ' + coretemp.cpu + ' °C' + ' / ' + 'WiFi ' + coretemp.wifi + ' °C', 203 | + _('使用率'), 'CPU ' + coreusage.cpu + '%' + ' / ' + 'NSS ' + coreusage.nss + '%' 204 | ]; 205 | 206 | var table = E('table', { 'class': 'table' }); 207 | diff --git a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 208 | index 45dd7d7d9e..8f60a1eda8 100644 209 | --- a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 210 | +++ b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 211 | @@ -3,7 +3,7 @@ 212 | "description": "Grant access to realtime statistics", 213 | "read": { 214 | "ubus": { 215 | - "luci": [ "getConntrackList", "getRealtimeStats" ], 216 | + "luci": [ "getConntrackList", "getRealtimeStats", "getCoreInfo", "getCoreTemp", "getCoreUsage" ], 217 | "network.rrdns": [ "lookup" ] 218 | } 219 | } 220 | -- 221 | 2.39.2 222 | 223 | -------------------------------------------------------------------------------- /patches/0002-show-soc-status-on-luci.patch: -------------------------------------------------------------------------------- 1 | From d36f3bcef56a912b04670680e41cc4c729848ef1 Mon Sep 17 00:00:00 2001 2 | From: pexcn 3 | Date: Sun, 3 Mar 2024 15:31:06 +0800 4 | Subject: [PATCH] show soc status on luci 5 | 6 | Signed-off-by: pexcn 7 | 8 | 123 9 | 10 | fix bugs 11 | --- 12 | modules/luci-base/root/sbin/soc-status | 36 +++++++++++++++++++ 13 | .../luci-base/root/usr/share/rpcd/ucode/luci | 30 ++++++++++++++++ 14 | .../view/status/include/10_system.js | 22 ++++++++++-- 15 | .../usr/share/rpcd/acl.d/luci-mod-status.json | 2 +- 16 | 4 files changed, 86 insertions(+), 4 deletions(-) 17 | create mode 100755 modules/luci-base/root/sbin/soc-status 18 | 19 | diff --git a/modules/luci-base/root/sbin/soc-status b/modules/luci-base/root/sbin/soc-status 20 | new file mode 100755 21 | index 0000000..1c173f7 22 | --- /dev/null 23 | +++ b/modules/luci-base/root/sbin/soc-status 24 | @@ -0,0 +1,36 @@ 25 | +#!/bin/sh 26 | +# shellcheck disable=SC2155 27 | + 28 | +get_cpu_temp() { 29 | + local value="$(cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null | sort -n | tail -1)" 30 | + [ -n "$value" ] || value="-1" 31 | + echo "$value" 32 | +} 33 | + 34 | +get_cpu_usage() { 35 | + local value="$(top -b -n1 | awk '/^CPU/ { print 100-$8 }')" 36 | + [ -n "$value" ] || value="-1" 37 | + echo "$value" 38 | +} 39 | + 40 | +get_nss_usage() { 41 | + local value="$(grep '%' /sys/kernel/debug/qca-nss-drv/stats/cpu_load_ubi 2>/dev/null | awk '{print $2}' | sed 's/%//')" 42 | + [ -n "$value" ] || value="-1" 43 | + echo "$value" 44 | +} 45 | + 46 | +case "$1" in 47 | + cpu_temp) 48 | + get_cpu_temp | awk '{ printf("%.1f\n", $1/1000) }' 49 | + ;; 50 | + cpu_usage) 51 | + get_cpu_usage 52 | + ;; 53 | + nss_usage) 54 | + get_nss_usage 55 | + ;; 56 | + *) 57 | + echo "Usage: $0 {cpu_temp|cpu_usage|nss_usage}" 58 | + exit 1 59 | + ;; 60 | +esac 61 | diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci 62 | index 3c4fea4..7935b43 100644 63 | --- a/modules/luci-base/root/usr/share/rpcd/ucode/luci 64 | +++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci 65 | @@ -581,6 +581,36 @@ const methods = { 66 | 67 | return { result: ports }; 68 | } 69 | + }, 70 | + 71 | + getCoreTemp: { 72 | + call: function() { 73 | + let fd; 74 | + let result = {}; 75 | + 76 | + fd = popen('soc-status cpu_temp'); 77 | + result.cpu = trim(fd.read('all')); 78 | + fd.close(); 79 | + 80 | + return result; 81 | + } 82 | + }, 83 | + 84 | + getCoreUsage: { 85 | + call: function() { 86 | + let fd; 87 | + let result = {}; 88 | + 89 | + fd = popen('soc-status cpu_usage'); 90 | + result.cpu = trim(fd.read('all')); 91 | + fd.close(); 92 | + 93 | + fd = popen('soc-status nss_usage'); 94 | + result.nss = trim(fd.read('all')); 95 | + fd.close(); 96 | + 97 | + return result; 98 | + } 99 | } 100 | }; 101 | 102 | diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 103 | index 45f7b4a..b83955c 100644 104 | --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 105 | +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 106 | @@ -8,6 +8,16 @@ var callLuciVersion = rpc.declare({ 107 | method: 'getVersion' 108 | }); 109 | 110 | +var callCoreTemp = rpc.declare({ 111 | + object: 'luci', 112 | + method: 'getCoreTemp' 113 | +}); 114 | + 115 | +var callCoreUsage = rpc.declare({ 116 | + object: 'luci', 117 | + method: 'getCoreUsage' 118 | +}); 119 | + 120 | var callSystemBoard = rpc.declare({ 121 | object: 'system', 122 | method: 'board' 123 | @@ -25,14 +35,18 @@ return baseclass.extend({ 124 | return Promise.all([ 125 | L.resolveDefault(callSystemBoard(), {}), 126 | L.resolveDefault(callSystemInfo(), {}), 127 | - L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }) 128 | + L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }), 129 | + L.resolveDefault(callCoreTemp(), {}), 130 | + L.resolveDefault(callCoreUsage(), {}) 131 | ]); 132 | }, 133 | 134 | render: function(data) { 135 | var boardinfo = data[0], 136 | systeminfo = data[1], 137 | - luciversion = data[2]; 138 | + luciversion = data[2], 139 | + coretemp = data[3], 140 | + coreusage = data[4]; 141 | 142 | luciversion = luciversion.branch + ' ' + luciversion.revision; 143 | 144 | @@ -64,7 +78,9 @@ return baseclass.extend({ 145 | systeminfo.load[0] / 65535.0, 146 | systeminfo.load[1] / 65535.0, 147 | systeminfo.load[2] / 65535.0 148 | - ) : null 149 | + ) : null, 150 | + _('核心温度'), 'CPU ' + coretemp.cpu + ' °C', 151 | + _('使用率'), 'CPU ' + coreusage.cpu + '%' + ' / ' + 'NSS ' + coreusage.nss + '%' 152 | ]; 153 | 154 | var table = E('table', { 'class': 'table' }); 155 | diff --git a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 156 | index 45dd7d7..127daa5 100644 157 | --- a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 158 | +++ b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 159 | @@ -3,7 +3,7 @@ 160 | "description": "Grant access to realtime statistics", 161 | "read": { 162 | "ubus": { 163 | - "luci": [ "getConntrackList", "getRealtimeStats" ], 164 | + "luci": [ "getConntrackList", "getRealtimeStats", "getCoreTemp", "getCoreUsage" ], 165 | "network.rrdns": [ "lookup" ] 166 | } 167 | } 168 | -- 169 | 2.34.1 170 | 171 | -------------------------------------------------------------------------------- /patches/0003-add-coremark-luci.patch: -------------------------------------------------------------------------------- 1 | From 583ceb5c495074b8d18344e95f6c58269c6427ba Mon Sep 17 00:00:00 2001 2 | From: breeze303 3 | Date: Wed, 8 May 2024 21:57:11 +0800 4 | Subject: [PATCH] add-coremark-luci 5 | 6 | --- 7 | 0002-show-soc-status-on-luci.patch | 170 ++++++++++++++++++ 8 | .../luci-base/root/usr/share/rpcd/ucode/luci | 6 + 9 | .../view/status/include/10_system.js | 13 +- 10 | .../usr/share/rpcd/acl.d/luci-mod-status.json | 2 +- 11 | 4 files changed, 187 insertions(+), 4 deletions(-) 12 | create mode 100644 0002-show-soc-status-on-luci.patch 13 | 14 | diff --git a/0002-show-soc-status-on-luci.patch b/0002-show-soc-status-on-luci.patch 15 | new file mode 100644 16 | index 0000000..ee003ca 17 | --- /dev/null 18 | +++ b/0002-show-soc-status-on-luci.patch 19 | @@ -0,0 +1,170 @@ 20 | +From d36f3bcef56a912b04670680e41cc4c729848ef1 Mon Sep 17 00:00:00 2001 21 | +From: pexcn 22 | +Date: Sun, 3 Mar 2024 15:31:06 +0800 23 | +Subject: [PATCH] show soc status on luci 24 | + 25 | +Signed-off-by: pexcn 26 | + 27 | +123 28 | + 29 | +fix bugs 30 | +--- 31 | + modules/luci-base/root/sbin/soc-status | 36 +++++++++++++++++++ 32 | + .../luci-base/root/usr/share/rpcd/ucode/luci | 30 ++++++++++++++++ 33 | + .../view/status/include/10_system.js | 22 ++++++++++-- 34 | + .../usr/share/rpcd/acl.d/luci-mod-status.json | 2 +- 35 | + 4 files changed, 86 insertions(+), 4 deletions(-) 36 | + create mode 100755 modules/luci-base/root/sbin/soc-status 37 | + 38 | +diff --git a/modules/luci-base/root/sbin/soc-status b/modules/luci-base/root/sbin/soc-status 39 | +new file mode 100755 40 | +index 0000000..1c173f7 41 | +--- /dev/null 42 | ++++ b/modules/luci-base/root/sbin/soc-status 43 | +@@ -0,0 +1,36 @@ 44 | ++#!/bin/sh 45 | ++# shellcheck disable=SC2155 46 | ++ 47 | ++get_cpu_temp() { 48 | ++ local value="$(cat /sys/class/thermal/thermal_zone*/temp 2>/dev/null | sort -n | tail -1)" 49 | ++ [ -n "$value" ] || value="-1" 50 | ++ echo "$value" 51 | ++} 52 | ++ 53 | ++get_cpu_usage() { 54 | ++ local value="$(top -b -n1 | awk '/^CPU/ { print 100-$8 }')" 55 | ++ [ -n "$value" ] || value="-1" 56 | ++ echo "$value" 57 | ++} 58 | ++ 59 | ++get_nss_usage() { 60 | ++ local value="$(grep '%' /sys/kernel/debug/qca-nss-drv/stats/cpu_load_ubi 2>/dev/null | awk '{print $2}' | sed 's/%//')" 61 | ++ [ -n "$value" ] || value="-1" 62 | ++ echo "$value" 63 | ++} 64 | ++ 65 | ++case "$1" in 66 | ++ cpu_temp) 67 | ++ get_cpu_temp | awk '{ printf("%.1f\n", $1/1000) }' 68 | ++ ;; 69 | ++ cpu_usage) 70 | ++ get_cpu_usage 71 | ++ ;; 72 | ++ nss_usage) 73 | ++ get_nss_usage 74 | ++ ;; 75 | ++ *) 76 | ++ echo "Usage: $0 {cpu_temp|cpu_usage|nss_usage}" 77 | ++ exit 1 78 | ++ ;; 79 | ++esac 80 | +diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci 81 | +index 3c4fea4..7935b43 100644 82 | +--- a/modules/luci-base/root/usr/share/rpcd/ucode/luci 83 | ++++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci 84 | +@@ -581,6 +581,36 @@ const methods = { 85 | + 86 | + return { result: ports }; 87 | + } 88 | ++ }, 89 | ++ 90 | ++ getCoreTemp: { 91 | ++ call: function() { 92 | ++ let fd; 93 | ++ let result = {}; 94 | ++ 95 | ++ fd = popen('soc-status cpu_temp'); 96 | ++ result.cpu = trim(fd.read('all')); 97 | ++ fd.close(); 98 | ++ 99 | ++ return result; 100 | ++ } 101 | ++ }, 102 | ++ 103 | ++ getCoreUsage: { 104 | ++ call: function() { 105 | ++ let fd; 106 | ++ let result = {}; 107 | ++ 108 | ++ fd = popen('soc-status cpu_usage'); 109 | ++ result.cpu = trim(fd.read('all')); 110 | ++ fd.close(); 111 | ++ 112 | ++ fd = popen('soc-status nss_usage'); 113 | ++ result.nss = trim(fd.read('all')); 114 | ++ fd.close(); 115 | ++ 116 | ++ return result; 117 | ++ } 118 | + } 119 | + }; 120 | + 121 | +diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 122 | +index 45f7b4a..b83955c 100644 123 | +--- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 124 | ++++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 125 | +@@ -8,6 +8,16 @@ var callLuciVersion = rpc.declare({ 126 | + method: 'getVersion' 127 | + }); 128 | + 129 | ++var callCoreTemp = rpc.declare({ 130 | ++ object: 'luci', 131 | ++ method: 'getCoreTemp' 132 | ++}); 133 | ++ 134 | ++var callCoreUsage = rpc.declare({ 135 | ++ object: 'luci', 136 | ++ method: 'getCoreUsage' 137 | ++}); 138 | ++ 139 | + var callSystemBoard = rpc.declare({ 140 | + object: 'system', 141 | + method: 'board' 142 | +@@ -25,14 +35,18 @@ return baseclass.extend({ 143 | + return Promise.all([ 144 | + L.resolveDefault(callSystemBoard(), {}), 145 | + L.resolveDefault(callSystemInfo(), {}), 146 | +- L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }) 147 | ++ L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }), 148 | ++ L.resolveDefault(callCoreTemp(), {}), 149 | ++ L.resolveDefault(callCoreUsage(), {}) 150 | + ]); 151 | + }, 152 | + 153 | + render: function(data) { 154 | + var boardinfo = data[0], 155 | + systeminfo = data[1], 156 | +- luciversion = data[2]; 157 | ++ luciversion = data[2], 158 | ++ coretemp = data[3], 159 | ++ coreusage = data[4]; 160 | + 161 | + luciversion = luciversion.branch + ' ' + luciversion.revision; 162 | + 163 | +@@ -64,7 +78,9 @@ return baseclass.extend({ 164 | + systeminfo.load[0] / 65535.0, 165 | + systeminfo.load[1] / 65535.0, 166 | + systeminfo.load[2] / 65535.0 167 | +- ) : null 168 | ++ ) : null, 169 | ++ _('核心温度'), 'CPU ' + coretemp.cpu + ' °C', 170 | ++ _('使用率'), 'CPU ' + coreusage.cpu + '%' + ' / ' + 'NSS ' + coreusage.nss + '%' 171 | + ]; 172 | + 173 | + var table = E('table', { 'class': 'table' }); 174 | +diff --git a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 175 | +index 45dd7d7..127daa5 100644 176 | +--- a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 177 | ++++ b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 178 | +@@ -3,7 +3,7 @@ 179 | + "description": "Grant access to realtime statistics", 180 | + "read": { 181 | + "ubus": { 182 | +- "luci": [ "getConntrackList", "getRealtimeStats" ], 183 | ++ "luci": [ "getConntrackList", "getRealtimeStats", "getCoreTemp", "getCoreUsage" ], 184 | + "network.rrdns": [ "lookup" ] 185 | + } 186 | + } 187 | +-- 188 | +2.34.1 189 | + 190 | diff --git a/modules/luci-base/root/usr/share/rpcd/ucode/luci b/modules/luci-base/root/usr/share/rpcd/ucode/luci 191 | index 7935b43..b3dc6d3 100644 192 | --- a/modules/luci-base/root/usr/share/rpcd/ucode/luci 193 | +++ b/modules/luci-base/root/usr/share/rpcd/ucode/luci 194 | @@ -583,6 +583,12 @@ const methods = { 195 | } 196 | }, 197 | 198 | + getCPUBench: { 199 | + call: function() { 200 | + return { cpubench: readfile('/etc/bench.log') || '' }; 201 | + } 202 | + }, 203 | + 204 | getCoreTemp: { 205 | call: function() { 206 | let fd; 207 | diff --git a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 208 | index b83955c..19949e2 100644 209 | --- a/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 210 | +++ b/modules/luci-mod-status/htdocs/luci-static/resources/view/status/include/10_system.js 211 | @@ -8,6 +8,11 @@ var callLuciVersion = rpc.declare({ 212 | method: 'getVersion' 213 | }); 214 | 215 | +var callCPUBench = rpc.declare({ 216 | + object: 'luci', 217 | + method: 'getCPUBench' 218 | +}); 219 | + 220 | var callCoreTemp = rpc.declare({ 221 | object: 'luci', 222 | method: 'getCoreTemp' 223 | @@ -36,6 +41,7 @@ return baseclass.extend({ 224 | L.resolveDefault(callSystemBoard(), {}), 225 | L.resolveDefault(callSystemInfo(), {}), 226 | L.resolveDefault(callLuciVersion(), { revision: _('unknown version'), branch: 'LuCI' }), 227 | + L.resolveDefault(callCPUBench(), {}), 228 | L.resolveDefault(callCoreTemp(), {}), 229 | L.resolveDefault(callCoreUsage(), {}) 230 | ]); 231 | @@ -45,8 +51,9 @@ return baseclass.extend({ 232 | var boardinfo = data[0], 233 | systeminfo = data[1], 234 | luciversion = data[2], 235 | - coretemp = data[3], 236 | - coreusage = data[4]; 237 | + cpubench = data[3], 238 | + coretemp = data[4], 239 | + coreusage = data[5]; 240 | 241 | luciversion = luciversion.branch + ' ' + luciversion.revision; 242 | 243 | @@ -67,7 +74,7 @@ return baseclass.extend({ 244 | 245 | var fields = [ 246 | _('Hostname'), boardinfo.hostname, 247 | - _('Model'), boardinfo.model, 248 | + _('Model'), boardinfo.model + cpubench.cpubench, 249 | _('Architecture'), boardinfo.system, 250 | _('Target Platform'), (L.isObject(boardinfo.release) ? boardinfo.release.target : ''), 251 | _('Firmware Version'), (L.isObject(boardinfo.release) ? boardinfo.release.description + ' / ' : '') + (luciversion || ''), 252 | diff --git a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 253 | index 127daa5..51984d4 100644 254 | --- a/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 255 | +++ b/modules/luci-mod-status/root/usr/share/rpcd/acl.d/luci-mod-status.json 256 | @@ -3,7 +3,7 @@ 257 | "description": "Grant access to realtime statistics", 258 | "read": { 259 | "ubus": { 260 | - "luci": [ "getConntrackList", "getRealtimeStats", "getCoreTemp", "getCoreUsage" ], 261 | + "luci": [ "getConntrackList", "getRealtimeStats", "getCPUBench","getCoreTemp", "getCoreUsage" ], 262 | "network.rrdns": [ "lookup" ] 263 | } 264 | } 265 | -- 266 | 2.34.1 267 | 268 | -------------------------------------------------------------------------------- /patches/0004-add-coremark-packages.patch: -------------------------------------------------------------------------------- 1 | From babdea674a730cf6df059d60bfab281767d4740f Mon Sep 17 00:00:00 2001 2 | From: breeze303 3 | Date: Wed, 8 May 2024 22:10:07 +0800 4 | Subject: [PATCH] add-coremark-packages 5 | 6 | --- 7 | utils/coremark/coremark | 7 +++++++ 8 | utils/coremark/coremark.sh | 12 ++++++++++++ 9 | 2 files changed, 19 insertions(+) 10 | create mode 100644 utils/coremark/coremark 11 | create mode 100644 utils/coremark/coremark.sh 12 | 13 | diff --git a/utils/coremark/coremark b/utils/coremark/coremark 14 | new file mode 100644 15 | index 000000000..2fcdd544b 16 | --- /dev/null 17 | +++ b/utils/coremark/coremark 18 | @@ -0,0 +1,7 @@ 19 | +#!/bin/sh 20 | + 21 | +sed -i '/coremark/d' /etc/crontabs/root 22 | +echo "0 4 * * * /etc/coremark.sh" >> /etc/crontabs/root 23 | +crontab /etc/crontabs/root 24 | + 25 | +touch /etc/bench.log 26 | \ No newline at end of file 27 | diff --git a/utils/coremark/coremark.sh b/utils/coremark/coremark.sh 28 | new file mode 100644 29 | index 000000000..e581b7c92 30 | --- /dev/null 31 | +++ b/utils/coremark/coremark.sh 32 | @@ -0,0 +1,12 @@ 33 | +#!/bin/sh 34 | + 35 | +/bin/coremark > /tmp/coremark.log 36 | + 37 | +cat /tmp/coremark.log | grep "CoreMark 1.0" | cut -d "/" -f 1 > /etc/bench.log 38 | +sed -i 's/CoreMark 1.0/ (CpuMark/g' /etc/bench.log 39 | +echo " Scores)" >> /etc/bench.log 40 | + 41 | +if [ -f "/etc/bench.log" ]; then 42 | + sed -i '/coremark/d' /etc/crontabs/root 43 | + crontab /etc/crontabs/root 44 | +fi 45 | \ No newline at end of file 46 | -- 47 | 2.34.1 48 | 49 | -------------------------------------------------------------------------------- /scripts/011-fix-mbo-modules-build.patch: -------------------------------------------------------------------------------- 1 | From d65ef1d0ddf9a0e7e7d6fb9d4c9d3319d2b311f1 Mon Sep 17 00:00:00 2001 2 | From: W_Y_CPP <383152993@qq.com> 3 | Date: Sun, 28 May 2023 13:44:07 +0900 4 | Subject: [PATCH] fix build 5 | 6 | --- 7 | wpa_supplicant/Makefile | 1 + 8 | 1 file changed, 1 insertion(+) 9 | 10 | diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile 11 | index ef36b56..55f0c76 100644 12 | --- a/wpa_supplicant/Makefile 13 | +++ b/wpa_supplicant/Makefile 14 | @@ -339,6 +339,7 @@ endif 15 | 16 | ifdef CONFIG_MBO 17 | CONFIG_WNM=y 18 | +NEED_GAS=y 19 | endif 20 | 21 | ifdef CONFIG_WNM 22 | -- 23 | 2.17.1 24 | -------------------------------------------------------------------------------- /scripts/init-settings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Set default theme to luci-theme-argon 4 | uci set luci.main.mediaurlbase='/luci-static/argon' 5 | uci commit luci 6 | 7 | # Disable IPV6 ula prefix 8 | # sed -i 's/^[^#].*option ula/#&/' /etc/config/network 9 | 10 | # Check file system during boot 11 | # uci set fstab.@global[0].check_fs=1 12 | # uci commit fstab 13 | 14 | exit 0 15 | -------------------------------------------------------------------------------- /scripts/preset-adguard-core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir -p files/usr/bin/AdGuardHome 4 | 5 | AGH_CORE=$(curl -sL https://api.github.com/repos/AdguardTeam/AdGuardHome/releases/latest | grep /AdGuardHome_linux_${1} | awk -F '"' '{print $4}') 6 | 7 | wget -qO- $AGH_CORE | tar xOvz > files/usr/bin/AdGuardHome/AdGuardHome 8 | 9 | chmod +x files/usr/bin/AdGuardHome/AdGuardHome 10 | -------------------------------------------------------------------------------- /scripts/preset-clash-core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir -p files/etc/openclash/core 4 | 5 | CLASH_DEV_URL="https://raw.githubusercontent.com/vernesong/OpenClash/core/master/dev/clash-linux-${1}.tar.gz" 6 | CLASH_TUN_URL=$(curl -fsSL https://api.github.com/repos/vernesong/OpenClash/contents/master/premium\?ref\=core | grep download_url | grep $1 | awk -F '"' '{print $4}' | grep -v 'v3') 7 | CLASH_META_URL="https://raw.githubusercontent.com/vernesong/OpenClash/core/master/meta/clash-linux-${1}.tar.gz" 8 | GEOIP_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" 9 | GEOSITE_URL="https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" 10 | 11 | wget -qO- $CLASH_DEV_URL | tar xOvz > files/etc/openclash/core/clash 12 | wget -qO- $CLASH_TUN_URL | gunzip -c > files/etc/openclash/core/clash_tun 13 | wget -qO- $CLASH_META_URL | tar xOvz > files/etc/openclash/core/clash_meta 14 | wget -qO- $GEOIP_URL > files/etc/openclash/GeoIP.dat 15 | wget -qO- $GEOSITE_URL > files/etc/openclash/GeoSite.dat 16 | 17 | chmod +x files/etc/openclash/core/clash* 18 | -------------------------------------------------------------------------------- /scripts/preset-terminal-tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir -p files/root 4 | pushd files/root 5 | 6 | # Clone oh-my-zsh repository 7 | git clone --depth=1 https://github.com/ohmyzsh/ohmyzsh ./.oh-my-zsh 8 | 9 | # Install extra plugins 10 | git clone --depth=1 https://github.com/zsh-users/zsh-autosuggestions ./.oh-my-zsh/custom/plugins/zsh-autosuggestions 11 | git clone --depth=1 https://github.com/zsh-users/zsh-syntax-highlighting ./.oh-my-zsh/custom/plugins/zsh-syntax-highlighting 12 | git clone --depth=1 https://github.com/zsh-users/zsh-completions ./.oh-my-zsh/custom/plugins/zsh-completions 13 | 14 | # Get .zshrc dotfile 15 | cp $GITHUB_WORKSPACE/scripts/.zshrc . 16 | 17 | popd 18 | -------------------------------------------------------------------------------- /uboot及刷机命令/u-boot.mbn: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kevinCSDN/Openwrt_Ax1800pro_jdc/9bbae3a41c4017b4237ba143a813b0664ce68f98/uboot及刷机命令/u-boot.mbn -------------------------------------------------------------------------------- /uboot及刷机命令/刷机步骤.txt: -------------------------------------------------------------------------------- 1 | 刷机参考地址:https://post.smzdm.com/p/an3eo74p/ 2 | 把usb转串口CH340G和路由器串口连接,usb转串口和路由器连接如下;GND-G,T-R,R-T即可 3 | 用网线连接路由器lan口和电脑网口,按照下图设置自己的电脑有线网卡地址为192.168.10.1 4 | 把uboot文件放到和tftpd64在同一个目录 5 | 接好TTL后,电脑打开putty软件,在电脑设备管理中找到USB转串口的串口号,我的是COM6 6 | 所以我putty设置COM6,波特率115200。 7 | 千万别忘接网线到lan口,否则下面命令无效: 8 | 给路由器上电后电脑按enter按键,putty会显示进入IPQ6018#界面,然后输入 9 | tftpboot u-boot.mbn 10 | tftpboot u-boot.mbn && flash 0:APPSBL && flash 0:APPSBL_1 11 | 等待执行完成后即可,给路由器断电,断开TTL连接,网线连接保留 12 | 按着reset按键重新给路由器上电(按住10秒以上) 13 | 按照上面给电脑设置ip的方法重新设置成192.168.1.88(最后一位随意) 14 | 访问192.168.1.1 15 | 上传固件,底包下载地址: 16 | wwf.lanzoul.com/iadjw1xswgzg 17 | uboot无法刷写超过60M的固件,IPQ6000自身的限制,刷超过100M的固件需要在底包上升级,这就是为什么需要刷2次。 --------------------------------------------------------------------------------