├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ └── bug_report.md └── workflows │ ├── batch-trigger-build.yml │ ├── build-armvirt64.yml │ ├── build-nanopi-r2c.yml │ ├── build-nanopi-r2s.yml │ ├── build-nanopi-r4s.yml │ ├── build-opir1plus.yml │ ├── build-opizero.yml │ ├── build-rpi1.yml │ ├── build-rpi2.yml │ ├── build-rpi3.yml │ ├── build-rpi4.yml │ ├── build-s9xxx-armvirt.yml │ ├── build-test-rpi3.yml │ ├── build-test-rpi4.yml │ ├── build-test-x86-vmware.yml │ ├── build-x86_64-ext4.yml │ ├── build-x86_64.yml │ ├── build-x86_generic-ext4.yml │ ├── build-x86_generic.yml │ ├── delete-old-workflow-runs.yml │ ├── ipk-uploader.yml │ └── releases-cleaner.yml ├── .gitignore ├── LICENSE ├── README.md ├── config ├── all-rockhip-armv8.config ├── armvirt64.config ├── nanopi-r2c-lean-target.config ├── nanopi-r2s-lean-target.config ├── nanopi-r4s-lean-target.config ├── opi-lean-extra.config ├── opi-r1plus-lean-target.config ├── opi-zero-lean-target.config ├── rockchip-lean-extra.config ├── rpi-lean-extra.config ├── rpi1-lean-target.config ├── rpi2-lean-target.config ├── rpi3-lean-target.config ├── rpi4-lean-target.config ├── universal.config ├── x86-kernel.config ├── x86-lean-extra.config ├── x86_64-lean-target.config └── x86_generic-lean-target.config ├── data ├── opkg │ ├── distfeeds.conf │ └── distfeeds.conf.mirror ├── rclone │ └── upload-rule.txt └── zsh │ └── .zshrc ├── files ├── bin │ ├── ipqmi │ ├── myip │ ├── ocsm │ ├── ssr │ └── vasm ├── boot │ └── helmiwrt.sh └── etc │ └── aria2 │ ├── aria.log │ ├── aria2.conf │ ├── aria2.log │ └── session.txt ├── preview ├── openwrt-rpi-1.png ├── openwrt-rpi-10.png ├── openwrt-rpi-11.png ├── openwrt-rpi-12.png ├── openwrt-rpi-13.png ├── openwrt-rpi-14.png ├── openwrt-rpi-15.png ├── openwrt-rpi-16.png ├── openwrt-rpi-17.png ├── openwrt-rpi-2.png ├── openwrt-rpi-3.png ├── openwrt-rpi-4.png ├── openwrt-rpi-5.png ├── openwrt-rpi-6.png ├── openwrt-rpi-7.png ├── openwrt-rpi-8.png └── openwrt-rpi-9.png └── scripts ├── enable-rpi4-wifi.sh ├── hook-feeds.sh ├── init-settings.sh ├── ipv6-helper.sh ├── lean-openwrt.sh ├── preset-clash-core.sh ├── preset-filebrowser.sh ├── preset-speedtest.sh ├── preset-terminal-tools.sh └── preset-v2raya.sh /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: helmiau.com/pay/index_en.html 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG] Replace_this_with_bug_title" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Bug Information** 11 | A clear and concise description of what the bug is. 12 | 13 | **Screenshots** 14 | If applicable, add screenshots to help explain your problem. 15 | 16 | **Device and OS Information:** 17 | - Device: ( give x between this sign [ ] ) 18 | - [x] Raspberry Pi 19 | - [ ] Nano Pi 20 | - [ ] Orange Pi 21 | - [ ] Amlogic s9xxx 22 | - [ ] x86 23 | 24 | - Downloaded Firmware Name: ( see: **Supported Devices and Download Section** at my blog post ) 25 | x86-generic squashfs UEFI ( this is an example, replace this line with your own ) 26 | Raspberry Pi 4 squashfs factory ( this is an example, replace this line with your own ) 27 | 28 | - Device Model: ( see: **LuCI - Status - Overview - Model** ) 29 | Raspberry Pi 4 Model B Rev 1.2 ( this is an example, replace this line with your own ) 30 | 31 | - Firmware Build Version ( see: **LuCI - Status - Overview - Firmware Version** ) 32 | HelmiWrt R22.2.2 2022-02-18 ( this is an example, replace this line with your own ) 33 | 34 | **Additional context** 35 | Add any other context about the problem here, such your advice or something else. 36 | 37 | **Error Logs** 38 | ``` 39 | Write error logs here (replace this line) 40 | Write error logs here (replace this line) 41 | Write error logs here (replace this line) 42 | ``` 43 | -------------------------------------------------------------------------------- /.github/workflows/build-nanopi-r2c.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build NanoPi R2C 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-friendlyarm_nanopi-r2c.img 22 | CONFIG_FILE: config/nanopi-r2c-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/rockchip-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 96 | cat config/universal.config >> $OPENWRTROOT/.config 97 | cd $OPENWRTROOT 98 | export BUILDDIR=$OPENWRTROOT 99 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 100 | ../$DIY_SH 101 | ../scripts/preset-clash-core.sh armv8 102 | ../scripts/preset-v2raya.sh arm64-v8a 103 | ../scripts/preset-speedtest.sh aarch64 104 | ../scripts/preset-terminal-tools.sh 105 | 106 | - name: Load HelmiWrt Mods 107 | id: mods 108 | env: 109 | REPO_OWNER: helmiau 110 | REPO_NAME: HelmiWrt 111 | run: | 112 | cd $OPENWRTROOT 113 | git config --global credential.helper store 114 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 115 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 116 | cp -r filex/* package/base-files/files/ 117 | rm -rf filex 118 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 119 | chmod +x package/base-files/files/bin/* 120 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 121 | 122 | - name: Download Package 123 | id: package 124 | run: | 125 | cd $OPENWRTROOT 126 | make defconfig 127 | make download -j16 && make download -j16 128 | find dl -size -1024c -exec ls -l {} \; 129 | find dl -size -1024c -exec rm -f {} \; 130 | 131 | - name: Compile Tools 132 | id: tools 133 | run: | 134 | cd $OPENWRTROOT 135 | echo -e "$(nproc) thread compile" 136 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 137 | 138 | - name: Compile Packages 139 | id: compile 140 | run: | 141 | cd $OPENWRTROOT 142 | echo -e "$(nproc) thread compile" 143 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 144 | make diffconfig 145 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 146 | make package/index 147 | cd $OPENWRTROOT/bin/packages/* 148 | PLATFORM=$(basename `pwd`) 149 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 150 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 151 | cd $OPENWRTROOT/bin/targets/* 152 | TARGET=$(basename `pwd`) 153 | echo "TARGET=$TARGET" >> $GITHUB_ENV 154 | echo "::set-output name=TARGET::$(echo $TARGET)" 155 | cd * 156 | SUBTARGET=$(basename `pwd`) 157 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 158 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 159 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 160 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 161 | echo "::set-output name=COMPILE_STATUS::success" 162 | 163 | - name: Generate Firmware 164 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 165 | id: generate 166 | run: | 167 | cd data/opkg 168 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 169 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 170 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 171 | cd $OPENWRTROOT 172 | mkdir -p files/etc/uci-defaults/ 173 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 174 | mkdir -p files/etc/opkg 175 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 176 | mkdir -p files/www/snapshots 177 | cp -r bin/targets files/www/snapshots 178 | cp ../data/opkg/distfeeds.conf files/etc/opkg 179 | mkdir -p files/www/ipv6-modules 180 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 181 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 182 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 183 | mkdir -p files/bin 184 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 185 | make package/install -j$(nproc) || make package/install -j1 V=s 186 | make target/install -j$(nproc) || make target/install -j1 V=s 187 | make checksum 188 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 189 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 190 | echo "::set-output name=GENERATE_STATUS::success" 191 | 192 | - name: Organize Files 193 | id: organize 194 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 195 | run: | 196 | #find . -type f -name '*.ipk' | while read FILE ; do 197 | #echo -e $(readlink -f ${FILE}) ; 198 | #done 199 | cd openwrt/bin/targets/*/* 200 | rm -rf packages 201 | find . -type f -name 'openwrt-*' | while read FILE ; do 202 | newfile="$(echo ${FILE} | sed -e 's/openwrt-/helmiwrt-/')" ; 203 | echo -e $(readlink -f ${FILE}) ; 204 | mv "${FILE}" "${newfile}" ; 205 | done 206 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-$DEVICE_NAME.txt" \; 207 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-$DEVICE_NAME.txt" \; 208 | #find . -type f -name 'sha256sums' | while read FILE ; do 209 | #sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 210 | #echo -e $(readlink -f ${FILE}) ; 211 | #done 212 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 213 | echo "::set-output name=status::success" 214 | echo "::set-output name=ORGANIZE_STATUS::success" 215 | 216 | - name: Delete Older Releases and Tags 217 | uses: dev-drprasad/delete-older-releases@v0.2.0 218 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 219 | with: 220 | keep_latest: 30 221 | delete_tags: true 222 | delete_tag_pattern: helmiwrt 223 | env: 224 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 225 | 226 | - name: Generate New Release Tag 227 | id: tag 228 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 229 | run: | 230 | sleep 20 231 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 232 | touch release.txt 233 | echo "::set-output name=status::success" 234 | 235 | - name: Upload Firmware Files to GitHub Release 236 | uses: softprops/action-gh-release@v1 237 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 238 | env: 239 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 240 | with: 241 | prerelease: true 242 | name: HelmiWrt ${{ env.FILE_DATE }} 243 | tag_name: ${{ steps.tag.outputs.release_tag }} 244 | files: ${{ env.FIRMWARE }}/* 245 | -------------------------------------------------------------------------------- /.github/workflows/build-nanopi-r2s.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build NanoPi R2S 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-friendlyarm_nanopi-r2s.img 22 | CONFIG_FILE: config/nanopi-r2s-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/rockchip-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 96 | cat config/universal.config >> $OPENWRTROOT/.config 97 | cd $OPENWRTROOT 98 | export BUILDDIR=$OPENWRTROOT 99 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 100 | ../$DIY_SH 101 | ../scripts/preset-clash-core.sh armv8 102 | ../scripts/preset-v2raya.sh arm64-v8a 103 | ../scripts/preset-speedtest.sh aarch64 104 | ../scripts/preset-terminal-tools.sh 105 | 106 | - name: Load HelmiWrt Mods 107 | id: mods 108 | env: 109 | REPO_OWNER: helmiau 110 | REPO_NAME: HelmiWrt 111 | run: | 112 | cd $OPENWRTROOT 113 | git config --global credential.helper store 114 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 115 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 116 | cp -r filex/* package/base-files/files/ 117 | rm -rf filex 118 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 119 | chmod +x package/base-files/files/bin/* 120 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 121 | 122 | - name: Download Package 123 | id: package 124 | run: | 125 | cd $OPENWRTROOT 126 | make defconfig 127 | make download -j16 && make download -j16 128 | find dl -size -1024c -exec ls -l {} \; 129 | find dl -size -1024c -exec rm -f {} \; 130 | 131 | - name: Compile Tools 132 | id: tools 133 | run: | 134 | cd $OPENWRTROOT 135 | echo -e "$(nproc) thread compile" 136 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 137 | 138 | - name: Compile Packages 139 | id: compile 140 | run: | 141 | cd $OPENWRTROOT 142 | echo -e "$(nproc) thread compile" 143 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 144 | make diffconfig 145 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 146 | make package/index 147 | cd $OPENWRTROOT/bin/packages/* 148 | PLATFORM=$(basename `pwd`) 149 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 150 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 151 | cd $OPENWRTROOT/bin/targets/* 152 | TARGET=$(basename `pwd`) 153 | echo "TARGET=$TARGET" >> $GITHUB_ENV 154 | echo "::set-output name=TARGET::$(echo $TARGET)" 155 | cd * 156 | SUBTARGET=$(basename `pwd`) 157 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 158 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 159 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 160 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 161 | echo "::set-output name=COMPILE_STATUS::success" 162 | 163 | - name: Generate Firmware 164 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 165 | id: generate 166 | run: | 167 | cd data/opkg 168 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 169 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 170 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 171 | cd $OPENWRTROOT 172 | mkdir -p files/etc/uci-defaults/ 173 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 174 | mkdir -p files/etc/opkg 175 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 176 | mkdir -p files/www/snapshots 177 | cp -r bin/targets files/www/snapshots 178 | cp ../data/opkg/distfeeds.conf files/etc/opkg 179 | mkdir -p files/www/ipv6-modules 180 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 181 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 182 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 183 | mkdir -p files/bin 184 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 185 | make package/install -j$(nproc) || make package/install -j1 V=s 186 | make target/install -j$(nproc) || make target/install -j1 V=s 187 | make checksum 188 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 189 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 190 | echo "::set-output name=GENERATE_STATUS::success" 191 | 192 | - name: Organize Files 193 | id: organize 194 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 195 | run: | 196 | #find . -type f -name '*.ipk' | while read FILE ; do 197 | #echo -e $(readlink -f ${FILE}) ; 198 | #done 199 | cd openwrt/bin/targets/*/* 200 | rm -rf packages 201 | find . -type f -name 'openwrt-*' | while read FILE ; do 202 | newfile="$(echo ${FILE} | sed -e 's/openwrt-/helmiwrt-/')" ; 203 | echo -e $(readlink -f ${FILE}) ; 204 | mv "${FILE}" "${newfile}" ; 205 | done 206 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-$DEVICE_NAME.txt" \; 207 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-$DEVICE_NAME.txt" \; 208 | #find . -type f -name 'sha256sums' | while read FILE ; do 209 | #sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 210 | #echo -e $(readlink -f ${FILE}) ; 211 | #done 212 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 213 | echo "::set-output name=status::success" 214 | echo "::set-output name=ORGANIZE_STATUS::success" 215 | 216 | - name: Delete Older Releases and Tags 217 | uses: dev-drprasad/delete-older-releases@v0.2.0 218 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 219 | with: 220 | keep_latest: 30 221 | delete_tags: true 222 | delete_tag_pattern: helmiwrt 223 | env: 224 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 225 | 226 | - name: Generate New Release Tag 227 | id: tag 228 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 229 | run: | 230 | sleep 20 231 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 232 | touch release.txt 233 | echo "::set-output name=status::success" 234 | 235 | - name: Upload Firmware Files to GitHub Release 236 | uses: softprops/action-gh-release@v1 237 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 238 | env: 239 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 240 | with: 241 | prerelease: true 242 | name: HelmiWrt ${{ env.FILE_DATE }} 243 | tag_name: ${{ steps.tag.outputs.release_tag }} 244 | files: ${{ env.FIRMWARE }}/* 245 | -------------------------------------------------------------------------------- /.github/workflows/build-nanopi-r4s.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build NanoPi R4S 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-friendlyarm_nanopi-r4s.img 22 | CONFIG_FILE: config/nanopi-r4s-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/$TZ /etc/localtime 52 | sudo timedatectl set-timezone "$TZ" 53 | docker image prune -a -f 54 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 55 | export WORKFLOWNAME=$TOOLCHAIN_NAME 56 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 57 | 58 | - name: Free Up More Space 59 | uses: easimon/maximize-build-space@master 60 | with: 61 | root-reserve-mb: 256 62 | swap-size-mb: 1024 63 | remove-dotnet: 'true' 64 | remove-android: 'true' 65 | remove-haskell: 'true' 66 | overprovision-lvm: 'true' 67 | 68 | - name: Checkout 69 | uses: actions/checkout@main 70 | 71 | - name: Prepare Toolchain Image 72 | id: prepare 73 | run: | 74 | df -hT $PWD 75 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 76 | mkdir openwrt-ro openwrt workdir overlay 77 | sudo mount -o loop toolchain-image.img openwrt-ro 78 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 79 | cd openwrt 80 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 81 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 82 | git pull 83 | 84 | - name: Install Feeds 85 | id: feeds 86 | run: | 87 | cd $OPENWRTROOT 88 | chmod +x ../scripts/*.sh 89 | ../scripts/hook-feeds.sh 90 | 91 | - name: Load Custom Configuration 92 | run: | 93 | [ -e files ] && mv files $OPENWRTROOT/files 94 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 95 | cat config/rockchip-lean-extra.config >> $OPENWRTROOT/.config 96 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 97 | cat config/universal.config >> $OPENWRTROOT/.config 98 | sed -i 's/kmod-usb-net-rtl8152=y/kmod-usb-net-rtl8152-vendor=y/g' $OPENWRTROOT/.config 99 | cd $OPENWRTROOT 100 | export BUILDDIR=$OPENWRTROOT 101 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 102 | ../$DIY_SH 103 | ../scripts/preset-clash-core.sh armv8 104 | ../scripts/preset-v2raya.sh arm64-v8a 105 | ../scripts/preset-speedtest.sh aarch64 106 | ../scripts/preset-terminal-tools.sh 107 | 108 | - name: Load HelmiWrt Mods 109 | id: mods 110 | env: 111 | REPO_OWNER: helmiau 112 | REPO_NAME: HelmiWrt 113 | run: | 114 | cd $OPENWRTROOT 115 | git config --global credential.helper store 116 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 117 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 118 | cp -r filex/* package/base-files/files/ 119 | rm -rf filex 120 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 121 | chmod +x package/base-files/files/bin/* 122 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 123 | 124 | - name: Download Package 125 | id: package 126 | run: | 127 | cd $OPENWRTROOT 128 | make defconfig 129 | make download -j16 && make download -j16 130 | find dl -size -1024c -exec ls -l {} \; 131 | find dl -size -1024c -exec rm -f {} \; 132 | 133 | - name: Compile Tools 134 | id: tools 135 | run: | 136 | cd $OPENWRTROOT 137 | echo -e "$(nproc) thread compile" 138 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 139 | 140 | - name: Compile Packages 141 | id: compile 142 | run: | 143 | cd $OPENWRTROOT 144 | echo -e "$(nproc) thread compile" 145 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 146 | make diffconfig 147 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 148 | make package/index 149 | cd $OPENWRTROOT/bin/packages/* 150 | PLATFORM=$(basename `pwd`) 151 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 152 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 153 | cd $OPENWRTROOT/bin/targets/* 154 | TARGET=$(basename `pwd`) 155 | echo "TARGET=$TARGET" >> $GITHUB_ENV 156 | echo "::set-output name=TARGET::$(echo $TARGET)" 157 | cd * 158 | SUBTARGET=$(basename `pwd`) 159 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 160 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 161 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 162 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 163 | echo "::set-output name=COMPILE_STATUS::success" 164 | 165 | - name: Generate Firmware 166 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 167 | id: generate 168 | run: | 169 | cd data/opkg 170 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 171 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 172 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 173 | cd $OPENWRTROOT 174 | mkdir -p files/etc/uci-defaults/ 175 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 176 | mkdir -p files/etc/opkg 177 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 178 | mkdir -p files/www/snapshots 179 | cp -r bin/targets files/www/snapshots 180 | cp ../data/opkg/distfeeds.conf files/etc/opkg 181 | mkdir -p files/www/ipv6-modules 182 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 183 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 184 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 185 | mkdir -p files/bin 186 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 187 | make package/install -j$(nproc) || make package/install -j1 V=s 188 | make target/install -j$(nproc) || make target/install -j1 V=s 189 | make checksum 190 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 191 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 192 | echo "::set-output name=GENERATE_STATUS::success" 193 | 194 | - name: Organize Files 195 | id: organize 196 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 197 | run: | 198 | #find . -type f -name '*.ipk' | while read FILE ; do 199 | #echo -e $(readlink -f ${FILE}) ; 200 | #done 201 | cd openwrt/bin/targets/*/* 202 | rm -rf packages 203 | find . -type f -name 'openwrt-*' | while read FILE ; do 204 | newfile="$(echo ${FILE} | sed -e 's/openwrt-/helmiwrt-/')" ; 205 | echo -e $(readlink -f ${FILE}) ; 206 | mv "${FILE}" "${newfile}" ; 207 | done 208 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-$DEVICE_NAME.txt" \; 209 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-$DEVICE_NAME.txt" \; 210 | #find . -type f -name 'sha256sums' | while read FILE ; do 211 | #sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 212 | #echo -e $(readlink -f ${FILE}) ; 213 | #done 214 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 215 | echo "::set-output name=status::success" 216 | echo "::set-output name=ORGANIZE_STATUS::success" 217 | 218 | - name: Delete Older Releases and Tags 219 | uses: dev-drprasad/delete-older-releases@v0.2.0 220 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 221 | with: 222 | keep_latest: 30 223 | delete_tags: true 224 | delete_tag_pattern: helmiwrt 225 | env: 226 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 227 | 228 | - name: Generate New Release Tag 229 | id: tag 230 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 231 | run: | 232 | sleep 20 233 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 234 | touch release.txt 235 | echo "::set-output name=status::success" 236 | 237 | - name: Upload Firmware Files to GitHub Release 238 | uses: softprops/action-gh-release@v1 239 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 240 | env: 241 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 242 | with: 243 | prerelease: true 244 | name: HelmiWrt ${{ env.FILE_DATE }} 245 | tag_name: ${{ steps.tag.outputs.release_tag }} 246 | files: ${{ env.FIRMWARE }}/* 247 | -------------------------------------------------------------------------------- /.github/workflows/build-opir1plus.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build Orange Pi R1 Plus 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-xunlong_orangepi-r1-plus.img 22 | CONFIG_FILE: config/opi-r1plus-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/rockchip-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 96 | cat config/universal.config >> $OPENWRTROOT/.config 97 | cd $OPENWRTROOT 98 | export BUILDDIR=$OPENWRTROOT 99 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 100 | ../$DIY_SH 101 | ../scripts/preset-clash-core.sh armv8 102 | ../scripts/preset-v2raya.sh arm64-v8a 103 | ../scripts/preset-speedtest.sh aarch64 104 | ../scripts/preset-terminal-tools.sh 105 | 106 | - name: Load HelmiWrt Mods 107 | id: mods 108 | env: 109 | REPO_OWNER: helmiau 110 | REPO_NAME: HelmiWrt 111 | run: | 112 | cd $OPENWRTROOT 113 | git config --global credential.helper store 114 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 115 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 116 | cp -r filex/* package/base-files/files/ 117 | rm -rf filex 118 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 119 | chmod +x package/base-files/files/bin/* 120 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 121 | 122 | - name: Download Package 123 | id: package 124 | run: | 125 | cd $OPENWRTROOT 126 | make defconfig 127 | make download -j16 && make download -j16 128 | find dl -size -1024c -exec ls -l {} \; 129 | find dl -size -1024c -exec rm -f {} \; 130 | 131 | - name: Compile Tools 132 | id: tools 133 | run: | 134 | cd $OPENWRTROOT 135 | echo -e "$(nproc) thread compile" 136 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 137 | 138 | - name: Compile Packages 139 | id: compile 140 | run: | 141 | cd $OPENWRTROOT 142 | echo -e "$(nproc) thread compile" 143 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 144 | make diffconfig 145 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 146 | make package/index 147 | cd $OPENWRTROOT/bin/packages/* 148 | PLATFORM=$(basename `pwd`) 149 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 150 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 151 | cd $OPENWRTROOT/bin/targets/* 152 | TARGET=$(basename `pwd`) 153 | echo "TARGET=$TARGET" >> $GITHUB_ENV 154 | echo "::set-output name=TARGET::$(echo $TARGET)" 155 | cd * 156 | SUBTARGET=$(basename `pwd`) 157 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 158 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 159 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 160 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 161 | echo "::set-output name=COMPILE_STATUS::success" 162 | 163 | - name: Generate Firmware 164 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 165 | id: generate 166 | run: | 167 | cd data/opkg 168 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 169 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 170 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 171 | cd $OPENWRTROOT 172 | mkdir -p files/etc/uci-defaults/ 173 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 174 | mkdir -p files/etc/opkg 175 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 176 | mkdir -p files/www/snapshots 177 | cp -r bin/targets files/www/snapshots 178 | cp ../data/opkg/distfeeds.conf files/etc/opkg 179 | mkdir -p files/www/ipv6-modules 180 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 181 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 182 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 183 | mkdir -p files/bin 184 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 185 | make package/install -j$(nproc) || make package/install -j1 V=s 186 | make target/install -j$(nproc) || make target/install -j1 V=s 187 | make checksum 188 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 189 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 190 | echo "::set-output name=GENERATE_STATUS::success" 191 | 192 | - name: Organize Files 193 | id: organize 194 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 195 | run: | 196 | #find . -type f -name '*.ipk' | while read FILE ; do 197 | #echo -e $(readlink -f ${FILE}) ; 198 | #done 199 | cd openwrt/bin/targets/*/* 200 | rm -rf packages 201 | find . -type f -name 'openwrt-*' | while read FILE ; do 202 | newfile="$(echo ${FILE} | sed -e 's/openwrt-/helmiwrt-/')" ; 203 | echo -e $(readlink -f ${FILE}) ; 204 | mv "${FILE}" "${newfile}" ; 205 | done 206 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-$DEVICE_NAME.txt" \; 207 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-$DEVICE_NAME.txt" \; 208 | #find . -type f -name 'sha256sums' | while read FILE ; do 209 | #sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 210 | #echo -e $(readlink -f ${FILE}) ; 211 | #done 212 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 213 | echo "::set-output name=status::success" 214 | echo "::set-output name=ORGANIZE_STATUS::success" 215 | 216 | - name: Delete Older Releases and Tags 217 | uses: dev-drprasad/delete-older-releases@v0.2.0 218 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 219 | with: 220 | keep_latest: 30 221 | delete_tags: true 222 | delete_tag_pattern: helmiwrt 223 | env: 224 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 225 | 226 | - name: Generate New Release Tag 227 | id: tag 228 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 229 | run: | 230 | sleep 20 231 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 232 | touch release.txt 233 | echo "::set-output name=status::success" 234 | 235 | - name: Upload Firmware Files to GitHub Release 236 | uses: softprops/action-gh-release@v1 237 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 238 | env: 239 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 240 | with: 241 | prerelease: true 242 | name: HelmiWrt ${{ env.FILE_DATE }} 243 | tag_name: ${{ steps.tag.outputs.release_tag }} 244 | files: ${{ env.FIRMWARE }}/* 245 | -------------------------------------------------------------------------------- /.github/workflows/build-opizero.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # Actions script by Asrofur Rizqi 8 | # HelmiWrt by helmiau.com 9 | #================================================= 10 | 11 | name: Build Orange Pi Zero 12 | 13 | on: 14 | workflow_dispatch: 15 | # schedule: 16 | # - cron: 0 17 * * * 17 | # watch: 18 | # types: started 19 | 20 | env: 21 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 22 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-xunlong_orangepi-zero.img 23 | CONFIG_FILE: config/opi-zero-lean-target.config 24 | DIY_SH: scripts/lean-openwrt.sh 25 | WEBROOT: /data/dnmp/www/openwrt.cc 26 | UPLOAD_FIRMWARE: true 27 | UPLOAD_BIN_DIR: true 28 | UPLOAD_RELEASE: true 29 | TZ: Asia/Jakarta 30 | 31 | jobs: 32 | Build: 33 | runs-on: ubuntu-18.04 34 | 35 | outputs: 36 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 37 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 38 | TARGET: ${{ steps.compile.outputs.TARGET }} 39 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 40 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 41 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 42 | 43 | steps: 44 | - name: Initialization Environment 45 | env: 46 | DEBIAN_FRONTEND: noninteractive 47 | run: | 48 | sudo -E apt-get -qq update 49 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 50 | sudo -E apt-get -qq autoremove --purge 51 | sudo -E apt-get -qq clean 52 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 53 | docker image prune -a -f 54 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 55 | export WORKFLOWNAME=$TOOLCHAIN_NAME 56 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 57 | 58 | - name: Free Up More Space 59 | uses: easimon/maximize-build-space@master 60 | with: 61 | root-reserve-mb: 256 62 | swap-size-mb: 1024 63 | remove-dotnet: 'true' 64 | remove-android: 'true' 65 | remove-haskell: 'true' 66 | overprovision-lvm: 'true' 67 | 68 | - name: Checkout 69 | uses: actions/checkout@main 70 | 71 | - name: Prepare Toolchain Image 72 | id: prepare 73 | run: | 74 | df -hT $PWD 75 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 76 | mkdir openwrt-ro openwrt workdir overlay 77 | sudo mount -o loop toolchain-image.img openwrt-ro 78 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 79 | cd openwrt 80 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 81 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 82 | git pull 83 | 84 | - name: Install Feeds 85 | id: feeds 86 | run: | 87 | cd $OPENWRTROOT 88 | chmod +x ../scripts/*.sh 89 | ../scripts/hook-feeds.sh 90 | 91 | - name: Load Custom Configuration 92 | run: | 93 | [ -e files ] && mv files $OPENWRTROOT/files 94 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 95 | cat config/opi-lean-extra.config >> $OPENWRTROOT/.config 96 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 97 | cat config/universal.config >> $OPENWRTROOT/.config 98 | cd $OPENWRTROOT 99 | export BUILDDIR=$OPENWRTROOT 100 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 101 | ../$DIY_SH 102 | ../scripts/preset-clash-core.sh armv7 103 | ../scripts/preset-v2raya.sh arm32-v7a 104 | ../scripts/preset-speedtest.sh arm 105 | ../scripts/preset-terminal-tools.sh 106 | 107 | - name: Load HelmiWrt Mods 108 | id: mods 109 | env: 110 | REPO_OWNER: helmiau 111 | REPO_NAME: HelmiWrt 112 | run: | 113 | cd $OPENWRTROOT 114 | git config --global credential.helper store 115 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 116 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 117 | cp -r filex/* package/base-files/files/ 118 | rm -rf filex 119 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 120 | chmod +x package/base-files/files/bin/* 121 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 122 | 123 | - name: Download Package 124 | id: package 125 | run: | 126 | cd $OPENWRTROOT 127 | make defconfig 128 | make download -j16 && make download -j16 129 | find dl -size -1024c -exec ls -l {} \; 130 | find dl -size -1024c -exec rm -f {} \; 131 | 132 | - name: Compile Tools 133 | id: tools 134 | run: | 135 | cd $OPENWRTROOT 136 | echo -e "$(nproc) thread compile" 137 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 138 | 139 | - name: Compile Packages 140 | id: compile 141 | run: | 142 | cd $OPENWRTROOT 143 | echo -e "$(nproc) thread compile" 144 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 145 | make diffconfig 146 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 147 | make package/index 148 | cd $OPENWRTROOT/bin/packages/* 149 | PLATFORM=$(basename `pwd`) 150 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 151 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 152 | cd $OPENWRTROOT/bin/targets/* 153 | TARGET=$(basename `pwd`) 154 | echo "TARGET=$TARGET" >> $GITHUB_ENV 155 | echo "::set-output name=TARGET::$(echo $TARGET)" 156 | cd * 157 | SUBTARGET=$(basename `pwd`) 158 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 159 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 160 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 161 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 162 | echo "::set-output name=COMPILE_STATUS::success" 163 | 164 | - name: Generate Firmware 165 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 166 | id: generate 167 | run: | 168 | cd data/opkg 169 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 170 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 171 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 172 | cd $OPENWRTROOT 173 | echo "dtparam=i2c_arm=on,audio=on" >> target/linux/bcm27xx/image/config.txt 174 | mkdir -p files/etc/uci-defaults/ 175 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 176 | mkdir -p files/etc/opkg 177 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 178 | mkdir -p files/www/snapshots 179 | cp -r bin/targets files/www/snapshots 180 | cp ../data/opkg/distfeeds.conf files/etc/opkg 181 | mkdir -p files/www/ipv6-modules 182 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 183 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 184 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 185 | mkdir -p files/bin 186 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 187 | make package/install -j$(nproc) || make package/install -j1 V=s 188 | make target/install -j$(nproc) || make target/install -j1 V=s 189 | make checksum 190 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 191 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 192 | echo "::set-output name=GENERATE_STATUS::success" 193 | 194 | - name: Organize Files 195 | id: organize 196 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 197 | run: | 198 | #find . -type f -name '*.ipk' | while read FILE ; do 199 | #echo -e $(readlink -f ${FILE}) ; 200 | #done 201 | cd openwrt/bin/targets/*/* 202 | rm -rf packages 203 | find . -type f -name 'openwrt-*' | while read FILE ; do 204 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 205 | echo -e $(readlink -f ${FILE}) ; 206 | mv "${FILE}" "${newfile}" ; 207 | done 208 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 209 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 210 | find . -type f -name 'sha256sums' | while read FILE ; do 211 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 212 | echo -e $(readlink -f ${FILE}) ; 213 | done 214 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 215 | echo "::set-output name=status::success" 216 | echo "::set-output name=ORGANIZE_STATUS::success" 217 | 218 | - name: Delete Older Releases and Tags 219 | uses: dev-drprasad/delete-older-releases@v0.2.0 220 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 221 | with: 222 | keep_latest: 30 223 | delete_tags: true 224 | delete_tag_pattern: helmiwrt 225 | env: 226 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 227 | 228 | - name: Generate New Release Tag 229 | id: tag 230 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 231 | run: | 232 | sleep 20 233 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 234 | touch release.txt 235 | echo "::set-output name=status::success" 236 | 237 | - name: Upload Firmware Files to GitHub Release 238 | uses: softprops/action-gh-release@v1 239 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 240 | env: 241 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 242 | with: 243 | prerelease: true 244 | name: HelmiWrt ${{ env.FILE_DATE }} 245 | tag_name: ${{ steps.tag.outputs.release_tag }} 246 | files: ${{ env.FIRMWARE }}/* 247 | -------------------------------------------------------------------------------- /.github/workflows/build-rpi1.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build Raspberry Pi 1 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-rpi.img 22 | CONFIG_FILE: config/rpi1-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/universal.config >> $OPENWRTROOT/.config 96 | cd $OPENWRTROOT 97 | export BUILDDIR=$OPENWRTROOT 98 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 99 | ../$DIY_SH 100 | ../scripts/preset-clash-core.sh armv6 101 | ../scripts/preset-v2raya.sh arm32-v6 102 | ../scripts/preset-speedtest.sh arm 103 | ../scripts/preset-terminal-tools.sh 104 | 105 | - name: Load HelmiWrt Mods 106 | id: mods 107 | env: 108 | REPO_OWNER: helmiau 109 | REPO_NAME: HelmiWrt 110 | run: | 111 | cd $OPENWRTROOT 112 | git config --global credential.helper store 113 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 114 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 115 | cp -r filex/* package/base-files/files/ 116 | rm -rf filex 117 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 118 | chmod +x package/base-files/files/bin/* 119 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 120 | 121 | - name: Download Package 122 | id: package 123 | run: | 124 | cd $OPENWRTROOT 125 | make defconfig 126 | make download -j16 && make download -j16 127 | find dl -size -1024c -exec ls -l {} \; 128 | find dl -size -1024c -exec rm -f {} \; 129 | 130 | - name: Compile Tools 131 | id: tools 132 | run: | 133 | cd $OPENWRTROOT 134 | echo -e "$(nproc) thread compile" 135 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 136 | 137 | - name: Compile Packages 138 | id: compile 139 | run: | 140 | cd $OPENWRTROOT 141 | echo -e "$(nproc) thread compile" 142 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 143 | make diffconfig 144 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 145 | make package/index 146 | cd $OPENWRTROOT/bin/packages/* 147 | PLATFORM=$(basename `pwd`) 148 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 149 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 150 | cd $OPENWRTROOT/bin/targets/* 151 | TARGET=$(basename `pwd`) 152 | echo "TARGET=$TARGET" >> $GITHUB_ENV 153 | echo "::set-output name=TARGET::$(echo $TARGET)" 154 | cd * 155 | SUBTARGET=$(basename `pwd`) 156 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 157 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 158 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 159 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 160 | echo "::set-output name=COMPILE_STATUS::success" 161 | 162 | - name: Generate Firmware 163 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 164 | id: generate 165 | run: | 166 | cd data/opkg 167 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 168 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 169 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 170 | cd $OPENWRTROOT 171 | echo "dtparam=i2c_arm=on,audio=on" >> target/linux/bcm27xx/image/config.txt 172 | mkdir -p files/etc/uci-defaults/ 173 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 174 | mkdir -p files/etc/opkg 175 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 176 | mkdir -p files/www/snapshots 177 | cp -r bin/targets files/www/snapshots 178 | cp ../data/opkg/distfeeds.conf files/etc/opkg 179 | mkdir -p files/www/ipv6-modules 180 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 181 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 182 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 183 | mkdir -p files/bin 184 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 185 | make package/install -j$(nproc) || make package/install -j1 V=s 186 | make target/install -j$(nproc) || make target/install -j1 V=s 187 | make checksum 188 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 189 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 190 | echo "::set-output name=GENERATE_STATUS::success" 191 | 192 | - name: Organize Files 193 | id: organize 194 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 195 | run: | 196 | #find . -type f -name '*.ipk' | while read FILE ; do 197 | #echo -e $(readlink -f ${FILE}) ; 198 | #done 199 | cd openwrt/bin/targets/*/* 200 | rm -rf packages 201 | find . -type f -name 'openwrt-*' | while read FILE ; do 202 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 203 | echo -e $(readlink -f ${FILE}) ; 204 | mv "${FILE}" "${newfile}" ; 205 | done 206 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 207 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 208 | find . -type f -name 'sha256sums' | while read FILE ; do 209 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 210 | echo -e $(readlink -f ${FILE}) ; 211 | done 212 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 213 | echo "::set-output name=status::success" 214 | echo "::set-output name=ORGANIZE_STATUS::success" 215 | 216 | - name: Delete Older Releases and Tags 217 | uses: dev-drprasad/delete-older-releases@v0.2.0 218 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 219 | with: 220 | keep_latest: 30 221 | delete_tags: true 222 | delete_tag_pattern: helmiwrt 223 | env: 224 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 225 | 226 | - name: Generate New Release Tag 227 | id: tag 228 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 229 | run: | 230 | sleep 20 231 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 232 | touch release.txt 233 | echo "::set-output name=status::success" 234 | 235 | - name: Upload Firmware Files to GitHub Release 236 | uses: softprops/action-gh-release@v1 237 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 238 | env: 239 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 240 | with: 241 | prerelease: true 242 | name: HelmiWrt ${{ env.FILE_DATE }} 243 | tag_name: ${{ steps.tag.outputs.release_tag }} 244 | files: ${{ env.FIRMWARE }}/* 245 | -------------------------------------------------------------------------------- /.github/workflows/build-rpi2.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build Raspberry Pi 2 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-rpi-2.img 22 | CONFIG_FILE: config/rpi2-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/universal.config >> $OPENWRTROOT/.config 96 | cd $OPENWRTROOT 97 | export BUILDDIR=$OPENWRTROOT 98 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 99 | ../$DIY_SH 100 | ../scripts/preset-clash-core.sh armv7 101 | ../scripts/preset-v2raya.sh arm32-v7a 102 | ../scripts/preset-speedtest.sh arm 103 | ../scripts/preset-terminal-tools.sh 104 | 105 | - name: Load HelmiWrt Mods 106 | id: mods 107 | env: 108 | REPO_OWNER: helmiau 109 | REPO_NAME: HelmiWrt 110 | run: | 111 | cd $OPENWRTROOT 112 | git config --global credential.helper store 113 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 114 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 115 | cp -r filex/* package/base-files/files/ 116 | rm -rf filex 117 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 118 | chmod +x package/base-files/files/bin/* 119 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 120 | 121 | - name: Download Package 122 | id: package 123 | run: | 124 | cd $OPENWRTROOT 125 | make defconfig 126 | make download -j16 && make download -j16 127 | find dl -size -1024c -exec ls -l {} \; 128 | find dl -size -1024c -exec rm -f {} \; 129 | 130 | - name: Compile Tools 131 | id: tools 132 | run: | 133 | cd $OPENWRTROOT 134 | echo -e "$(nproc) thread compile" 135 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 136 | 137 | - name: Compile Packages 138 | id: compile 139 | run: | 140 | cd $OPENWRTROOT 141 | echo -e "$(nproc) thread compile" 142 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 143 | make diffconfig 144 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 145 | make package/index 146 | cd $OPENWRTROOT/bin/packages/* 147 | PLATFORM=$(basename `pwd`) 148 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 149 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 150 | cd $OPENWRTROOT/bin/targets/* 151 | TARGET=$(basename `pwd`) 152 | echo "TARGET=$TARGET" >> $GITHUB_ENV 153 | echo "::set-output name=TARGET::$(echo $TARGET)" 154 | cd * 155 | SUBTARGET=$(basename `pwd`) 156 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 157 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 158 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 159 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 160 | echo "::set-output name=COMPILE_STATUS::success" 161 | 162 | - name: Generate Firmware 163 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 164 | id: generate 165 | run: | 166 | cd data/opkg 167 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 168 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 169 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 170 | cd $OPENWRTROOT 171 | echo "dtparam=i2c_arm=on,audio=on" >> target/linux/bcm27xx/image/config.txt 172 | mkdir -p files/etc/uci-defaults/ 173 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 174 | mkdir -p files/etc/opkg 175 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 176 | mkdir -p files/www/snapshots 177 | cp -r bin/targets files/www/snapshots 178 | cp ../data/opkg/distfeeds.conf files/etc/opkg 179 | mkdir -p files/www/ipv6-modules 180 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 181 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 182 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 183 | mkdir -p files/bin 184 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 185 | make package/install -j$(nproc) || make package/install -j1 V=s 186 | make target/install -j$(nproc) || make target/install -j1 V=s 187 | make checksum 188 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 189 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 190 | echo "::set-output name=GENERATE_STATUS::success" 191 | 192 | - name: Organize Files 193 | id: organize 194 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 195 | run: | 196 | #find . -type f -name '*.ipk' | while read FILE ; do 197 | #echo -e $(readlink -f ${FILE}) ; 198 | #done 199 | cd openwrt/bin/targets/*/* 200 | rm -rf packages 201 | find . -type f -name 'openwrt-*' | while read FILE ; do 202 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 203 | echo -e $(readlink -f ${FILE}) ; 204 | mv "${FILE}" "${newfile}" ; 205 | done 206 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 207 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 208 | find . -type f -name 'sha256sums' | while read FILE ; do 209 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 210 | echo -e $(readlink -f ${FILE}) ; 211 | done 212 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 213 | echo "::set-output name=status::success" 214 | echo "::set-output name=ORGANIZE_STATUS::success" 215 | 216 | - name: Delete Older Releases and Tags 217 | uses: dev-drprasad/delete-older-releases@v0.2.0 218 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 219 | with: 220 | keep_latest: 30 221 | delete_tags: true 222 | delete_tag_pattern: helmiwrt 223 | env: 224 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 225 | 226 | - name: Generate New Release Tag 227 | id: tag 228 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 229 | run: | 230 | sleep 20 231 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 232 | touch release.txt 233 | echo "::set-output name=status::success" 234 | 235 | - name: Upload Firmware Files to GitHub Release 236 | uses: softprops/action-gh-release@v1 237 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 238 | env: 239 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 240 | with: 241 | prerelease: true 242 | name: HelmiWrt ${{ env.FILE_DATE }} 243 | tag_name: ${{ steps.tag.outputs.release_tag }} 244 | files: ${{ env.FIRMWARE }}/* 245 | -------------------------------------------------------------------------------- /.github/workflows/build-rpi3.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build Raspberry Pi 3 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-rpi-3.img 22 | CONFIG_FILE: config/rpi3-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/universal.config >> $OPENWRTROOT/.config 96 | cd $OPENWRTROOT 97 | export BUILDDIR=$OPENWRTROOT 98 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 99 | ../$DIY_SH 100 | ../scripts/preset-clash-core.sh armv8 101 | ../scripts/preset-v2raya.sh arm64-v8a 102 | ../scripts/preset-speedtest.sh aarch64 103 | ../scripts/preset-terminal-tools.sh 104 | 105 | - name: Load HelmiWrt Mods 106 | id: mods 107 | env: 108 | REPO_OWNER: helmiau 109 | REPO_NAME: HelmiWrt 110 | run: | 111 | cd $OPENWRTROOT 112 | git config --global credential.helper store 113 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 114 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 115 | cp -r filex/* package/base-files/files/ 116 | rm -rf filex 117 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 118 | chmod +x package/base-files/files/bin/* 119 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 120 | 121 | - name: Download Package 122 | id: package 123 | run: | 124 | cd $OPENWRTROOT 125 | make defconfig 126 | make download -j16 && make download -j16 127 | find dl -size -1024c -exec ls -l {} \; 128 | find dl -size -1024c -exec rm -f {} \; 129 | 130 | - name: Compile Tools 131 | id: tools 132 | run: | 133 | cd $OPENWRTROOT 134 | echo -e "$(nproc) thread compile" 135 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 136 | 137 | - name: Compile Packages 138 | id: compile 139 | run: | 140 | cd $OPENWRTROOT 141 | echo -e "$(nproc) thread compile" 142 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 143 | make diffconfig 144 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 145 | make package/index 146 | cd $OPENWRTROOT/bin/packages/* 147 | PLATFORM=$(basename `pwd`) 148 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 149 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 150 | cd $OPENWRTROOT/bin/targets/* 151 | TARGET=$(basename `pwd`) 152 | echo "TARGET=$TARGET" >> $GITHUB_ENV 153 | echo "::set-output name=TARGET::$(echo $TARGET)" 154 | cd * 155 | SUBTARGET=$(basename `pwd`) 156 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 157 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 158 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 159 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 160 | echo "::set-output name=COMPILE_STATUS::success" 161 | 162 | - name: Generate Firmware 163 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 164 | id: generate 165 | run: | 166 | cd data/opkg 167 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 168 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 169 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 170 | cd $OPENWRTROOT 171 | echo "dtparam=i2c_arm=on,audio=on" >> target/linux/bcm27xx/image/config.txt 172 | mkdir -p files/etc/uci-defaults/ 173 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 174 | mkdir -p files/etc/opkg 175 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 176 | mkdir -p files/www/snapshots 177 | cp -r bin/targets files/www/snapshots 178 | cp ../data/opkg/distfeeds.conf files/etc/opkg 179 | mkdir -p files/www/ipv6-modules 180 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 181 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 182 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 183 | mkdir -p files/bin 184 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 185 | make package/install -j$(nproc) || make package/install -j1 V=s 186 | make target/install -j$(nproc) || make target/install -j1 V=s 187 | make checksum 188 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 189 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 190 | echo "::set-output name=GENERATE_STATUS::success" 191 | 192 | - name: Organize Files 193 | id: organize 194 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 195 | run: | 196 | #find . -type f -name '*.ipk' | while read FILE ; do 197 | #echo -e $(readlink -f ${FILE}) ; 198 | #done 199 | cd openwrt/bin/targets/*/* 200 | rm -rf packages 201 | find . -type f -name 'openwrt-*' | while read FILE ; do 202 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 203 | echo -e $(readlink -f ${FILE}) ; 204 | mv "${FILE}" "${newfile}" ; 205 | done 206 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 207 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 208 | find . -type f -name 'sha256sums' | while read FILE ; do 209 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 210 | echo -e $(readlink -f ${FILE}) ; 211 | done 212 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 213 | echo "::set-output name=status::success" 214 | echo "::set-output name=ORGANIZE_STATUS::success" 215 | 216 | - name: Delete Older Releases and Tags 217 | uses: dev-drprasad/delete-older-releases@v0.2.0 218 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 219 | with: 220 | keep_latest: 30 221 | delete_tags: true 222 | delete_tag_pattern: helmiwrt 223 | env: 224 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 225 | 226 | - name: Generate New Release Tag 227 | id: tag 228 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 229 | run: | 230 | sleep 20 231 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 232 | touch release.txt 233 | echo "::set-output name=status::success" 234 | 235 | - name: Upload Firmware Files to GitHub Release 236 | id: up_release 237 | uses: softprops/action-gh-release@v1 238 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 239 | env: 240 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 241 | with: 242 | prerelease: true 243 | name: HelmiWrt ${{ env.FILE_DATE }} 244 | tag_name: ${{ steps.tag.outputs.release_tag }} 245 | files: ${{ env.FIRMWARE }}/* 246 | -------------------------------------------------------------------------------- /.github/workflows/build-rpi4.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build Raspberry Pi 4 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-rpi-4.img 22 | CONFIG_FILE: config/rpi4-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/universal.config >> $OPENWRTROOT/.config 96 | cd $OPENWRTROOT 97 | export BUILDDIR=$OPENWRTROOT 98 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 99 | ../$DIY_SH 100 | ../scripts/preset-clash-core.sh armv8 101 | ../scripts/preset-v2raya.sh arm64-v8a 102 | ../scripts/preset-speedtest.sh aarch64 103 | ../scripts/preset-terminal-tools.sh 104 | ../scripts/enable-rpi4-wifi.sh 105 | 106 | - name: Load HelmiWrt Mods 107 | id: mods 108 | env: 109 | REPO_OWNER: helmiau 110 | REPO_NAME: HelmiWrt 111 | run: | 112 | cd $OPENWRTROOT 113 | git config --global credential.helper store 114 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 115 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 116 | cp -r filex/* package/base-files/files/ 117 | rm -rf filex 118 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 119 | chmod +x package/base-files/files/bin/* 120 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 121 | 122 | - name: Download Package 123 | id: package 124 | run: | 125 | cd $OPENWRTROOT 126 | make defconfig 127 | make download -j16 && make download -j16 128 | find dl -size -1024c -exec ls -l {} \; 129 | find dl -size -1024c -exec rm -f {} \; 130 | 131 | - name: Compile Tools 132 | id: tools 133 | run: | 134 | cd $OPENWRTROOT 135 | echo -e "$(nproc) thread compile" 136 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 137 | 138 | - name: Compile Packages 139 | id: compile 140 | run: | 141 | cd $OPENWRTROOT 142 | echo -e "$(nproc) thread compile" 143 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 144 | make diffconfig 145 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 146 | make package/index 147 | cd $OPENWRTROOT/bin/packages/* 148 | PLATFORM=$(basename `pwd`) 149 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 150 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 151 | cd $OPENWRTROOT/bin/targets/* 152 | TARGET=$(basename `pwd`) 153 | echo "TARGET=$TARGET" >> $GITHUB_ENV 154 | echo "::set-output name=TARGET::$(echo $TARGET)" 155 | cd * 156 | SUBTARGET=$(basename `pwd`) 157 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 158 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 159 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 160 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 161 | echo "::set-output name=COMPILE_STATUS::success" 162 | 163 | - name: Generate Firmware 164 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 165 | id: generate 166 | run: | 167 | cd data/opkg 168 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 169 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 170 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 171 | cd $OPENWRTROOT 172 | echo "dtparam=i2c_arm=on,audio=on" >> target/linux/bcm27xx/image/config.txt 173 | mkdir -p files/etc/uci-defaults/ 174 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 175 | mkdir -p files/etc/opkg 176 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 177 | mkdir -p files/www/snapshots 178 | cp -r bin/targets files/www/snapshots 179 | cp ../data/opkg/distfeeds.conf files/etc/opkg 180 | mkdir -p files/www/ipv6-modules 181 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 182 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 183 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 184 | mkdir -p files/bin 185 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 186 | make package/install -j$(nproc) || make package/install -j1 V=s 187 | make target/install -j$(nproc) || make target/install -j1 V=s 188 | make checksum 189 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 190 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 191 | echo "::set-output name=GENERATE_STATUS::success" 192 | 193 | - name: Organize Files 194 | id: organize 195 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 196 | run: | 197 | #find . -type f -name '*.ipk' | while read FILE ; do 198 | #echo -e $(readlink -f ${FILE}) ; 199 | #done 200 | cd openwrt/bin/targets/*/* 201 | rm -rf packages 202 | find . -type f -name 'openwrt-*' | while read FILE ; do 203 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 204 | echo -e $(readlink -f ${FILE}) ; 205 | mv "${FILE}" "${newfile}" ; 206 | done 207 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 208 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 209 | find . -type f -name 'sha256sums' | while read FILE ; do 210 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 211 | echo -e $(readlink -f ${FILE}) ; 212 | done 213 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 214 | echo "::set-output name=status::success" 215 | echo "::set-output name=ORGANIZE_STATUS::success" 216 | 217 | - name: Delete Older Releases and Tags 218 | uses: dev-drprasad/delete-older-releases@v0.2.0 219 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 220 | with: 221 | keep_latest: 30 222 | delete_tags: true 223 | delete_tag_pattern: helmiwrt 224 | env: 225 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 226 | 227 | - name: Generate New Release Tag 228 | id: tag 229 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 230 | run: | 231 | sleep 20 232 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 233 | touch release.txt 234 | echo "::set-output name=status::success" 235 | 236 | - name: Upload Firmware Files to GitHub Release 237 | uses: softprops/action-gh-release@v1 238 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 239 | env: 240 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 241 | with: 242 | prerelease: true 243 | name: HelmiWrt ${{ env.FILE_DATE }} 244 | tag_name: ${{ steps.tag.outputs.release_tag }} 245 | files: ${{ env.FIRMWARE }}/* 246 | -------------------------------------------------------------------------------- /.github/workflows/build-s9xxx-armvirt.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Repack HelmiWrt OS for s905x devices using GitHub Actions 4 | # Lisence: MIT 5 | # Repacker : Raditya Budi Handoko 6 | # HelmiWrt OS by helmiau.com 7 | #================================================= 8 | 9 | name: Build s9xxx armvirt based 10 | 11 | on: 12 | workflow_dispatch: 13 | # schedule: 14 | # - cron: 59 23 * * * 15 | # watch: 16 | # types: started 17 | 18 | env: 19 | REPO_URL: https://github.com/radityabh/amlogic-s9xxx-openwrt 20 | REPO_BRANCH: main 21 | HELMIWRT_REL: https://github.com/helmiau/HelmiWrt-OS/releases/download/helmiwrt 22 | HELMIWRT_FILENAME: helmiwrt-armvirt-64-default-rootfs.tar.gz 23 | UPLOAD_RELEASE: true 24 | TZ: Asia/Jakarta 25 | 26 | jobs: 27 | Build: 28 | runs-on: ubuntu-20.04 29 | if: github.event.repository.owner.id == github.event.sender.id 30 | 31 | steps: 32 | - name: Checkout 33 | uses: actions/checkout@v2 34 | 35 | - name: Initialization environment 36 | env: 37 | DEBIAN_FRONTEND: noninteractive 38 | run: | 39 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc 40 | sudo -E apt-get -qq update 41 | sudo -E apt-get -qq install $(curl -fsSL git.io/ubuntu-2004-openwrt) 42 | sudo -E apt-get -qq autoremove --purge 43 | sudo -E apt-get -qq clean 44 | sudo timedatectl set-timezone "$TZ" 45 | sudo mkdir -p /workdir 46 | sudo chown $USER:$GROUPS /workdir 47 | echo "COMPILE_STARTINGTIME=$(date +"%Y.%m.%d.%H:%M")" >> $GITHUB_ENV 48 | echo "BUILD_TAG=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 49 | export WORKFLOWNAME=$HELMIWRT_FILENAME 50 | echo "WORKFLOWNAME=$HELMIWRT_FILENAME" >> $GITHUB_ENV 51 | 52 | - name: Clone source code 53 | working-directory: /workdir 54 | run: | 55 | df -hT $PWD 56 | git clone --depth 1 $REPO_URL -b $REPO_BRANCH openwrt 57 | sed -i '/HelmiWrt_/c\ build_image_file="${out_path}/helmiwrt-\${build_op}-k\${kernel}.img"' openwrt/makeHelmi 58 | ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt 59 | 60 | - name: Install Feeds 61 | id: feeds 62 | run: | 63 | cd openwrt 64 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 65 | 66 | - name: Repacking HelmiWrt firmware 67 | id: build 68 | run: | 69 | cd $OPENWRTROOT 70 | [ -d openwrt-armvirt ] || mkdir -p openwrt-armvirt 71 | # Download Firmware 72 | echo "${{ env.BUILD_TAG }} build found ! Using this build for repack." 73 | wget -q --show-progress -P openwrt-armvirt $HELMIWRT_REL-${{ env.BUILD_TAG }}/$HELMIWRT_FILENAME 74 | # Build Firmware 75 | sudo chmod +x makeHelmi 76 | sudo ./makeHelmi -d -b s905x3_s905x2_s905x_s905w_s905d_s922x_s912 -k 5.4.0_5.15.15 -a false 77 | echo "PACKAGED_OUTPUTPATH=${PWD}/out" >> $GITHUB_ENV 78 | echo "PACKAGED_OUTPUTDATE=$(date +"%Y.%m.%d")" >> $GITHUB_ENV 79 | find . -type f -name '$HELMIWRT_FILENAME' -exec rm "{}" \; 80 | echo "::set-output name=status::success" 81 | 82 | - name: Upload Firmware Files to GitHub Release 83 | uses: ncipollo/release-action@v1 84 | if: steps.build.outputs.status == 'success' && !cancelled() 85 | with: 86 | allowUpdates: true 87 | prerelease: true 88 | token: ${{ secrets.HELMIWRT_RW }} 89 | name: HelmiWrt Test ${{ env.BUILD_TAG }} 90 | tag: helmiwrt-${{ env.BUILD_TAG }} 91 | artifacts: ${{ env.PACKAGED_OUTPUTPATH }}/helmiwrt-s9* 92 | body: | 93 | **HelmiWrt is custom OpenWrt build for** 94 | - Raspberry Pi 1,2,3,4 95 | - x86/64 (PC) 96 | - NanoPi R2C, R2S and R4S 97 | - OrangePi Zero, R1 Plus 98 | - Set-top-box s9xxx chipset 99 | [Donation here](https://www.helmiau.com/pay/index_en.html) • [Read more firmware info and guides](https://www.google.com/search?q=helmi+wrt+os) 100 | -------------------------------------------------------------------------------- /.github/workflows/build-test-x86-vmware.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # Description: Repack IMG.GZ image to VMDK image with GitHub Actions 3 | # Lisence: MIT 4 | # Author: Helmi Amirudin 5 | # Blog: https://helmiau.com 6 | #================================================= 7 | 8 | name: Test Build x86 VMWare 9 | 10 | on: 11 | workflow_dispatch: 12 | # schedule: 13 | # - cron: 0 17 * * * 14 | # watch: 15 | # types: started 16 | 17 | # https://github.com/helmiau/HelmiWrt-OS/releases/download/helmiwrt-2021.10.30/helmiwrt-x86-64-generic-squashfs-combined-efi.img.gz 18 | # https://github.com/helmiau/HelmiWrt-OS/releases/download/helmiwrt-2021.10.30/helmiwrt-x86-64-generic-squashfs-combined.img.gz 19 | # https://github.com/helmiau/HelmiWrt-OS/releases/download/helmiwrt-2021.10.30/helmiwrt-x86-generic-generic-squashfs-combined-efi.img.gz 20 | # https://github.com/helmiau/HelmiWrt-OS/releases/download/helmiwrt-2021.10.30/helmiwrt-x86-generic-generic-squashfs-combined.img.gz 21 | 22 | jobs: 23 | release: 24 | name: Generating ${{ matrix.name }}-${{ matrix.partition }}-${{ matrix.bootloader }} 25 | runs-on: ubuntu-latest 26 | strategy: 27 | fail-fast: false 28 | matrix: 29 | include: 30 | - name: generic 31 | partition: squashfs 32 | bootloader: combined 33 | - name: generic 34 | partition: squashfs 35 | bootloader: combined-efi 36 | #- name: 64 37 | # partition: squashfs 38 | # bootloader: combined 39 | #- name: 64 40 | # partition: squashfs 41 | # bootloader: combined-efi 42 | #- name: generic 43 | # partition: ext4 44 | # bootloader: combined 45 | #- name: generic 46 | # partition: ext4 47 | # bootloader: combined-efi 48 | #- name: 64 49 | # partition: ext4 50 | # bootloader: combined 51 | #- name: 64 52 | # partition: ext4 53 | # bootloader: combined-efi 54 | 55 | env: 56 | HELMIWRT_REL: https://github.com/helmiau/HelmiWrt-OS/releases/latest/download 57 | HELMIWRT_GZNAME: helmiwrt-x86-${{ matrix.name }}-generic-${{ matrix.partition }}-${{ matrix.bootloader }}.img.gz 58 | HELMIWRT_IMGNAME: helmiwrt-x86-${{ matrix.name }}-generic-${{ matrix.partition }}-${{ matrix.bootloader }}.img 59 | HELMIWRT_VMDKNAME: helmiwrt-x86-${{ matrix.name }}-generic-${{ matrix.partition }}-${{ matrix.bootloader }}.vmdk 60 | 61 | steps: 62 | - name: Checkout 63 | uses: actions/checkout@main 64 | 65 | - name: Initialization environment 66 | env: 67 | DEBIAN_FRONTEND: noninteractive 68 | run: | 69 | sudo -E apt-get -qq update 70 | sudo -E apt-get -qq install qemu qemu-utils zip unzip gzip wget 71 | sudo -E apt-get -qq autoremove --purge 72 | sudo -E apt-get -qq clean 73 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 74 | 75 | - name: Generate ${{ matrix.name }}-${{ matrix.partition }}-${{ matrix.bootloader }} vmdk image file 76 | id: download 77 | run: | 78 | df -hT $PWD 79 | mkdir openwrt 80 | cd openwrt 81 | if wget -S --spider $HELMIWRT_REL/$HELMIWRT_GZNAME 2>&1 | grep -q 'HTTP/1.1 200 OK'; then 82 | wget $HELMIWRT_REL/$HELMIWRT_GZNAME 83 | ls -R 84 | gunzip $HELMIWRT_GZNAME 85 | ls -R 86 | qemu-img -h 87 | qemu-img connect -f raw -O vmdk $HELMIWRT_IMGNAME $HELMIWRT_VMDKNAME 88 | ls -R 89 | echo "RELEASE_NAME=HelmiWrt-VMDK" >> $GITHUB_ENV 90 | echo "TAG_NAME=helmiwrt-vmdk" >> $GITHUB_ENV 91 | else 92 | exit 1 93 | fi 94 | echo "::set-output name=COMPILE_STATUS::success" 95 | -------------------------------------------------------------------------------- /.github/workflows/build-x86_64-ext4.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build x86_64 ext4 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-x86_64.img 22 | CONFIG_FILE: config/x86_64-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/x86-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/universal.config >> $OPENWRTROOT/.config 96 | sed -i 's/CONFIG_TARGET_ROOTFS_EXT4FS=n/CONFIG_TARGET_ROOTFS_EXT4FS=y/g' $OPENWRTROOT/.config 97 | sed -i 's/CONFIG_TARGET_ROOTFS_SQUASHFS=y/CONFIG_TARGET_ROOTFS_SQUASHFS=n/g' $OPENWRTROOT/.config 98 | # Add Configs to Kernel Config 99 | cat config/x86-kernel.config >> $OPENWRTROOT/target/linux/x86/config-5.4 100 | cat config/x86-kernel.config >> $OPENWRTROOT/target/linux/x86/64/config-5.4 101 | cd $OPENWRTROOT 102 | export BUILDDIR=$OPENWRTROOT 103 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 104 | ../$DIY_SH 105 | ../scripts/preset-clash-core.sh amd64 106 | ../scripts/preset-v2raya.sh 64 107 | ../scripts/preset-speedtest.sh x86_64 108 | ../scripts/preset-terminal-tools.sh 109 | 110 | - name: Load HelmiWrt Mods 111 | id: mods 112 | env: 113 | REPO_OWNER: helmiau 114 | REPO_NAME: HelmiWrt 115 | run: | 116 | cd $OPENWRTROOT 117 | git config --global credential.helper store 118 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 119 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 120 | cp -r filex/* package/base-files/files/ 121 | rm -rf filex 122 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 123 | chmod +x package/base-files/files/bin/* 124 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 125 | 126 | - name: Download Package 127 | id: package 128 | run: | 129 | cd $OPENWRTROOT 130 | make defconfig 131 | make download -j16 && make download -j16 132 | find dl -size -1024c -exec ls -l {} \; 133 | find dl -size -1024c -exec rm -f {} \; 134 | 135 | - name: Compile Tools 136 | id: tools 137 | run: | 138 | cd $OPENWRTROOT 139 | echo -e "$(nproc) thread compile" 140 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 141 | 142 | - name: Compile Packages 143 | id: compile 144 | run: | 145 | cd $OPENWRTROOT 146 | echo -e "$(nproc) thread compile" 147 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 148 | make diffconfig 149 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 150 | make package/index 151 | cd $OPENWRTROOT/bin/packages/* 152 | PLATFORM=$(basename `pwd`) 153 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 154 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 155 | cd $OPENWRTROOT/bin/targets/* 156 | TARGET=$(basename `pwd`) 157 | echo "TARGET=$TARGET" >> $GITHUB_ENV 158 | echo "::set-output name=TARGET::$(echo $TARGET)" 159 | cd * 160 | SUBTARGET=$(basename `pwd`) 161 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 162 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 163 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 164 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 165 | echo "::set-output name=COMPILE_STATUS::success" 166 | 167 | - name: Generate Firmware 168 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 169 | id: generate 170 | run: | 171 | cd data/opkg 172 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 173 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 174 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 175 | cd $OPENWRTROOT 176 | mkdir -p files/etc/uci-defaults/ 177 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 178 | mkdir -p files/etc/opkg 179 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 180 | mkdir -p files/www/snapshots 181 | cp -r bin/targets files/www/snapshots 182 | cp ../data/opkg/distfeeds.conf files/etc/opkg 183 | mkdir -p files/www/ipv6-modules 184 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 185 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 186 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 187 | mkdir -p files/bin 188 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 189 | make package/install -j$(nproc) || make package/install -j1 V=s 190 | make target/install -j$(nproc) || make target/install -j1 V=s 191 | make checksum 192 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 193 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 194 | echo "::set-output name=GENERATE_STATUS::success" 195 | 196 | - name: Organize Files 197 | id: organize 198 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 199 | run: | 200 | #find . -type f -name '*.ipk' | while read FILE ; do 201 | #echo -e $(readlink -f ${FILE}) ; 202 | #done 203 | cd ${FIRMWARE} 204 | rm -rf packages 205 | find . -type f -name 'openwrt-*' | while read FILE ; do 206 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 207 | echo -e $(readlink -f ${FILE}) ; 208 | mv "${FILE}" "${newfile}" ; 209 | done 210 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 211 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 212 | find . -type f -name 'sha256sums' | while read FILE ; do 213 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 214 | echo -e $(readlink -f ${FILE}) ; 215 | done 216 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 217 | echo "::set-output name=status::success" 218 | echo "::set-output name=ORGANIZE_STATUS::success" 219 | 220 | - name: Delete Older Releases and Tags 221 | uses: dev-drprasad/delete-older-releases@v0.2.0 222 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 223 | with: 224 | keep_latest: 30 225 | delete_tags: true 226 | delete_tag_pattern: helmiwrt 227 | env: 228 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 229 | 230 | - name: Generate New Release Tag 231 | id: tag 232 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 233 | run: | 234 | sleep 20 235 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 236 | touch release.txt 237 | echo "::set-output name=status::success" 238 | 239 | - name: Upload Firmware Files to GitHub Release 240 | uses: softprops/action-gh-release@v1 241 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 242 | env: 243 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 244 | with: 245 | prerelease: true 246 | name: HelmiWrt ${{ env.FILE_DATE }} 247 | tag_name: ${{ steps.tag.outputs.release_tag }} 248 | files: ${{ env.FIRMWARE }}/* 249 | -------------------------------------------------------------------------------- /.github/workflows/build-x86_64.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build x86_64 squashfs 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-x86_64.img 22 | CONFIG_FILE: config/x86_64-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/x86-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/universal.config >> $OPENWRTROOT/.config 96 | # Add Configs to Kernel Config 97 | cat config/x86-kernel.config >> $OPENWRTROOT/target/linux/x86/config-5.4 98 | cat config/x86-kernel.config >> $OPENWRTROOT/target/linux/x86/64/config-5.4 99 | cd $OPENWRTROOT 100 | export BUILDDIR=$OPENWRTROOT 101 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 102 | ../$DIY_SH 103 | ../scripts/preset-clash-core.sh amd64 104 | ../scripts/preset-v2raya.sh 64 105 | ../scripts/preset-speedtest.sh x86_64 106 | ../scripts/preset-terminal-tools.sh 107 | 108 | - name: Load HelmiWrt Mods 109 | id: mods 110 | env: 111 | REPO_OWNER: helmiau 112 | REPO_NAME: HelmiWrt 113 | run: | 114 | cd $OPENWRTROOT 115 | git config --global credential.helper store 116 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 117 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 118 | cp -r filex/* package/base-files/files/ 119 | rm -rf filex 120 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 121 | chmod +x package/base-files/files/bin/* 122 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 123 | 124 | - name: Download Package 125 | id: package 126 | run: | 127 | cd $OPENWRTROOT 128 | make defconfig 129 | make download -j16 && make download -j16 130 | find dl -size -1024c -exec ls -l {} \; 131 | find dl -size -1024c -exec rm -f {} \; 132 | 133 | - name: Compile Tools 134 | id: tools 135 | run: | 136 | cd $OPENWRTROOT 137 | echo -e "$(nproc) thread compile" 138 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 139 | 140 | - name: Compile Packages 141 | id: compile 142 | run: | 143 | cd $OPENWRTROOT 144 | echo -e "$(nproc) thread compile" 145 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 146 | make diffconfig 147 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 148 | make package/index 149 | cd $OPENWRTROOT/bin/packages/* 150 | PLATFORM=$(basename `pwd`) 151 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 152 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 153 | cd $OPENWRTROOT/bin/targets/* 154 | TARGET=$(basename `pwd`) 155 | echo "TARGET=$TARGET" >> $GITHUB_ENV 156 | echo "::set-output name=TARGET::$(echo $TARGET)" 157 | cd * 158 | SUBTARGET=$(basename `pwd`) 159 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 160 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 161 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 162 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 163 | echo "::set-output name=COMPILE_STATUS::success" 164 | 165 | - name: Generate Firmware 166 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 167 | id: generate 168 | run: | 169 | cd data/opkg 170 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 171 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 172 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 173 | cd $OPENWRTROOT 174 | mkdir -p files/etc/uci-defaults/ 175 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 176 | mkdir -p files/etc/opkg 177 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 178 | mkdir -p files/www/snapshots 179 | cp -r bin/targets files/www/snapshots 180 | cp ../data/opkg/distfeeds.conf files/etc/opkg 181 | mkdir -p files/www/ipv6-modules 182 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 183 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 184 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 185 | mkdir -p files/bin 186 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 187 | make package/install -j$(nproc) || make package/install -j1 V=s 188 | make target/install -j$(nproc) || make target/install -j1 V=s 189 | make checksum 190 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 191 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 192 | echo "::set-output name=GENERATE_STATUS::success" 193 | 194 | - name: Organize Files 195 | id: organize 196 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 197 | run: | 198 | #find . -type f -name '*.ipk' | while read FILE ; do 199 | #echo -e $(readlink -f ${FILE}) ; 200 | #done 201 | cd ${FIRMWARE} 202 | rm -rf packages 203 | find . -type f -name 'openwrt-*' | while read FILE ; do 204 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 205 | echo -e $(readlink -f ${FILE}) ; 206 | mv "${FILE}" "${newfile}" ; 207 | done 208 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 209 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 210 | find . -type f -name 'sha256sums' | while read FILE ; do 211 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 212 | echo -e $(readlink -f ${FILE}) ; 213 | done 214 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 215 | echo "::set-output name=status::success" 216 | echo "::set-output name=ORGANIZE_STATUS::success" 217 | 218 | - name: Delete Older Releases and Tags 219 | uses: dev-drprasad/delete-older-releases@v0.2.0 220 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 221 | with: 222 | keep_latest: 30 223 | delete_tags: true 224 | delete_tag_pattern: helmiwrt 225 | env: 226 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 227 | 228 | - name: Generate New Release Tag 229 | id: tag 230 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 231 | run: | 232 | sleep 20 233 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 234 | touch release.txt 235 | echo "::set-output name=status::success" 236 | 237 | - name: Upload Firmware Files to GitHub Release 238 | uses: softprops/action-gh-release@v1 239 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 240 | env: 241 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 242 | with: 243 | prerelease: true 244 | name: HelmiWrt ${{ env.FILE_DATE }} 245 | tag_name: ${{ steps.tag.outputs.release_tag }} 246 | files: ${{ env.FIRMWARE }}/* 247 | -------------------------------------------------------------------------------- /.github/workflows/build-x86_generic-ext4.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build x86_generic ext4 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-x86_generic.img 22 | CONFIG_FILE: config/x86_generic-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/x86-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/universal.config >> $OPENWRTROOT/.config 96 | sed -i 's/CONFIG_TARGET_ROOTFS_EXT4FS=n/CONFIG_TARGET_ROOTFS_EXT4FS=y/g' $OPENWRTROOT/.config 97 | sed -i 's/CONFIG_TARGET_ROOTFS_SQUASHFS=y/CONFIG_TARGET_ROOTFS_SQUASHFS=n/g' $OPENWRTROOT/.config 98 | # Add Configs to Kernel Config 99 | cat config/x86-kernel.config >> $OPENWRTROOT/target/linux/x86/config-5.4 100 | cat config/x86-kernel.config >> $OPENWRTROOT/target/linux/x86/64/config-5.4 101 | cd $OPENWRTROOT 102 | export BUILDDIR=$OPENWRTROOT 103 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 104 | ../$DIY_SH 105 | ../scripts/preset-clash-core.sh 386 106 | ../scripts/preset-v2raya.sh 32 107 | ../scripts/preset-speedtest.sh i386 108 | ../scripts/preset-terminal-tools.sh 109 | 110 | - name: Load HelmiWrt Mods 111 | id: mods 112 | env: 113 | REPO_OWNER: helmiau 114 | REPO_NAME: HelmiWrt 115 | run: | 116 | cd $OPENWRTROOT 117 | git config --global credential.helper store 118 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 119 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 120 | cp -r filex/* package/base-files/files/ 121 | rm -rf filex 122 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 123 | chmod +x package/base-files/files/bin/* 124 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 125 | 126 | - name: Download Package 127 | id: package 128 | run: | 129 | cd $OPENWRTROOT 130 | make defconfig 131 | make download -j16 && make download -j16 132 | find dl -size -1024c -exec ls -l {} \; 133 | find dl -size -1024c -exec rm -f {} \; 134 | 135 | - name: Compile Tools 136 | id: tools 137 | run: | 138 | cd $OPENWRTROOT 139 | echo -e "$(nproc) thread compile" 140 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 141 | 142 | - name: Compile Packages 143 | id: compile 144 | run: | 145 | cd $OPENWRTROOT 146 | echo -e "$(nproc) thread compile" 147 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 148 | make diffconfig 149 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 150 | make package/index 151 | cd $OPENWRTROOT/bin/packages/* 152 | PLATFORM=$(basename `pwd`) 153 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 154 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 155 | cd $OPENWRTROOT/bin/targets/* 156 | TARGET=$(basename `pwd`) 157 | echo "TARGET=$TARGET" >> $GITHUB_ENV 158 | echo "::set-output name=TARGET::$(echo $TARGET)" 159 | cd * 160 | SUBTARGET=$(basename `pwd`) 161 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 162 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 163 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 164 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 165 | echo "::set-output name=COMPILE_STATUS::success" 166 | 167 | - name: Generate Firmware 168 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 169 | id: generate 170 | run: | 171 | cd data/opkg 172 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 173 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 174 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 175 | cd $OPENWRTROOT 176 | mkdir -p files/etc/uci-defaults/ 177 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 178 | mkdir -p files/etc/opkg 179 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 180 | mkdir -p files/www/snapshots 181 | cp -r bin/targets files/www/snapshots 182 | cp ../data/opkg/distfeeds.conf files/etc/opkg 183 | mkdir -p files/www/ipv6-modules 184 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 185 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 186 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 187 | mkdir -p files/bin 188 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 189 | make package/install -j$(nproc) || make package/install -j1 V=s 190 | make target/install -j$(nproc) || make target/install -j1 V=s 191 | make checksum 192 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 193 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 194 | echo "::set-output name=GENERATE_STATUS::success" 195 | 196 | - name: Organize Files 197 | id: organize 198 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 199 | run: | 200 | #find . -type f -name '*.ipk' | while read FILE ; do 201 | #echo -e $(readlink -f ${FILE}) ; 202 | #done 203 | cd ${FIRMWARE} 204 | rm -rf packages 205 | find . -type f -name 'openwrt-*' | while read FILE ; do 206 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 207 | echo -e $(readlink -f ${FILE}) ; 208 | mv "${FILE}" "${newfile}" ; 209 | done 210 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 211 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 212 | find . -type f -name 'sha256sums' | while read FILE ; do 213 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 214 | echo -e $(readlink -f ${FILE}) ; 215 | done 216 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 217 | echo "::set-output name=status::success" 218 | echo "::set-output name=ORGANIZE_STATUS::success" 219 | 220 | - name: Delete Older Releases and Tags 221 | uses: dev-drprasad/delete-older-releases@v0.2.0 222 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 223 | with: 224 | keep_latest: 30 225 | delete_tags: true 226 | delete_tag_pattern: helmiwrt 227 | env: 228 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 229 | 230 | - name: Generate New Release Tag 231 | id: tag 232 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 233 | run: | 234 | sleep 20 235 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 236 | touch release.txt 237 | echo "::set-output name=status::success" 238 | 239 | - name: Upload Firmware Files to GitHub Release 240 | uses: softprops/action-gh-release@v1 241 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 242 | env: 243 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 244 | with: 245 | prerelease: true 246 | name: HelmiWrt ${{ env.FILE_DATE }} 247 | tag_name: ${{ steps.tag.outputs.release_tag }} 248 | files: ${{ env.FIRMWARE }}/* 249 | -------------------------------------------------------------------------------- /.github/workflows/build-x86_generic.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | # HelmiWrt by helmiau.com 8 | #================================================= 9 | 10 | name: Build x86_generic squashfs 11 | 12 | on: 13 | workflow_dispatch: 14 | # schedule: 15 | # - cron: 0 17 * * * 16 | # watch: 17 | # types: started 18 | 19 | env: 20 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 21 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-x86_generic.img 22 | CONFIG_FILE: config/x86_generic-lean-target.config 23 | DIY_SH: scripts/lean-openwrt.sh 24 | WEBROOT: /data/dnmp/www/openwrt.cc 25 | UPLOAD_FIRMWARE: true 26 | UPLOAD_BIN_DIR: true 27 | UPLOAD_RELEASE: true 28 | TZ: Asia/Jakarta 29 | 30 | jobs: 31 | Build: 32 | runs-on: ubuntu-18.04 33 | 34 | outputs: 35 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 36 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 37 | TARGET: ${{ steps.compile.outputs.TARGET }} 38 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 39 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 40 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 41 | 42 | steps: 43 | - name: Initialization Environment 44 | env: 45 | DEBIAN_FRONTEND: noninteractive 46 | run: | 47 | sudo -E apt-get -qq update 48 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) rdate 49 | sudo -E apt-get -qq autoremove --purge 50 | sudo -E apt-get -qq clean 51 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 52 | docker image prune -a -f 53 | echo "FILE_DATE=$(curl -sL https://api.github.com/repos/helmiau/HelmiWrt-OS/releases | jq -r 'first | .tag_name' | sed 's/helmiwrt-//g')" >> $GITHUB_ENV 54 | export WORKFLOWNAME=$TOOLCHAIN_NAME 55 | echo "WORKFLOWNAME=$TOOLCHAIN_NAME" >> $GITHUB_ENV 56 | 57 | - name: Free Up More Space 58 | uses: easimon/maximize-build-space@master 59 | with: 60 | root-reserve-mb: 256 61 | swap-size-mb: 1024 62 | remove-dotnet: 'true' 63 | remove-android: 'true' 64 | remove-haskell: 'true' 65 | overprovision-lvm: 'true' 66 | 67 | - name: Checkout 68 | uses: actions/checkout@main 69 | 70 | - name: Prepare Toolchain Image 71 | id: prepare 72 | run: | 73 | df -hT $PWD 74 | wget -q https://github.com/helmiau/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O toolchain-image.img 75 | mkdir openwrt-ro openwrt workdir overlay 76 | sudo mount -o loop toolchain-image.img openwrt-ro 77 | sudo mount -t overlay overlay -o lowerdir=openwrt-ro,upperdir=overlay,workdir=workdir openwrt 78 | cd openwrt 79 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 80 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 81 | git pull 82 | 83 | - name: Install Feeds 84 | id: feeds 85 | run: | 86 | cd $OPENWRTROOT 87 | chmod +x ../scripts/*.sh 88 | ../scripts/hook-feeds.sh 89 | 90 | - name: Load Custom Configuration 91 | run: | 92 | [ -e files ] && mv files $OPENWRTROOT/files 93 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 94 | cat config/x86-lean-extra.config >> $OPENWRTROOT/.config 95 | cat config/universal.config >> $OPENWRTROOT/.config 96 | # Add Configs to Kernel Config 97 | cat config/x86-kernel.config >> $OPENWRTROOT/target/linux/x86/config-5.4 98 | cat config/x86-kernel.config >> $OPENWRTROOT/target/linux/x86/64/config-5.4 99 | cd $OPENWRTROOT 100 | export BUILDDIR=$OPENWRTROOT 101 | echo "BUILDDIR=$OPENWRTROOT" >> $GITHUB_ENV 102 | ../$DIY_SH 103 | ../scripts/preset-clash-core.sh 386 104 | ../scripts/preset-v2raya.sh 32 105 | ../scripts/preset-speedtest.sh i386 106 | ../scripts/preset-terminal-tools.sh 107 | 108 | - name: Load HelmiWrt Mods 109 | id: mods 110 | env: 111 | REPO_OWNER: helmiau 112 | REPO_NAME: HelmiWrt 113 | run: | 114 | cd $OPENWRTROOT 115 | git config --global credential.helper store 116 | git clone https://${{ env.REPO_OWNER }}:${{ secrets.HELMIWRT_RW }}@github.com/${{ env.REPO_OWNER }}/${{ env.REPO_NAME }}-Plus.git filex 117 | rm -rf filex/{README.md,LICENSE,runbashing.sh} 118 | cp -r filex/* package/base-files/files/ 119 | rm -rf filex 120 | sed -i -e 's/\r$//' $(grep -rli "/bin/bash" "package/base-files/files/bin") 121 | chmod +x package/base-files/files/bin/* 122 | mv package/base-files/files/root/.oh-my-zsh/themes/ys.zsh-theme files/root/.oh-my-zsh/themes/ys.zsh-theme 123 | 124 | - name: Download Package 125 | id: package 126 | run: | 127 | cd $OPENWRTROOT 128 | make defconfig 129 | make download -j16 && make download -j16 130 | find dl -size -1024c -exec ls -l {} \; 131 | find dl -size -1024c -exec rm -f {} \; 132 | 133 | - name: Compile Tools 134 | id: tools 135 | run: | 136 | cd $OPENWRTROOT 137 | echo -e "$(nproc) thread compile" 138 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 139 | 140 | - name: Compile Packages 141 | id: compile 142 | run: | 143 | cd $OPENWRTROOT 144 | echo -e "$(nproc) thread compile" 145 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 146 | make diffconfig 147 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 148 | make package/index 149 | cd $OPENWRTROOT/bin/packages/* 150 | PLATFORM=$(basename `pwd`) 151 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 152 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 153 | cd $OPENWRTROOT/bin/targets/* 154 | TARGET=$(basename `pwd`) 155 | echo "TARGET=$TARGET" >> $GITHUB_ENV 156 | echo "::set-output name=TARGET::$(echo $TARGET)" 157 | cd * 158 | SUBTARGET=$(basename `pwd`) 159 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 160 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 161 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 162 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 163 | echo "::set-output name=COMPILE_STATUS::success" 164 | 165 | - name: Generate Firmware 166 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 167 | id: generate 168 | run: | 169 | cd data/opkg 170 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 171 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 172 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 173 | cd $OPENWRTROOT 174 | mkdir -p files/etc/uci-defaults/ 175 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 176 | mkdir -p files/etc/opkg 177 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 178 | mkdir -p files/www/snapshots 179 | cp -r bin/targets files/www/snapshots 180 | cp ../data/opkg/distfeeds.conf files/etc/opkg 181 | mkdir -p files/www/ipv6-modules 182 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 183 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 184 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*,kmod-iptunnel*} "files/www/ipv6-modules" 185 | mkdir -p files/bin 186 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 187 | make package/install -j$(nproc) || make package/install -j1 V=s 188 | make target/install -j$(nproc) || make target/install -j1 V=s 189 | make checksum 190 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 191 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 192 | echo "::set-output name=GENERATE_STATUS::success" 193 | 194 | - name: Organize Files 195 | id: organize 196 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 197 | run: | 198 | #find . -type f -name '*.ipk' | while read FILE ; do 199 | #echo -e $(readlink -f ${FILE}) ; 200 | #done 201 | cd ${FIRMWARE} 202 | rm -rf packages 203 | find . -type f -name 'openwrt-*' | while read FILE ; do 204 | newfile="$(echo ${FILE} |sed -e 's/openwrt-/helmiwrt-/')" ; 205 | echo -e $(readlink -f ${FILE}) ; 206 | mv "${FILE}" "${newfile}" ; 207 | done 208 | find . -type f -name 'config.buildinfo' -exec mv "{}" "helmiwrt-config-${{ env.DEVICE_NAME }}.txt" \; 209 | find . -type f -name 'sha256sums' -exec mv "{}" "helmiwrt-sha256sums-${{ env.DEVICE_NAME }}.txt" \; 210 | find . -type f -name 'sha256sums' | while read FILE ; do 211 | sed -i 's/openwrt-/helmiwrt-/g' ${FILE} ; 212 | echo -e $(readlink -f ${FILE}) ; 213 | done 214 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 215 | echo "::set-output name=status::success" 216 | echo "::set-output name=ORGANIZE_STATUS::success" 217 | 218 | - name: Delete Older Releases and Tags 219 | uses: dev-drprasad/delete-older-releases@v0.2.0 220 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && !cancelled() 221 | with: 222 | keep_latest: 30 223 | delete_tags: true 224 | delete_tag_pattern: helmiwrt 225 | env: 226 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 227 | 228 | - name: Generate New Release Tag 229 | id: tag 230 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.organize.outputs.status == 'success' && env.UPLOAD_RELEASE == 'true' && !cancelled() 231 | run: | 232 | sleep 20 233 | echo "::set-output name=release_tag::helmiwrt-${{ env.FILE_DATE }}" 234 | touch release.txt 235 | echo "::set-output name=status::success" 236 | 237 | - name: Upload Firmware Files to GitHub Release 238 | uses: softprops/action-gh-release@v1 239 | if: steps.generate.outputs.GENERATE_STATUS == 'success' && steps.tag.outputs.status == 'success' && !cancelled() 240 | env: 241 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 242 | with: 243 | prerelease: true 244 | name: HelmiWrt ${{ env.FILE_DATE }} 245 | tag_name: ${{ steps.tag.outputs.release_tag }} 246 | files: ${{ env.FIRMWARE }}/* 247 | -------------------------------------------------------------------------------- /.github/workflows/delete-old-workflow-runs.yml: -------------------------------------------------------------------------------- 1 | name: Delete Workflow Runs 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | schedule: 7 | - cron: "0 0 * * *" 8 | 9 | jobs: 10 | del_runs: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Delete Workflow Runs 14 | uses: GitRML/delete-workflow-runs@main 15 | with: 16 | token: ${{ secrets.GITHUB_TOKEN }} 17 | retain_days: 14 18 | -------------------------------------------------------------------------------- /.github/workflows/ipk-uploader.yml: -------------------------------------------------------------------------------- 1 | #================================================= 2 | # https://github.com/P3TERX/Actions-OpenWrt 3 | # Description: Build OpenWrt using GitHub Actions 4 | # Lisence: MIT 5 | # Author: P3TERX 6 | # Blog: https://p3terx.com 7 | #================================================= 8 | 9 | name: IPK Uploads 10 | 11 | on: 12 | workflow_dispatch: 13 | # schedule: 14 | # - cron: 0 17 * * * 15 | # watch: 16 | # types: started 17 | 18 | env: 19 | TOOLCHAIN_TAG: coolsnowwolf-lede-master 20 | TOOLCHAIN_NAME: toolchain-image-coolsnowwolf-lede-master-bcm27xx-bcm2711.img 21 | CONFIG_FILE: config/rpi4-lean-target.config 22 | DIY_SH: scripts/lean-openwrt.sh 23 | WEBROOT: /data/dnmp/www/openwrt.cc 24 | UPLOAD_FIRMWARE: true 25 | UPLOAD_BIN_DIR: true 26 | UPLOAD_RELEASE: true 27 | TZ: Asia/Jakarta 28 | 29 | jobs: 30 | Build: 31 | runs-on: ubuntu-18.04 32 | 33 | outputs: 34 | OPENWRTROOT: ${{ steps.prepare.outputs.OPENWRTROOT }} 35 | PLATFORM: ${{ steps.compile.outputs.PLATFORM }} 36 | TARGET: ${{ steps.compile.outputs.TARGET }} 37 | SUBTARGET: ${{ steps.compile.outputs.SUBTARGET }} 38 | FIRMWARE: ${{ steps.compile.outputs.FIRMWARE }} 39 | GENERATE_STATUS: ${{ steps.generate.outputs.GENERATE_STATUS }} 40 | 41 | steps: 42 | - name: Checkout 43 | uses: actions/checkout@main 44 | 45 | - name: Initialization Environment 46 | env: 47 | DEBIAN_FRONTEND: noninteractive 48 | run: | 49 | sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc 50 | sudo -E apt-get -qq update 51 | sudo -E apt-get -qq install $(curl -fsSL git.io/depends-ubuntu-1804) libjsoncpp-dev pkg-config 52 | sudo -E apt-get -qq autoremove --purge 53 | sudo -E apt-get -qq clean 54 | sudo ln -sf /usr/share/zoneinfo/Asia/Jakarta /etc/localtime 55 | 56 | - name: Prepare Toolchain Image 57 | id: prepare 58 | run: | 59 | df -hT $PWD 60 | sudo swapoff -a 61 | sudo chown -R runner:runner /mnt 62 | sudo rm -f /mnt/swapfile 63 | wget -q https://github.com/SuLingGG/OpenWrt-Toolchain/releases/download/$TOOLCHAIN_TAG/$TOOLCHAIN_NAME -O /mnt/toolchain-image.img 64 | mkdir /mnt/openwrt-ro openwrt workdir overlay 65 | sudo mount -o loop /mnt/toolchain-image.img /mnt/openwrt-ro 66 | sudo mount -t overlay overlay -o lowerdir=/mnt/openwrt-ro,upperdir=overlay,workdir=workdir openwrt 67 | cd openwrt 68 | echo "OPENWRTROOT=$PWD" >> $GITHUB_ENV 69 | echo "::set-output name=OPENWRTROOT::$(echo $PWD)" 70 | git pull 71 | 72 | - name: Update Feeds 73 | id: update 74 | run: | 75 | cd $OPENWRTROOT 76 | mkdir customfeeds 77 | git clone --depth=1 https://github.com/coolsnowwolf/packages customfeeds/packages 78 | git clone --depth=1 https://github.com/coolsnowwolf/luci customfeeds/luci 79 | chmod +x ../scripts/*.sh 80 | ../scripts/hook-feeds.sh 81 | 82 | - name: Install Feeds 83 | run: | 84 | cd $OPENWRTROOT 85 | ./scripts/feeds install -a 86 | 87 | - name: Load Custom Configuration 88 | run: | 89 | [ -e files ] && mv files $OPENWRTROOT/files 90 | [ -e $CONFIG_FILE ] && mv $CONFIG_FILE $OPENWRTROOT/.config 91 | cat config/rpi-lean-extra.config >> $OPENWRTROOT/.config 92 | cd $OPENWRTROOT 93 | echo -e "CONFIG_USB_LAN78XX=y\nCONFIG_USB_NET_DRIVERS=y" >> target/linux/bcm27xx/bcm2711/config-5.4 94 | mkdir -p files/lib/firmware/brcm/ 95 | wget -q https://raw.githubusercontent.com/openwrt/cypress-nvram/master/brcmfmac43455-sdio.raspberrypi%2C4-model-b.txt -O files/lib/firmware/brcm/brcmfmac43455-sdio.raspberrypi,4-compute-module.txt 96 | ../$DIY_SH 97 | ../scripts/preset-clash-core.sh armv8 98 | ../scripts/preset-terminal-tools.sh 99 | ../scripts/enable-rpi4-wifi.sh 100 | 101 | - name: Download Package 102 | id: package 103 | run: | 104 | cd $OPENWRTROOT 105 | make defconfig 106 | make download -j16 && make download -j16 107 | find dl -size -1024c -exec ls -l {} \; 108 | find dl -size -1024c -exec rm -f {} \; 109 | 110 | - name: Compile Packages 111 | id: compile 112 | run: | 113 | cd $OPENWRTROOT 114 | echo -e "$(nproc) thread compile" 115 | make tools/compile -j$(nproc) || make tools/compile -j1 V=s 116 | make target/compile -j$(nproc) || make target/compile -j1 V=s IGNORE_ERRORS=1 117 | make diffconfig 118 | make package/compile -j$(nproc) IGNORE_ERRORS=1 || make package/compile -j1 V=s IGNORE_ERRORS=1 119 | make package/index 120 | cd $OPENWRTROOT/bin/packages/* 121 | PLATFORM=$(basename `pwd`) 122 | echo "PLATFORM=$PLATFORM" >> $GITHUB_ENV 123 | echo "::set-output name=PLATFORM::$(echo $PLATFORM)" 124 | cd $OPENWRTROOT/bin/targets/* 125 | TARGET=$(basename `pwd`) 126 | echo "TARGET=$TARGET" >> $GITHUB_ENV 127 | echo "::set-output name=TARGET::$(echo $TARGET)" 128 | cd * 129 | SUBTARGET=$(basename `pwd`) 130 | echo "SUBTARGET=$SUBTARGET" >> $GITHUB_ENV 131 | echo "::set-output name=SUBTARGET::$(echo $SUBTARGET)" 132 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 133 | echo "::set-output name=FIRMWARE::$(echo $PWD)" 134 | echo "::set-output name=COMPILE_STATUS::success" 135 | 136 | - name: Generate Firmware 137 | if: steps.compile.outputs.COMPILE_STATUS == 'success' 138 | id: generate 139 | run: | 140 | cd data/opkg 141 | sed -i "s/subtarget/$SUBTARGET/g" distfeeds*.conf 142 | sed -i "s/target\//$TARGET\//g" distfeeds*.conf 143 | sed -i "s/platform/$PLATFORM/g" distfeeds*.conf 144 | cd $OPENWRTROOT 145 | echo "dtparam=i2c_arm=on,audio=on" >> target/linux/bcm27xx/image/config.txt 146 | mkdir -p files/etc/uci-defaults/ 147 | cp ../scripts/init-settings.sh files/etc/uci-defaults/99-init-settings 148 | mkdir -p files/etc/opkg 149 | cp ../data/opkg/distfeeds.conf.mirror files/etc/opkg 150 | mkdir -p files/www/snapshots 151 | cp -r bin/targets files/www/snapshots 152 | cp ../data/opkg/distfeeds.conf files/etc/opkg 153 | mkdir -p files/www/ipv6-modules 154 | cp bin/packages/$PLATFORM/luci/luci-proto-ipv6* files/www/ipv6-modules 155 | cp bin/packages/$PLATFORM/base/{ipv6helper*,odhcpd-ipv6only*,odhcp6c*,6in4*} "files/www/ipv6-modules" 156 | cp bin/targets/$TARGET/$SUBTARGET/packages/{ip6tables*,kmod-nf-nat6*,kmod-ipt-nat6*,kmod-sit*,kmod-ip6tables-extra*} "files/www/ipv6-modules" 157 | mkdir -p files/bin 158 | cp ../scripts/ipv6-helper.sh files/bin/ipv6-helper 159 | make package/install -j$(nproc) || make package/install -j1 V=s 160 | make target/install -j$(nproc) || make target/install -j1 V=s 161 | make checksum 162 | grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME 163 | [ -s DEVICE_NAME ] && echo "DEVICE_NAME=$(cat DEVICE_NAME)" >> $GITHUB_ENV 164 | echo "FILE_DATE=$(date +"%Y.%m.%d")" >> $GITHUB_ENV 165 | echo "::set-output name=GENERATE_STATUS::success" 166 | 167 | - name: Upload Bin Folder 168 | uses: actions/upload-artifact@main 169 | if: steps.generate.outputs.GENERATE_STATUS == 'success' 170 | with: 171 | name: bin-archive 172 | path: openwrt/bin 173 | 174 | - name: Organize Files 175 | id: organize 176 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 177 | run: | 178 | ls -R | grep .ipk 179 | cd openwrt/bin/targets/*/* 180 | [ -d ipk ] || mkdir -p ipk 181 | cp -rf $(find openwrt/bin/packages/ -type f -name "*all.ipk") ipk/ 182 | rm -rf packages 183 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 184 | echo "::set-output name=status::success" 185 | echo "::set-output name=ORGANIZE_STATUS::success" 186 | 187 | - name: Pushes IPK to helmiwrt-opkg repo 188 | uses: dmnemec/copy_file_to_another_repo_action@main 189 | env: 190 | API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} 191 | with: 192 | source_file: 'test2.md' 193 | destination_repo: 'helmiau/helmiwrt-opkg' 194 | destination_folder: 'ipk' 195 | user_email: 'helmilaw@gmail.com' 196 | user_name: 'helmiau' 197 | commit_message: 'Uploa' 198 | 199 | - name: Cleaning Up 200 | id: organize 201 | if: env.UPLOAD_FIRMWARE == 'true' && steps.generate.outputs.GENERATE_STATUS == 'success' && !cancelled() 202 | run: | 203 | cd openwrt/bin/targets/*/* 204 | rm -rf packages 205 | echo "FIRMWARE=$PWD" >> $GITHUB_ENV 206 | echo "::set-output name=status::success" 207 | echo "::set-output name=ORGANIZE_STATUS::success" 208 | 209 | - name: Delete Workflow Runs 210 | uses: GitRML/delete-workflow-runs@main 211 | with: 212 | retain_days: 1 213 | keep_minimum_runs: 3 214 | 215 | - name: Delete Artifacts 216 | uses: geekyeggo/delete-artifact@v1 217 | with: 218 | name: | 219 | bin-archive 220 | -------------------------------------------------------------------------------- /.github/workflows/releases-cleaner.yml: -------------------------------------------------------------------------------- 1 | name: Release GitHub Cleaner 2 | 3 | on: 4 | workflow_dispatch: 5 | 6 | # schedule: 7 | # - cron: "0 0 * * *" 8 | 9 | jobs: 10 | del_runs: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Delete All Releases and Tags 14 | uses: dev-drprasad/delete-older-releases@v0.2.0 15 | with: 16 | keep_latest: 0 17 | delete_tags: true 18 | env: 19 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 20 | 21 | - name: Delete Drafts 22 | uses: hugo19941994/delete-draft-releases@v0.1.0 23 | env: 24 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 25 | 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | files/bin/helmilbv2 3 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 SuLingGG 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 |

All information about this firmware, features, installations, screenshots, video preview, credits etc. can be found at

2 |

Helmi Amirudin | HelmiWrt OS is Customized OpenWrt Firmware

3 |

because it has translations feature. This will make it easier for you to understand each point.

4 | 5 |

Donation Here

6 | 7 |
Copyright by Helmi Amirudin ® 2021
Thank You ! 🤝
8 | -------------------------------------------------------------------------------- /config/all-rockhip-armv8.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_rockchip=y 3 | CONFIG_TARGET_rockchip_armv8=y 4 | CONFIG_TARGET_MULTI_PROFILE=y 5 | CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2s=y 6 | CONFIG_TARGET_DEVICE_PACKAGES_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2s="" 7 | CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2c=y 8 | CONFIG_TARGET_DEVICE_PACKAGES_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2c="" 9 | CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s=y 10 | CONFIG_TARGET_DEVICE_PACKAGES_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s="kmod-usb-net-rtl8152-vendor" 11 | CONFIG_TARGET_DEVICE_rockchip_armv8_DEVICE_xunlong_orangepi-r1-plus=y 12 | CONFIG_TARGET_DEVICE_PACKAGES_rockchip_armv8_DEVICE_xunlong_orangepi-r1-plus="" 13 | -------------------------------------------------------------------------------- /config/armvirt64.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_armvirt=y 3 | CONFIG_TARGET_armvirt_64=y 4 | CONFIG_TARGET_armvirt_64_Default=y 5 | -------------------------------------------------------------------------------- /config/nanopi-r2c-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_rockchip=y 3 | CONFIG_TARGET_rockchip_armv8=y 4 | CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2c=y 5 | -------------------------------------------------------------------------------- /config/nanopi-r2s-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_rockchip=y 3 | CONFIG_TARGET_rockchip_armv8=y 4 | CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r2s=y 5 | -------------------------------------------------------------------------------- /config/nanopi-r4s-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_rockchip=y 3 | CONFIG_TARGET_rockchip_armv8=y 4 | CONFIG_TARGET_rockchip_armv8_DEVICE_friendlyarm_nanopi-r4s=y 5 | -------------------------------------------------------------------------------- /config/opi-lean-extra.config: -------------------------------------------------------------------------------- 1 | 2 | # Target Adds 3 | CONFIG_MODULES=y 4 | CONFIG_HAVE_DOT_CONFIG=y 5 | 6 | # Wireless Drivers 7 | CONFIG_PACKAGE_kmod-cfg80211=y 8 | CONFIG_PACKAGE_kmod-mac80211=y 9 | CONFIG_PACKAGE_MAC80211_DEBUGFS=y 10 | CONFIG_PACKAGE_MAC80211_MESH=y 11 | CONFIG_PACKAGE_kmod-rt2500-usb=y 12 | CONFIG_PACKAGE_kmod-rt2800-lib=y 13 | CONFIG_PACKAGE_kmod-rt2800-usb=y 14 | CONFIG_PACKAGE_kmod-rt2x00-lib=y 15 | CONFIG_PACKAGE_kmod-rt2x00-usb=y 16 | CONFIG_PACKAGE_kmod-rt73-usb=y 17 | CONFIG_PACKAGE_kmod-xradio=y 18 | CONFIG_PACKAGE_kmod-sunxi-ir=n -------------------------------------------------------------------------------- /config/opi-r1plus-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_rockchip=y 3 | CONFIG_TARGET_rockchip_armv8=y 4 | CONFIG_TARGET_rockchip_armv8_DEVICE_xunlong_orangepi-r1-plus=y 5 | -------------------------------------------------------------------------------- /config/opi-zero-lean-target.config: -------------------------------------------------------------------------------- 1 | #Target 2 | CONFIG_TARGET_sunxi=y 3 | CONFIG_TARGET_sunxi_cortexa7=y 4 | CONFIG_TARGET_sunxi_cortexa7_DEVICE_xunlong_orangepi-zero=y 5 | -------------------------------------------------------------------------------- /config/rockchip-lean-extra.config: -------------------------------------------------------------------------------- 1 | 2 | # Output 3 | CONFIG_USES_DEVICETREE=y 4 | CONFIG_USES_INITRAMFS=y 5 | CONFIG_USES_SQUASHFS=y 6 | CONFIG_USES_EXT4=y 7 | CONFIG_USES_TARGZ=y 8 | CONFIG_USES_CPIOGZ=y 9 | CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y 10 | CONFIG_TARGET_UBIFS_JOURNAL_SIZE="" 11 | CONFIG_TARGET_IMAGES_GZIP=y 12 | 13 | # Video/Camera Support 14 | CONFIG_PACKAGE_kmod-i2c-algo-bit=y 15 | CONFIG_PACKAGE_kmod-i2c-algo-pca=y 16 | CONFIG_PACKAGE_kmod-i2c-algo-pcf=y 17 | CONFIG_PACKAGE_kmod-i2c-designware-pci=y 18 | CONFIG_PACKAGE_kmod-i2c-gpio=y 19 | CONFIG_PACKAGE_kmod-i2c-mux=y 20 | CONFIG_PACKAGE_kmod-i2c-mux-gpio=y 21 | CONFIG_PACKAGE_kmod-i2c-mux-pca9541=y 22 | CONFIG_PACKAGE_kmod-i2c-mux-pca954x=y 23 | CONFIG_PACKAGE_kmod-i2c-pxa=y 24 | CONFIG_PACKAGE_kmod-i2c-smbus=y 25 | CONFIG_PACKAGE_kmod-i2c-tiny-usb=y 26 | 27 | # Kmod 28 | CONFIG_PACKAGE_kmod-drm-rockchip=y 29 | CONFIG_PACKAGE_kmod-gpu-lima=y 30 | 31 | # LuCI App 32 | CONFIG_PACKAGE_luci-app-airplay2=y 33 | CONFIG_PACKAGE_luci-app-filetransfer=y 34 | CONFIG_PACKAGE_luci-app-oled=y 35 | 36 | # Others 37 | CONFIG_PACKAGE_hostapd=y 38 | CONFIG_PACKAGE_hostapd-basic=y 39 | CONFIG_PACKAGE_hostapd-utils=y 40 | CONFIG_PACKAGE_hostapd-common=y 41 | CONFIG_DRIVER_11AC_SUPPORT=y 42 | CONFIG_DRIVER_11N_SUPPORT=y 43 | CONFIG_DRIVER_11W_SUPPORT=y 44 | CONFIG_PACKAGE_iw=y 45 | CONFIG_PACKAGE_iwinfo=y 46 | CONFIG_PACKAGE_wpad=y 47 | CONFIG_PACKAGE_wpad-mini=y 48 | CONFIG_PACKAGE_wpad-openssl=y 49 | CONFIG_PACKAGE_wpa-supplicant=y 50 | -------------------------------------------------------------------------------- /config/rpi-lean-extra.config: -------------------------------------------------------------------------------- 1 | 2 | # Output Images 3 | CONFIG_TARGET_ROOTFS_EXT4FS=y 4 | CONFIG_TARGET_ROOTFS_SQUASHFS=y 5 | 6 | # Kernel Modules 7 | CONFIG_BNXT=n 8 | CONFIG_BNXT_SRIOV=n 9 | CONFIG_BNXT_FLOWER_OFFLOAD=n 10 | CONFIG_BNXT_DCB=n 11 | CONFIG_BNXT_HWMON=n 12 | 13 | # Extra Packages 14 | CONFIG_PACKAGE_autocore-arm=y 15 | 16 | # USB Suppport 17 | CONFIG_PACKAGE_kmod-usb-net=y 18 | CONFIG_PACKAGE_kmod-usb-net-asix=y 19 | CONFIG_PACKAGE_kmod-usb-net-asix-ax88179=y 20 | CONFIG_PACKAGE_kmod-usb-net2280=y 21 | CONFIG_PACKAGE_kmod-usb-storage=y 22 | CONFIG_PACKAGE_kmod-usb-storage-extras=y 23 | CONFIG_PACKAGE_kmod-usb-storage-uas=y 24 | CONFIG_PACKAGE_kmod-video-uvc=y 25 | 26 | CONFIG_PACKAGE_kmod-bnxt=n 27 | CONFIG_PACKAGE_kmod-bnxt-en=n 28 | CONFIG_PACKAGE_kmod-rt2800-lib=y 29 | CONFIG_PACKAGE_kmod-rt2800-usb=y 30 | CONFIG_PACKAGE_kmod-rt2x00-lib=y 31 | CONFIG_PACKAGE_kmod-rt2x00-usb=y 32 | CONFIG_PACKAGE_ath9k-htc-firmware=y 33 | CONFIG_PACKAGE_rt2800-usb-firmware=y 34 | 35 | # Utils 36 | CONFIG_PACKAGE_gpioctl-sysfs=y 37 | CONFIG_PACKAGE_gpiod-tools=y 38 | CONFIG_PACKAGE_i2c-tools=y 39 | CONFIG_PACKAGE_irqbalance=y 40 | 41 | # LED I2C 42 | CONFIG_PACKAGE_kmod-i2c-gpio=y 43 | CONFIG_PACKAGE_kmod-i2c-gpio-custom=y 44 | CONFIG_PACKAGE_kmod-i2c-algo-bit=y 45 | CONFIG_PACKAGE_kmod-i2c-algo-pcf=y 46 | CONFIG_PACKAGE_kmod-i2c-bcm2708=y 47 | CONFIG_PACKAGE_kmod-i2c-bcm2835=y 48 | CONFIG_PACKAGE_kmod-i2c-core=y 49 | CONFIG_PACKAGE_kmod-i2c-mux=y 50 | CONFIG_PACKAGE_python3-smbus=y 51 | -------------------------------------------------------------------------------- /config/rpi1-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_bcm27xx=y 3 | CONFIG_TARGET_bcm27xx_bcm2708=y 4 | CONFIG_TARGET_bcm27xx_bcm2708_DEVICE_rpi=y 5 | -------------------------------------------------------------------------------- /config/rpi2-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_bcm27xx=y 3 | CONFIG_TARGET_bcm27xx_bcm2709=y 4 | CONFIG_TARGET_bcm27xx_bcm2709_DEVICE_rpi-2=y 5 | -------------------------------------------------------------------------------- /config/rpi3-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_bcm27xx=y 3 | CONFIG_TARGET_bcm27xx_bcm2710=y 4 | CONFIG_TARGET_bcm27xx_bcm2710_DEVICE_rpi-3=y 5 | -------------------------------------------------------------------------------- /config/rpi4-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_bcm27xx=y 3 | CONFIG_TARGET_bcm27xx_bcm2711=y 4 | CONFIG_TARGET_bcm27xx_bcm2711_DEVICE_rpi-4=y 5 | -------------------------------------------------------------------------------- /config/x86-kernel.config: -------------------------------------------------------------------------------- 1 | 2 | # USB 3.0 Additional Suppport 3 | CONFIG_USB_EHCI_HCD=y 4 | CONFIG_USB_FHCI_HCD=y 5 | CONFIG_USB_HWA_HCD=y 6 | CONFIG_USB_ISP116X_HCD=y 7 | CONFIG_USB_ISP1760_HCD=y 8 | CONFIG_USB_OHCI_HCD=y 9 | CONFIG_USB_R8A66597_HCD=y 10 | CONFIG_USB_SL811_HCD=y 11 | CONFIG_USB_U132_HCD=y 12 | CONFIG_USB_UHCI_HCD=y 13 | CONFIG_USB_XHCI_HCD=y 14 | 15 | # I2C LED LCD 16 | CONFIG_I2C=y 17 | CONFIG_I2C_BOARDINFO=y 18 | CONFIG_I2C_COMPAT=y 19 | CONFIG_I2C_CHARDEV=y 20 | CONFIG_I2C_MUX=y 21 | CONFIG_I2C_ARB_GPIO_CHALLENGE=y 22 | CONFIG_I2C_MUX_GPIO=y 23 | CONFIG_I2C_MUX_GPMUX=y 24 | CONFIG_I2C_MUX_LTC4306=m 25 | CONFIG_I2C_MUX_PCA9541=m 26 | CONFIG_I2C_MUX_PCA954x=m 27 | CONFIG_I2C_MUX_PINCTRL=y 28 | CONFIG_I2C_MUX_REG=y 29 | CONFIG_I2C_DEMUX_PINCTRL=y 30 | CONFIG_I2C_MUX_MLXCPLD=m 31 | CONFIG_I2C_HELPER_AUTO=y 32 | CONFIG_I2C_ALGOBIT=y 33 | CONFIG_I2C_DESIGNWARE_CORE=y 34 | CONFIG_I2C_DESIGNWARE_SLAVE=y 35 | CONFIG_I2C_DESIGNWARE_PLATFORM=y 36 | CONFIG_I2C_DESIGNWARE_PCI=m 37 | CONFIG_I2C_GPIO=y 38 | CONFIG_I2C_GPIO_FAULT_INJECTOR=y 39 | CONFIG_I2C_MESON=y 40 | CONFIG_I2C_RK3X=y 41 | CONFIG_I2C_SLAVE=y 42 | CONFIG_I2C_SLAVE_EEPROM=m 43 | CONFIG_I2C_SLAVE_TESTUNIT=m 44 | CONFIG_SPI=y 45 | CONFIG_SPI_MASTER=y 46 | CONFIG_SPI_MEM=y 47 | -------------------------------------------------------------------------------- /config/x86_64-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_x86=y 3 | CONFIG_TARGET_x86_64=y 4 | CONFIG_TARGET_x86_64_DEVICE_generic=y 5 | -------------------------------------------------------------------------------- /config/x86_generic-lean-target.config: -------------------------------------------------------------------------------- 1 | # Target 2 | CONFIG_TARGET_x86=y 3 | CONFIG_TARGET_x86_generic=y 4 | CONFIG_TARGET_x86_generic_DEVICE_generic=y 5 | -------------------------------------------------------------------------------- /data/opkg/distfeeds.conf: -------------------------------------------------------------------------------- 1 | src/gz openwrt_core file:///www/snapshots/targets/target/subtarget/packages 2 | src/gz openwrt_base https://openwrt.cc/snapshots/packages/platform/base 3 | src/gz openwrt_luci https://openwrt.cc/snapshots/packages/platform/luci 4 | src/gz openwrt_packages https://openwrt.cc/snapshots/packages/platform/packages 5 | src/gz openwrt_routing https://openwrt.cc/snapshots/packages/platform/routing 6 | src/gz openwrt_telephony https://openwrt.cc/snapshots/packages/platform/telephony 7 | -------------------------------------------------------------------------------- /data/opkg/distfeeds.conf.mirror: -------------------------------------------------------------------------------- 1 | src/gz openwrt_core http://192.168.123.100:2345/snapshots/targets/target/subtarget/packages 2 | src/gz openwrt_base http://192.168.123.100:2345/snapshots/packages/platform/base 3 | src/gz openwrt_luci http://192.168.123.100:2345/snapshots/packages/platform/luci 4 | src/gz openwrt_packages http://192.168.123.100:2345/snapshots/packages/platform/packages 5 | src/gz openwrt_routing http://192.168.123.100:2345/snapshots/packages/platform/routing 6 | src/gz openwrt_telephony http://192.168.123.100:2345/snapshots/packages/platform/telephony 7 | -------------------------------------------------------------------------------- /data/rclone/upload-rule.txt: -------------------------------------------------------------------------------- 1 | # Rclone Packages Upload Rule 2 | - openwrt* 3 | - sha256sums 4 | - packages-server.zip 5 | - *.buildinfo 6 | + openwrt-keyring* 7 | -------------------------------------------------------------------------------- /data/zsh/.zshrc: -------------------------------------------------------------------------------- 1 | # If you come from bash you might have to change your $PATH. 2 | # export PATH=$HOME/bin:/usr/local/bin:$PATH 3 | 4 | # Path to your oh-my-zsh installation. 5 | export ZSH=$HOME/.oh-my-zsh 6 | 7 | # Set name of the theme to load --- if set to "random", it will 8 | # load a random theme each time oh-my-zsh is loaded, in which case, 9 | # to know which specific one was loaded, run: echo $RANDOM_THEME 10 | # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes 11 | ZSH_THEME="ys" 12 | 13 | # Set list of themes to pick from when loading at random 14 | # Setting this variable when ZSH_THEME=random will cause zsh to load 15 | # a theme from this variable instead of looking in $ZSH/themes/ 16 | # If set to an empty array, this variable will have no effect. 17 | # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) 18 | 19 | # Uncomment the following line to use case-sensitive completion. 20 | # CASE_SENSITIVE="true" 21 | 22 | # Uncomment the following line to use hyphen-insensitive completion. 23 | # Case-sensitive completion must be off. _ and - will be interchangeable. 24 | # HYPHEN_INSENSITIVE="true" 25 | 26 | # Uncomment the following line to disable bi-weekly auto-update checks. 27 | DISABLE_AUTO_UPDATE="true" 28 | 29 | # Uncomment the following line to automatically update without prompting. 30 | # DISABLE_UPDATE_PROMPT="true" 31 | 32 | # Uncomment the following line to change how often to auto-update (in days). 33 | # export UPDATE_ZSH_DAYS=13 34 | 35 | # Uncomment the following line if pasting URLs and other text is messed up. 36 | # DISABLE_MAGIC_FUNCTIONS="true" 37 | 38 | # Uncomment the following line to disable colors in ls. 39 | # DISABLE_LS_COLORS="true" 40 | 41 | # Uncomment the following line to disable auto-setting terminal title. 42 | # DISABLE_AUTO_TITLE="true" 43 | 44 | # Uncomment the following line to enable command auto-correction. 45 | # ENABLE_CORRECTION="true" 46 | 47 | # Uncomment the following line to display red dots whilst waiting for completion. 48 | # COMPLETION_WAITING_DOTS="true" 49 | 50 | # Uncomment the following line if you want to disable marking untracked files 51 | # under VCS as dirty. This makes repository status check for large repositories 52 | # much, much faster. 53 | # DISABLE_UNTRACKED_FILES_DIRTY="true" 54 | 55 | # Uncomment the following line if you want to change the command execution time 56 | # stamp shown in the history command output. 57 | # You can set one of the optional three formats: 58 | # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd" 59 | # or set a custom format using the strftime function format specifications, 60 | # see 'man strftime' for details. 61 | # HIST_STAMPS="mm/dd/yyyy" 62 | 63 | # Would you like to use another custom folder than $ZSH/custom? 64 | # ZSH_CUSTOM=/path/to/new-custom-folder 65 | 66 | # Which plugins would you like to load? 67 | # Standard plugins can be found in $ZSH/plugins/ 68 | # Custom plugins may be added to $ZSH_CUSTOM/plugins/ 69 | # Example format: plugins=(rails git textmate ruby lighthouse) 70 | # Add wisely, as too many plugins slow down shell startup. 71 | plugins=(git command-not-found extract z docker zsh-syntax-highlighting zsh-autosuggestions zsh-completions) 72 | 73 | source $ZSH/oh-my-zsh.sh 74 | 75 | # User configuration 76 | 77 | # export MANPATH="/usr/local/man:$MANPATH" 78 | 79 | # You may need to manually set your language environment 80 | # export LANG=en_US.UTF-8 81 | 82 | # Preferred editor for local and remote sessions 83 | # if [[ -n $SSH_CONNECTION ]]; then 84 | # export EDITOR='vim' 85 | # else 86 | # export EDITOR='mvim' 87 | # fi 88 | 89 | # Compilation flags 90 | # export ARCHFLAGS="-arch x86_64" 91 | 92 | # Set personal aliases, overriding those provided by oh-my-zsh libs, 93 | # plugins, and themes. Aliases can be placed here, though oh-my-zsh 94 | # users are encouraged to define aliases within the ZSH_CUSTOM folder. 95 | # For a full list of active aliases, run `alias`. 96 | # 97 | # Example aliases 98 | # alias zshconfig="mate ~/.zshrc" 99 | # alias ohmyzsh="mate ~/.oh-my-zsh" 100 | 101 | autoload -U compinit && compinit 102 | -------------------------------------------------------------------------------- /files/bin/ipqmi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #-------------------------------------------------------- 3 | # Don't remove this section for credits 4 | # Don't rename this file 5 | #-------------------------------------------------------- 6 | # If you use some codes frome here, please give credit to www.helmiau.com 7 | #-------------------------------------------------------- 8 | #-------------------------------------------------------- 9 | # This script for refresh IP Address of QMI Modems, such as LT4220 10 | # Script by Rudi Hartono https://www.facebook.com/rud18 11 | #-------------------------------------------------------- 12 | 13 | echo ===== IP Refresher for QMI Modems ===== 14 | echo 15 | ipku="$(echo AT^DEBUG? | atinout - /dev/ttyUSB2 - | grep -i 'IP:' | sed -e "s/IP: //g")" 16 | echo Current IP: $ipku 17 | #psw_on="$(echo AT+CFUN=4 | atinout - /dev/ttyUSB2 -)" 18 | echo Airplane Mode : ON 19 | echo Airplane Mode : OFF 20 | echo AT+CFUN=4 | atinout - /dev/ttyUSB2 - 21 | sleep 3 22 | echo AT+CFUN=1,1 | atinout - /dev/ttyUSB2 - 23 | sleep 5 24 | 25 | INTERFACE_MODEM="$(uci show network | grep -i 'qmi' | sed -e "s/network.//g" -e "s/.proto='qmi'//g")" 26 | #INTERFACE_MODEM="$(uci show network | grep 'qmi' | sed -e "s/network.\(.*\).proto='qmi'/\1/")" 27 | #INTERFACE_MODEM="$(uci show network | grep 'qmi' | awk -F'.' '$0=$2')" 28 | 29 | echo interface $INTERFACE_MODEM di refresh 30 | ifup $INTERFACE_MODEM 31 | sleep 5 32 | 33 | while true 34 | do 35 | 36 | 37 | ipx="$(ifconfig | grep -i 'P-t-P:')" 38 | if [ ${#ipx} == 0 ]; then 39 | echo "Interface Belum Terdeteksi" 40 | sleep 10 41 | ifup $INTERFACE_MODEM 42 | 43 | else 44 | 45 | echo "Interface Sudah Terdeteksi" 46 | echo AT^DEBUG? | atinout - /dev/ttyUSB2 - | grep -i 'IP:' 47 | break 48 | fi 49 | done -------------------------------------------------------------------------------- /files/bin/myip: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # --------------------------------------------------------------- 3 | # This script will inform you about your IP Address information 4 | # which taken from ip-api.com and show your IP Information 5 | # this script is created by helmiau a.k.a Helmi Amirudin 6 | # --------------------------------------------------------------- 7 | #-------------------------------------------------------- 8 | # If you use some codes frome here, please give credit to www.helmiau.com 9 | #-------------------------------------------------------- 10 | echo "==== IP Detail Information ====" > ipinfo.txt 11 | curl -s http://ip-api.com/json/\?fields=country,countryCode,region,regionName,city,timezone,isp,org,as,asname,query >> ipinfo.txt 12 | sed -i 's/{"//g' ipinfo.txt 13 | sed -i 's/","/\n/g' ipinfo.txt 14 | sed -i 's/":"/ : /g' ipinfo.txt 15 | sed -i 's/"}//g' ipinfo.txt 16 | sed -i 's/":/ : /g' ipinfo.txt 17 | sed -i 's/,"/\n/g' ipinfo.txt 18 | sed -i 's/status :/Status :/g' ipinfo.txt 19 | sed -i 's/continent :/Continent :/g' ipinfo.txt 20 | sed -i 's/continentCode :/Continent Code :/g' ipinfo.txt 21 | sed -i 's/country :/Country Name :/g' ipinfo.txt 22 | sed -i 's/countryCode :/Country Code :/g' ipinfo.txt 23 | sed -i 's/region :/Region :/g' ipinfo.txt 24 | sed -i 's/regionName :/Region Name :/g' ipinfo.txt 25 | sed -i 's/city :/City :/g' ipinfo.txt 26 | sed -i 's/zip :/ZIP Code :/g' ipinfo.txt 27 | sed -i 's/lat :/Latitude :/g' ipinfo.txt 28 | sed -i 's/lon :/Longitude :/g' ipinfo.txt 29 | sed -i 's/timezone :/Timezone :/g' ipinfo.txt 30 | sed -i 's/isp :/ISP :/g' ipinfo.txt 31 | sed -i 's/org :/Organization :/g' ipinfo.txt 32 | sed -i 's/as :/AS :/g' ipinfo.txt 33 | sed -i 's/asname :/AS Name :/g' ipinfo.txt 34 | sed -i 's/query :/IP Address :/g' ipinfo.txt 35 | echo " " >> ipinfo.txt 36 | echo "===============================" >> ipinfo.txt 37 | echo "== Created by helmiau ==" >> ipinfo.txt 38 | echo "===============================" >> ipinfo.txt 39 | cat ipinfo.txt 40 | rm ipinfo.txt 41 | -------------------------------------------------------------------------------- /files/bin/ssr: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================= 3 | # File name: ssr 4 | # Usage: ssr $start/stop/restart | example: ssr start 5 | # System Required: Linux 6 | # Version: 1.0 7 | # Lisence: MIT 8 | # Author: Helmi Amirudin 9 | #================================================= 10 | 11 | INITSSR=/etc/init.d/shadowsocksr 12 | 13 | if [[ $1 = "restart" ]]; then 14 | echo -e "Restarting ShadowSocksR+ Plus" 15 | $INITSSR restart 16 | elif [[ $1 = "stop" ]]; then 17 | echo -e "Stoping ShadowSocksR+ Plus" 18 | $INITSSR stop 19 | elif [[ $1 = "start" ]]; then 20 | echo -e "Starting ShadowSocksR+ Plus" 21 | $INITSSR start 22 | else 23 | echo -e "Welcome to ShadowSocksR+ Plus Shortscript !" 24 | echo -e "Run one of commands below :" 25 | echo -e " " 26 | echo -e "ssr start : To start ShadowSocksR+ Plus" 27 | echo -e "ssr stop : To stop ShadowSocksR+ Plus" 28 | echo -e "ssr restart : To restart ShadowSocksR+ Plus" 29 | echo -e " " 30 | echo -e "Script by Helmi Amirudin (helmiau.com)" 31 | fi 32 | -------------------------------------------------------------------------------- /files/etc/aria2/aria.log: -------------------------------------------------------------------------------- 1 | #aria2clog -------------------------------------------------------------------------------- /files/etc/aria2/aria2.conf: -------------------------------------------------------------------------------- 1 | dir=/mnt/sda1 2 | max-connection-per-server=2 3 | enable-rpc=true 4 | rpc-listen-port=6800 5 | rpc-listen-all=true 6 | check-integrity=false 7 | file-allocation=none 8 | log=/etc/aria2/aria2.log 9 | console-log-level=warn 10 | check-certificate=false 11 | rpc-save-upload-metadata=true 12 | continue=true 13 | input-file=/etc/aria2/session.txt 14 | save-session=/etc/aria2/session.txt 15 | save-session-interval=30 16 | -------------------------------------------------------------------------------- /files/etc/aria2/aria2.log: -------------------------------------------------------------------------------- 1 | nul 2 | -------------------------------------------------------------------------------- /files/etc/aria2/session.txt: -------------------------------------------------------------------------------- 1 | aria2session -------------------------------------------------------------------------------- /preview/openwrt-rpi-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-1.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-10.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-11.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-12.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-13.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-14.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-15.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-16.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-17.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-2.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-3.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-4.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-5.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-6.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-7.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-8.png -------------------------------------------------------------------------------- /preview/openwrt-rpi-9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/helmiau/HelmiWrt-OS/be4778881b2a2062f8b76f6f3fdd181fc1df2dcb/preview/openwrt-rpi-9.png -------------------------------------------------------------------------------- /scripts/enable-rpi4-wifi.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script is only for Raspberry Pi 4, Thanks @xmapst 4 | 5 | sed -i 's/36/44/g;s/VHT80/VHT20/g' package/kernel/mac80211/files/lib/wifi/mac80211.sh 6 | sed -i 's/disabled=1/disabled=0/g' package/kernel/mac80211/files/lib/wifi/mac80211.sh 7 | -------------------------------------------------------------------------------- /scripts/hook-feeds.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================= 3 | # File name: hook-feeds.sh 4 | # Author: SuLingGG 5 | # Blog: https://mlapp.cn 6 | #================================================= 7 | #-------------------------------------------------------- 8 | # If you use some codes frome here, please give credit to www.helmiau.com 9 | #-------------------------------------------------------- 10 | 11 | # Clone Lean's feeds 12 | mkdir customfeeds 13 | git clone --depth=1 https://github.com/coolsnowwolf/packages customfeeds/packages 14 | git clone --depth=1 https://github.com/coolsnowwolf/luci customfeeds/luci 15 | 16 | # Clone ImmortalWrt's feeds 17 | pushd customfeeds 18 | mkdir temp 19 | git clone --depth=1 https://github.com/immortalwrt/packages -b openwrt-18.06 temp/packages 20 | git clone --depth=1 https://github.com/immortalwrt/luci -b openwrt-18.06-k5.4 temp/luci 21 | 22 | # Add luci-app-adguardhome 23 | cp -r temp/luci/applications/luci-app-adguardhome luci/applications/luci-app-adguardhome 24 | sed -i 's#include ../../lang#include \$\(TOPDIR\)/feeds/packages/lang#g' temp/packages/net/adguardhome/Makefile 25 | cp -r temp/packages/net/adguardhome packages/net/adguardhome 26 | cp -r temp/packages/lang/node-yarn packages/lang/node-yarn 27 | cp -r temp/packages/devel/packr packages/devel/packr 28 | 29 | # Add luci-proto-modemmanager 30 | cp -r temp/luci/protocols/luci-proto-modemmanager luci/protocols/luci-proto-modemmanager 31 | 32 | # Remove watchcat config 33 | echo "" > packages/utils/watchcat/files/watchcat.config 34 | 35 | # Replace coolsnowwolf/lede php7 with immortalwrt source 36 | rm -rf packages/lang/php7 37 | cp -r temp/packages/lang/php7 packages/lang/php7 38 | 39 | # Replace coolsnowwolf/lede perl with immortalwrt source 40 | rm -rf packages/lang/perl 41 | cp -r temp/packages/lang/perl packages/lang/perl 42 | 43 | # Add tmate 44 | cp -r temp/packages/net/tmate packages/net/tmate 45 | cp -r temp/packages/libs/msgpack-c packages/libs/msgpack-c 46 | 47 | # Replace https-dns-proxy with immortalwrt source 48 | rm -rf packages/net/https-dns-proxy 49 | cp -r temp/packages/net/https-dns-proxy packages/net/https-dns-proxy 50 | 51 | # Add minieap and luci-proto-minieap 52 | cp -r temp/packages/net/minieap packages/net/minieap 53 | cp -r temp/luci/protocols/luci-proto-minieap luci/protocols/luci-proto-minieap 54 | 55 | # Add v2rayA 56 | cp -r temp/packages/net/xray-core packages/net/xray-core 57 | cp -r temp/packages/net/xray-plugin packages/net/xray-plugin 58 | rm -rf packages/net/v2raya 59 | cp -r temp/packages/net/v2raya packages/net/v2raya 60 | sed -i 's#include ../../lang/golang#include \$\(TOPDIR\)/feeds/packages/lang/golang#g' packages/net/v2raya/Makefile 61 | 62 | # Add luci-app-ramfree 63 | cp -r temp/luci/applications/luci-app-ramfree luci/applications/luci-app-ramfree 64 | 65 | # Add luci-theme-darkmatter 66 | cp -r temp/luci/themes/luci-theme-darkmatter luci/themes/luci-theme-darkmatter 67 | 68 | # Remove lede argon theme 69 | rm -rf luci/themes/luci-theme-argon 70 | 71 | # Fix modemmanager dw5821e by @neo_at (Nugroho) 72 | sed -i 's/$(LIBQMI/$(CONFIG_LIBQMI/g' packages/libs/libqmi/Makefile 73 | 74 | # Use older btrfs-progs 75 | # [ -f packages/utils/btrfs-progs/Makefile ] && rm -rf packages/utils/btrfs-progs/Makefile 76 | # [ -f packages/utils/btrfs-progs/patches/010-64bit.patch ] && packages/utils/btrfs-progs/patches/010-64bit.patch 77 | # wget -q https://raw.githubusercontent.com/coolsnowwolf/packages/49b749563915542ccb5b9805a8dcfbd911d8cc31/utils/btrfs-progs/Makefile -O packages/utils/btrfs-progs/Makefile 78 | 79 | # Clearing temp directory 80 | rm -rf temp 81 | popd 82 | 83 | # Set to local feeds 84 | pushd customfeeds/packages 85 | export packages_feed="$(pwd)" 86 | popd 87 | pushd customfeeds/luci 88 | export luci_feed="$(pwd)" 89 | popd 90 | if grep -q "src-git packages" "feeds.conf.default"; then 91 | #Old 92 | sed -i '/src-git packages/d' feeds.conf.default 93 | echo "src-link packages $packages_feed" >> feeds.conf.default 94 | sed -i '/src-git luci/d' feeds.conf.default 95 | echo "src-link luci $luci_feed" >> feeds.conf.default 96 | elif grep -q "src-git-full packages" "feeds.conf.default"; then 97 | #New: 15-02-2022 98 | sed -i '/src-git-full packages/d' feeds.conf.default 99 | echo "src-link packages $packages_feed" >> feeds.conf.default 100 | sed -i '/src-git-full luci/d' feeds.conf.default 101 | echo "src-link luci $luci_feed" >> feeds.conf.default 102 | fi 103 | 104 | # Update feeds 105 | ./scripts/feeds update -a 106 | ./scripts/feeds install -a 107 | -------------------------------------------------------------------------------- /scripts/init-settings.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================= 3 | # File name: init-settings.sh 4 | # Description: This script will be executed during the first boot 5 | # Author: SuLingGG 6 | # Blog: https://mlapp.cn 7 | #================================================= 8 | #-------------------------------------------------------- 9 | # If you use some codes frome here, please give credit to www.helmiau.com 10 | #-------------------------------------------------------- 11 | 12 | # Disable autostart by default for some packages 13 | rm -f /etc/rc.d/S99dockerd || true 14 | rm -f /etc/rc.d/S99dockerman || true 15 | rm -f /etc/rc.d/S30stubby || true 16 | rm -f /etc/rc.d/S90stunnel || true 17 | 18 | # Check file system during boot 19 | uci set fstab.@global[0].check_fs=1 20 | uci commit 21 | 22 | # Disable opkg signature check 23 | sed -i 's/option check_signature/# option check_signature/g' /etc/opkg.conf 24 | 25 | #----------------------------------------------------------------------------- 26 | # Start of @helmiau additionals menu 27 | #----------------------------------------------------------------------------- 28 | 29 | # Set Argon theme to light on first boot 30 | uci set argon.@global[0].mode='light' 31 | 32 | # Set hostname to HelmiWrt 33 | uci set system.@system[0].hostname='HelmiWrt' 34 | 35 | # Set Timezone to Asia/Jakarta 36 | uci set system.@system[0].timezone='WIB-7' 37 | uci set system.@system[0].zonename='Asia/Jakarta' 38 | uci commit system 39 | 40 | # Set default wifi name to HelmiWrt 41 | sed -i "s#option ssid 'OpenWrt'#option ssid 'HelmiWrt'#iIg" /etc/config/wireless 42 | 43 | # Add shadowsocksr shortcut 44 | chmod +x /bin/ssr 45 | 46 | # Added neofetch on oh-my-zsh 47 | echo "neofetch" > /root/.oh-my-zsh/custom/example.zsh 48 | chmod +x /bin/neofetch 49 | neofetch 50 | 51 | # Add ram checker from wegare123 52 | # run "ram" using terminal to check ram usage 53 | chmod +x /bin/ram 54 | 55 | # Add fix download file.php for xderm and libernet 56 | # run "fixphp" using terminal for use 57 | chmod +x /bin/fixphp 58 | 59 | # Add IP Address Info Checker 60 | # run "myip" using terminal for use 61 | chmod +x /bin/myip 62 | 63 | # Add Samba Allowed Guest Setup 64 | # run "sambaset" using terminal to set it up 65 | chmod +x /bin/sambaset 66 | 67 | # Add refresh IP Address for QMI Modems, such as LT4220 68 | # Script by Rudi Hartono https://www.facebook.com/rud18 69 | chmod +x /bin/ipqmi 70 | 71 | # Fix luci-app-atinout-mod by 4IceG 72 | chmod +x /usr/bin/luci-app-atinout 73 | 74 | # Fix for xderm mini gui if trojan is not installed 75 | ln -sf /usr/sbin/trojan /usr/bin/trojan 76 | 77 | # HelmiWrt Patches 78 | chmod +x /bin/helmiwrt 79 | helmiwrt 80 | 81 | # Add default interfaces 82 | helmiwrt addinterfacefirewall 83 | 84 | # HelmiWrt Patches 85 | if ! grep -q "helmiwrt" /etc/rc.local; then 86 | sed -i 's#exit 0#\n#g' /etc/rc.local 87 | cat << 'EOF' >> /etc/rc.local 88 | 89 | chmod +x /bin/helmiwrt 90 | /bin/helmiwrt 91 | exit 0 92 | EOF 93 | logger " helmilog : helmipatch already applied to on-boot..." 94 | echo -e " helmilog : helmipatch already applied to on-boot..." 95 | fi 96 | 97 | # Set default theme to luci-theme-argon 98 | # Delete default watchcat setting 99 | # Set Google DNS as default DNS Forwarding 100 | cat << 'EOF' > /bin/default-theme 101 | 102 | uci set luci.main.mediaurlbase='/luci-static/argon' 103 | uci commit luci 104 | 105 | uci add_list dhcp.@dnsmasq[0].server='8.8.8.8' 106 | uci add_list dhcp.@dnsmasq[0].server='8.8.4.4' 107 | uci commit dhcp 108 | /etc/init.d/dnsmasq restart 109 | 110 | EOF 111 | chmod +x /bin/default-theme 112 | default-theme 113 | 114 | # Add my Load Balance settings 115 | chmod +x /bin/helmilb 116 | #helmilb 117 | 118 | # Add clashcs script : OpenClash Core switcher 119 | chmod +x /bin/ocsm 120 | 121 | # Add : v2rayA Script Manager : This script will help you to install v2rayA software to your openwrt device 122 | # read more about v2rayA here 123 | chmod +x /bin/vasm 124 | 125 | # Bye-bye zh_cn 126 | opkg remove $(opkg list-installed | grep zh-cn) 127 | 128 | # start v2rayA service on boot 129 | # sed -i "s#option enabled.*#option enabled '1'#g" /etc/config/v2raya 130 | # /etc/init.d/v2raya enable 131 | # /etc/init.d/v2raya start 132 | # /etc/init.d/v2raya reload 133 | # /etc/init.d/v2raya restart 134 | 135 | # activate TUN TAP interface 136 | /usr/sbin/openvpn --mktun --dev tun0 137 | /usr/sbin/openvpn --mktun --dev tun1 138 | 139 | # Apply your own customization on boot features 140 | if grep -q "helmiwrt.sh" /boot/helmiwrt.sh; then 141 | logger " helmilog : detected helmiwrt.sh boot script, running script..." 142 | echo -e " helmilog : detected helmiwrt.sh boot script, running script..." 143 | chmod +x /boot/helmiwrt.sh 144 | ./boot/helmiwrt.sh 145 | logger " helmilog : helmiwrt.sh boot script running done!" 146 | echo -e " helmilog : helmiwrt.sh boot script running done!" 147 | fi 148 | 149 | # Disable etc/config/xmm-modem on boot first 150 | if [[ -f /etc/config/xmm-modem ]]; then 151 | logger " helmilog : detected helmiwrt.sh boot script, running script..." 152 | echo -e " helmilog : detected helmiwrt.sh boot script, running script..." 153 | sed -i "s#option enable.*#option enable '0'#g" /etc/config/xmm-modem 154 | logger " helmilog : helmiwrt.sh boot script running done!" 155 | echo -e " helmilog : helmiwrt.sh boot script running done!" 156 | fi 157 | 158 | # Set Custom TTL 159 | cat << 'EOF' >> /etc/firewall.user 160 | 161 | # Set Custom TTL 162 | iptables -t mangle -I POSTROUTING -o -j TTL --ttl-set 65 163 | iptables -t mangle -I PREROUTING -i -j TTL --ttl-set 65 164 | ip6tables -t mangle -I POSTROUTING ! -p icmpv6 -o -j HL --hl-set 65 165 | ip6tables -t mangle -I PREROUTING ! -p icmpv6 -i -j HL --hl-set 65 166 | 167 | EOF 168 | /etc/config/firewall restart 169 | 170 | # Add Driver wifi rtl8723bu ds866 and set wireless on at x86 devices 171 | if [ -e "/sbin/getcpu" ] && grep -q "MHz MHz" /sbin/cpuinfo; then 172 | sed -i "s|iw |ipconfig |g" /lib/netifd/wireless/mac80211.sh 173 | fi 174 | 175 | # Fix 3ginfo 176 | chmod +x /etc/init.d/3ginfo 177 | chmod +x /usr/share/3ginfo/scripts/* 178 | chmod +x /usr/share/3ginfo/cgi-bin/* 179 | 180 | # Fix xdrtool: Xderm Mini Tool Script permission 181 | chmod +x /bin/xdrtool 182 | 183 | # Fix atinout permission 184 | chmod +x /sbin/set_at_port.sh 185 | 186 | # Fix sms tool 187 | chmod +x /etc/init.d/smsled 188 | chmod +x /sbin/cronsync.sh 189 | chmod +x /sbin/set_sms_ports.sh 190 | chmod +x /sbin/smsled-init.sh 191 | chmod +x /sbin/smsled.sh 192 | 193 | # Add wegare123 stl tool 194 | # run "stl" using terminal for use 195 | chmod +x /usr/bin/gproxy 196 | chmod +x /usr/bin/stl 197 | chmod +x /root/akun/tunnel.py 198 | chmod +x /root/akun/ssh.py 199 | chmod +x /root/akun/inject.py 200 | chmod +x /usr/bin/autorekonek-stl 201 | mkdir -p /root/.ssh/ 202 | touch /root/akun/ssl.conf 203 | touch /root/.ssh/config 204 | touch /root/akun/stl.txt 205 | touch /root/akun/ipmodem.txt 206 | 207 | # Add wifi id seamless autologin by kopijahe 208 | # run "kopijahe" using terminal for use 209 | chmod +x /bin/kopijahe 210 | 211 | #----------------------------------------------------------------------------- 212 | # Start of @helmiau additionals menu 213 | #----------------------------------------------------------------------------- 214 | 215 | exit 0 216 | -------------------------------------------------------------------------------- /scripts/ipv6-helper.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ash 2 | #================================================= 3 | # File name: ipv6-helper 4 | # Description: Install IPV6 Modules On OpenWrt 5 | # System Required: OpenWrt 6 | # Version: 1.0 7 | # Lisence: MIT 8 | # Author: SuLingGG 9 | # Blog: https://mlapp.cn 10 | #================================================= 11 | 12 | Green_font_prefix="\033[32m" 13 | Red_font_prefix="\033[31m" 14 | Green_background_prefix="\033[42;37m" 15 | Red_background_prefix="\033[41;37m" 16 | Font_color_suffix="\033[0m" 17 | INFO="[${Green_font_prefix}INFO${Font_color_suffix}]" 18 | ERROR="[${Red_font_prefix}ERROR${Font_color_suffix}]" 19 | 20 | Welcome(){ 21 | echo -e "${Green_font_prefix}\nThis tool can help you install IPV6 modules on OpenWrt.\n${Font_color_suffix}" 22 | echo -e "Usage:" 23 | echo -e "ipv6-helper sub-command" 24 | echo -e "Example:" 25 | echo -e "\tipv6-helper install: Install ipv6-helper & IPV6 modules" 26 | echo -e "\tipv6-helper remove: Remove ipv6-helper & IPV6 modules\n" 27 | echo -e "Optional Usage:" 28 | echo -e "\tipv6-helper server: Set IPV6 configuration to server mode" 29 | echo -e "\tipv6-helper relay: Set IPV6 configuration to relay mode" 30 | echo -e "\tipv6-helper hybrid: Set IPV6 configuration to hybrid mode" 31 | echo -e "\tipv6-helper clean: Remove mwan3 modules\n" 32 | } 33 | 34 | RebootConfirm(){ 35 | echo -n -e "${Green_font_prefix}Need reboot, reboot now [y/N] (default N)? ${Font_color_suffix}" 36 | read answer 37 | case $answer in 38 | Y | y) 39 | echo -e "Rebooting...\n" && reboot;; 40 | *) 41 | echo -e "You can reboot later manually.\n";; 42 | esac 43 | } 44 | 45 | CheckInstall(){ 46 | if [ ! -f "/etc/opkg/ipv6-installed" ];then 47 | echo -e "${Red_background_prefix}\nYou shoud execute 'ipv6-helper install' first.\n${Font_color_suffix}" 48 | else 49 | echo -e "${Green_font_prefix}\nConfiguring...\n${Font_color_suffix}" 50 | fi 51 | } 52 | 53 | if [ $# == 0 ];then 54 | Welcome 55 | 56 | elif [[ $1 = "install" ]]; then 57 | echo -e "${Green_font_prefix}\nInstalling IPV6 modules...\n${Font_color_suffix}" 58 | cd /www/ipv6-modules 59 | opkg install *.ipk 60 | echo -e "${Green_font_prefix}\nIPV6 modules install successfully.\n${Font_color_suffix}" 61 | echo -e "${Green_font_prefix}Configuring IPV6...\n${Font_color_suffix}" 62 | 63 | # Set server to lan 64 | uci set dhcp.lan.dhcpv6=server 65 | uci set dhcp.lan.ra=server 66 | uci set dhcp.lan.ndp=hybrid 67 | uci set dhcp.lan.ra_management=1 68 | uci set dhcp.lan.ra_default=1 69 | 70 | # Set server to wan6 71 | uci set dhcp.wan6=dhcp 72 | uci set dhcp.wan6.interface=wan 73 | uci set dhcp.wan6.ra=server 74 | uci set dhcp.wan6.dhcpv6=server 75 | uci set dhcp.wan6.ndp=hybrid 76 | uci set dhcp.wan6.master=1 77 | 78 | # Disable IPV6 ula prefix 79 | sed -i 's/^[^#].*option ula/#&/' /etc/config/network 80 | 81 | # Enable IPV6 dns resolution 82 | uci delete dhcp.@dnsmasq[0].filter_aaaa 83 | 84 | # Set mwan3 balance strategy to default 85 | uci set mwan3.balanced.last_resort=default 86 | 87 | # Commit changes 88 | uci commit 89 | 90 | # Remove mwan3 ip6tables rules 91 | cp /lib/mwan3/mwan3.sh /lib/mwan3/mwan3.sh.orig 92 | sed -i 's/ip6tables -t manle -w/\/bin\/true/g' /lib/mwan3/mwan3.sh 93 | 94 | touch /etc/opkg/ipv6-installed 95 | 96 | echo -e "${Green_font_prefix}IPV6 configure successfully.\n${Font_color_suffix}" 97 | 98 | RebootConfirm 99 | 100 | elif [[ $1 = "server" ]]; then 101 | CheckInstall 102 | 103 | # Set server to lan 104 | uci set dhcp.lan.dhcpv6=server 105 | uci set dhcp.lan.ra=server 106 | uci set dhcp.wan6.ndp=hybrid 107 | uci set dhcp.lan.ra_management=1 108 | uci set dhcp.lan.ra_default=1 109 | 110 | # Set server to wan6 111 | uci set dhcp.wan6=dhcp 112 | uci set dhcp.wan6.interface=wan 113 | uci set dhcp.wan6.ra=server 114 | uci set dhcp.wan6.dhcpv6=server 115 | uci set dhcp.wan6.ndp=hybrid 116 | uci set dhcp.wan6.master=1 117 | 118 | # Commit changes 119 | uci commit 120 | 121 | echo -e "${Green_font_prefix}Server mode configure successfully.\n${Font_color_suffix}" 122 | 123 | RebootConfirm 124 | 125 | elif [[ $1 = "relay" ]]; then 126 | CheckInstall 127 | 128 | # Set relay to lan 129 | uci set dhcp.lan.dhcpv6=relay 130 | uci set dhcp.lan.ndp=relay 131 | uci set dhcp.lan.ra=relay 132 | uci delete dhcp.lan.ra_management 133 | 134 | # Set relay to wan6 135 | uci set dhcp.wan6=dhcp 136 | uci set dhcp.wan6.interface=wan 137 | uci set dhcp.wan6.ra=relay 138 | uci set dhcp.wan6.dhcpv6=relay 139 | uci set dhcp.wan6.ndp=relay 140 | uci set dhcp.wan6.master=1 141 | 142 | # Commit changes 143 | uci commit 144 | 145 | echo -e "${Green_font_prefix}Relay mode configure successfully.\n${Font_color_suffix}" 146 | 147 | RebootConfirm 148 | 149 | elif [[ $1 = "hybrid" ]]; then 150 | CheckInstall 151 | 152 | # Set hybrid to lan 153 | uci set dhcp.lan.dhcpv6=hybrid 154 | uci set dhcp.lan.ndp=hybrid 155 | uci set dhcp.lan.ra=hybrid 156 | uci set dhcp.lan.ra_management=1 157 | uci set dhcp.lan.ra_default=1 158 | 159 | # Set hybrid to wan6 160 | uci set dhcp.wan6=dhcp 161 | uci set dhcp.wan6.interface=wan 162 | uci set dhcp.wan6.ra=hybrid 163 | uci set dhcp.wan6.dhcpv6=hybrid 164 | uci set dhcp.wan6.ndp=hybrid 165 | uci set dhcp.wan6.master=1 166 | 167 | # Commit changes 168 | uci commit 169 | 170 | echo -e "${Green_font_prefix}Hybrid mode configure successfully.\n${Font_color_suffix}" 171 | 172 | RebootConfirm 173 | 174 | elif [[ $1 = "remove" ]]; then 175 | echo -e "${Green_font_prefix}\nRemove IPV6 modules...\n${Font_color_suffix}" 176 | opkg remove --force-removal-of-dependent-packages ipv6helper kmod-sit odhcp6c luci-proto-ipv6 ip6tables kmod-ipt-nat6 odhcpd-ipv6only kmod-ip6tables-extra 177 | echo -e "${Green_font_prefix}\nIPV6 modules remove successfully.\n${Font_color_suffix}" 178 | echo -e "${Green_font_prefix}Revert IPV6 configurations...\n${Font_color_suffix}" 179 | 180 | # Remove wan6 dhcp configurations 181 | uci delete dhcp.wan6.ra 182 | uci delete dhcp.wan6.dhcpv6 183 | uci delete dhcp.wan6.ndp 184 | 185 | # Remove lan dhcp configurations 186 | uci delete dhcp.lan.dhcpv6 187 | uci delete dhcp.lan.ndp 188 | uci delete dhcp.lan.ra 189 | uci delete dhcp.lan.ra_management 190 | uci delete dhcp.lan.ra_default 191 | 192 | # Enable IPV6 ula prefix 193 | sed -i 's/#.*\toption ula/\toption ula/g' /etc/config/network 194 | 195 | # Disable IPV6 dns resolution 196 | uci set dhcp.@dnsmasq[0].filter_aaaa=1 197 | 198 | # Restore mwan3 balance strategy 199 | uci set mwan3.balanced.last_resort=unreachable 200 | 201 | # Commit changes 202 | uci commit 203 | 204 | # Restore mwan3 ip6tables rules 205 | rm /lib/mwan3/mwan3.sh 206 | cp /lib/mwan3/mwan3.sh.orig /lib/mwan3/mwan3.sh 207 | 208 | rm -f /etc/opkg/ipv6-installed 209 | 210 | echo -e "${Green_font_prefix}IPV6 remove successfully.\n${Font_color_suffix}" 211 | 212 | RebootConfirm 213 | 214 | elif [[ $1 = "clean" ]]; then 215 | echo -e "${Green_font_prefix}\nRemove mwan3 modules...\n${Font_color_suffix}" 216 | opkg remove mwan3 luci-app-mwan3 luci-app-mwan3helper luci-app-syncdial 217 | echo -e "${Green_font_prefix}Mwan3 modules remove successfully.\n${Font_color_suffix}" 218 | 219 | RebootConfirm 220 | 221 | fi 222 | 223 | exit 0 224 | -------------------------------------------------------------------------------- /scripts/preset-clash-core.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================= 3 | # File name: preset-clash-core.sh 4 | # Usage: | example: 5 | # System Required: Linux 6 | # Version: 3.0 7 | # Lisence: MIT 8 | # Author: SuLingGG, Helmi Amirudin 9 | # Blog: https://helmiau.com 10 | # Description: This script will install clash core kernel from Dreamacro or Meta or Vernesong 11 | #================================================= 12 | # Select core : Remove # symbol from first word of wget line 13 | # Unselect core : Add # symbol at first word from wget line 14 | #================================================= 15 | 16 | # Initial recognition 17 | COREDIR="files/etc/openclash/core" 18 | APIGIT="https://api.github.com/repos" 19 | mkdir -p $COREDIR 20 | 21 | # TEST debug 22 | # curl -sL https://api.github.com/repos/Dreamacro/clash/releases | grep /clash-linux-armv8 | awk -F '"' '{print $4}' | awk 'NR==1 {print; exit}' 23 | 24 | # Vernesong Core has: 25 | # - original core 26 | # - tun premium core 27 | # - tun game core 28 | clash_url=$(curl -sL $APIGIT/vernesong/OpenClash/releases/tags/Clash | grep /clash-linux-$1 | awk -F '"' '{print $4}') 29 | clash_tun_url=$(curl -sL $APIGIT/vernesong/OpenClash/releases/tags/TUN-Premium | grep /clash-linux-$1 | awk -F '"' '{print $4}') 30 | clash_game_url=$(curl -sL $APIGIT/vernesong/OpenClash/releases/tags/TUN | grep /clash-linux-$1 | awk -F '"' '{print $4}') 31 | wget -qO- $clash_url | tar xOvz > $COREDIR/clash 32 | wget -qO- $clash_tun_url | gunzip -c > $COREDIR/clash_tun 33 | wget -qO- $clash_game_url | tar xOvz > $COREDIR/clash_game 34 | 35 | # Dreamacro Core has: 36 | # - original core 37 | # - tun premium core 38 | # Please use tun game core from Meta or Vernesong core 39 | clash_dreamacro=$(curl -sL $APIGIT/Dreamacro/clash/releases | grep /clash-linux-$1 | awk -F '"' '{print $4}' | sed -n '1p') 40 | clash_tun_dreamacro=$(curl -sL $APIGIT/Dreamacro/clash/releases/tags/premium | grep /clash-linux-$1 | awk -F '"' '{print $4}') 41 | wget -qO- $clash_dreamacro | gunzip -c > $COREDIR/clash_dreamacro 42 | wget -qO- $clash_tun_dreamacro | gunzip -c > $COREDIR/clash_tun_dreamacro 43 | 44 | # Clash Meta Core has: 45 | # - tun premium core 46 | # Please use original and tun game core from Dreamacro or Vernesong core 47 | # Docs: https://github.com/MetaCubeX/Clash.Meta/tree/Dev 48 | clash_tun_meta=$(curl -sL $APIGIT/MetaCubeX/Clash.Meta/releases | grep /Clash.Meta-linux-$1 | awk -F '"' '{print $4}' | sed -n '1p') 49 | wget -qO- $clash_tun_meta | gunzip -c > $COREDIR/clash_tun_meta 50 | 51 | chmod +x $COREDIR/clash* 52 | 53 | # Offline images sources 54 | YACD="files/www/luci-static/resources/openclash" 55 | mkdir -p $YACD 56 | wget -qO $YACD/Wiki.svg https://img.shields.io/badge/Wiki--lightgrey?logo=GitBook&style=social 57 | wget -qO $YACD/Tutorials.svg https://img.shields.io/badge/Tutorials--lightgrey?logo=Wikipedia&style=social 58 | wget -qO $YACD/Star.svg https://img.shields.io/badge/Star--lightgrey?logo=github&style=social 59 | wget -qO $YACD/Telegram.svg https://img.shields.io/badge/Telegram--lightgrey?logo=Telegram&style=social 60 | wget -qO $YACD/Sponsor.svg https://img.shields.io/badge/Sponsor--lightgrey?logo=ko-fi&style=social 61 | -------------------------------------------------------------------------------- /scripts/preset-filebrowser.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================= 3 | # File name: preset-filebrowser.sh 4 | # Usage: | example: 5 | # System Required: Linux 6 | # Version: 1.0 7 | # Lisence: MIT 8 | # Author: Helmi Amirudin 9 | #================================================= 10 | # Platform List Informations 11 | # Binary Name : linux-your_arch-filebrowser.tar.gz 12 | #================================================= 13 | # 386 = i386 14 | # amd64 = x86_64 15 | # arm64 = aarch64 (rpi 3,4) 16 | # armv5 = 17 | # armv6 = arm_arm (rpi 1) 18 | # armv7 = arm_cortex-a7 (orange pi, rpi 2) 19 | #================================================= 20 | 21 | # Download luci-app-filebrowser binary 22 | [ ! -d files/root ] && mkdir -p files/root 23 | echo -e " Downloading linux-$1-filebrowser.tar.gz, installing...." 24 | wget -qO- https://github.com/filebrowser/filebrowser/releases/latest/download/linux-$1-filebrowser.tar.gz | tar xOvz > files/root/filebrowser 25 | chmod +x files/root/filebrowser 26 | #wget -qO files/root/linux-filebrowser.tar.gz http://github.com/filebrowser/filebrowser/releases/latest/download/linux-$1-filebrowser.tar.gz 27 | #[ -f files/root/linux-filebrowser.tar.gz ] && tar xOvz files/root/linux-filebrowser.tar.gz > files/root/filebrowser 28 | -------------------------------------------------------------------------------- /scripts/preset-speedtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================= 3 | # File name: preset-speedtest.sh 4 | # Usage: | example: 5 | # System Required: Linux 6 | # Version: 1.0 7 | # Lisence: MIT 8 | # Author: Helmi Amirudin 9 | #================================================= 10 | 11 | #================================================= 12 | # platform lists informations 13 | #================================================= 14 | # arm = arm_arm (rpi1,2,orange pi zero) 15 | # aarch64 = aarch64 (rpi3,4 nanopi r2c,r2s,r4s, orange pi r1 plus) 16 | # x86_64 = x86_64 17 | # i386 = i386 18 | #================================================= 19 | 20 | #https://install.speedtest.net/app/cli/ookla-speedtest-1.1.0-aarch64-linux.tgz 21 | # Add SpeedTest Core by Ooklaa 22 | SPEEDTESTVER="1.1.0" 23 | SPEEDTESTURL="https://install.speedtest.net/app/cli/ookla-speedtest-$SPEEDTESTVER-$1-linux.tgz" 24 | SPEEDTESTDIR="files/bin" 25 | SPEEDTESTBIN="speedtest" 26 | echo -e " Installing Speedtest Core by Ooklaa...." 27 | echo -e " Architecture detected : $1...." 28 | 29 | # Check etc/speedtest/bin directory 30 | if [[ ! -d $SPEEDTESTDIR ]]; then 31 | mkdir -p $SPEEDTESTDIR 32 | fi 33 | 34 | echo -e " Downloading ookla-speedtest-$SPEEDTESTVER-$1-linux.tgz...." 35 | wget -qO- $SPEEDTESTURL | tar xOvz > files/bin/speedtest 36 | echo -e " Installing...." 37 | 38 | chmod +x $SPEEDTESTDIR/$SPEEDTESTBIN 39 | -------------------------------------------------------------------------------- /scripts/preset-terminal-tools.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================= 3 | # File name: preset-terminal-tools.sh 4 | # System Required: Linux 5 | # Version: 1.0 6 | # Lisence: MIT 7 | # Author: SuLingGG 8 | # Blog: https://mlapp.cn 9 | #================================================= 10 | 11 | mkdir -p files/root 12 | pushd files/root 13 | 14 | ## Install oh-my-zsh 15 | # Clone oh-my-zsh repository 16 | git clone https://github.com/robbyrussell/oh-my-zsh ./.oh-my-zsh 17 | 18 | # Install extra plugins 19 | git clone https://github.com/zsh-users/zsh-autosuggestions ./.oh-my-zsh/custom/plugins/zsh-autosuggestions 20 | git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ./.oh-my-zsh/custom/plugins/zsh-syntax-highlighting 21 | git clone https://github.com/zsh-users/zsh-completions ./.oh-my-zsh/custom/plugins/zsh-completions 22 | 23 | # Get .zshrc dotfile 24 | cp ../../../data/zsh/.zshrc . 25 | 26 | popd 27 | ls 28 | -------------------------------------------------------------------------------- /scripts/preset-v2raya.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | #================================================= 3 | # File name: preset-v2raya.sh 4 | # Usage: | example: 5 | # System Required: Linux 6 | # Version: 1.0 7 | # Lisence: MIT 8 | # Author: Helmi Amirudin 9 | #================================================= 10 | 11 | #================================================= 12 | # platform lists informations 13 | #================================================= 14 | # arm32-v6 = arm_arm (rpi1,2) 15 | # arm32-v7a = arm_cortex-a7 (orange pi) 16 | # arm64-v8a = aarch64 17 | # 64 = x86_64 18 | # 32 = i386 19 | #================================================= 20 | 21 | # Add v2ray-core for v2rayA build 22 | VAETCBIN="files/etc/v2raya/bin" 23 | VUSRSHARE="files/usr/share/v2ray" 24 | echo -e "${G} Installing v2ray core by v2fly...." 25 | echo -e "${G} Architecture detected : ${R}$1....${Y}" 26 | # Check etc/v2raya/bin directory 27 | if [[ ! -d $VAETCBIN ]]; then 28 | mkdir -p $VAETCBIN 29 | fi 30 | 31 | version=$(curl -s https://api.github.com/repos/v2fly/v2ray-core/releases | jq -r .[].tag_name | head -1) 32 | echo -e " Downloading v2ray-linux-$1, installing...." 33 | wget -qO $VAETCBIN/v2ray-core.zip "https://github.com/v2fly/v2ray-core/releases/download/$version/v2ray-linux-$1.zip" 34 | 35 | #Check size v2ray-core.zip then symlink and set permissions 36 | if [[ -s $VAETCBIN ]]; then 37 | echo -e " $VABIN downloaded, installing...." 38 | unzip -d $VAETCBIN $VAETCBIN/v2ray-core.zip 39 | find $VAETCBIN -type f -name '*.json' -exec rm $VAETCBIN/*.json \; 40 | find $VAETCBIN -type f -name '*.dat' -exec rm $VAETCBIN/*.dat \; 41 | find $VAETCBIN -type f -name '*.zip' -exec rm $VAETCBIN/*.zip \; 42 | rm -rf $VAETCBIN/systemd 43 | echo -e "${G} v2ray core by v2fly installed....${N}" 44 | else 45 | echo -e "${R} v2ray core by v2fly install failed....${N}" 46 | fi 47 | # Check usr/bin/v2raya directory 48 | if [[ ! -d $VUSRSHARE ]]; then 49 | mkdir -p $VUSRSHARE 50 | fi 51 | # Downloading geoip files for v2ray core 52 | if [[ -d $VUSRSHARE ]]; then 53 | VARULES="https://raw.githubusercontent.com/v2rayA/dist-v2ray-rules-dat/master" 54 | wget -O $VUSRSHARE/geosite.dat $VARULES/geosite.dat 55 | wget -O $VUSRSHARE/geoip.dat $VARULES/geoip.dat 56 | wget -O $VUSRSHARE/LoyalsoldierSite.dat $VARULES/geosite.dat 57 | else 58 | echo -e "${R} v2ray core by v2fly install failed....${N}" 59 | fi 60 | 61 | chmod +x $VAETCBIN/* $VUSRSHARE 62 | --------------------------------------------------------------------------------