From e2c45ef79867d0090d2989e0b24fb550603c903a Mon Sep 17 00:00:00 2001 From: klzgrad Date: Sat, 19 Oct 2024 21:20:52 +0800 Subject: [PATCH] get-openwrt.sh --- .github/workflows/build.yml | 4 ++-- src/get-openwrt.sh | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1693bf4494..59d1e551b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ defaults: shell: bash working-directory: src env: - CACHE_EPOCH: 2 + CACHE_EPOCH: 3 CCACHE_MAXSIZE: 200M CCACHE_MAXFILES: 0 SCCACHE_CACHE_SIZE: 200M @@ -492,7 +492,7 @@ jobs: openwrt_gcc_ver: '12.3.0' env: EXTRA_FLAGS: target_cpu="${{ matrix.target_cpu }}" target_os="openwrt" ${{ matrix.extra }} - OPENWRT_FLAGS: arch=${{ matrix.arch }} release=${{ matrix.openwrt_release || '21.02.0' }} gcc_ver=${{ matrix.openwrt_gcc_ver || '8.4.0' }} ${{ matrix.openwrt }} + OPENWRT_FLAGS: arch=${{ matrix.arch }} release=${{ matrix.openwrt_release || '18.06.0' }} gcc_ver=${{ matrix.openwrt_gcc_ver || '7.3.0' }} ${{ matrix.openwrt }} BUNDLE: naiveproxy-${{ github.event.release.tag_name }}-${{ github.job }}-${{ matrix.arch }} steps: - uses: actions/checkout@v4 diff --git a/src/get-openwrt.sh b/src/get-openwrt.sh index 4f878de184..362e32aea0 100755 --- a/src/get-openwrt.sh +++ b/src/get-openwrt.sh @@ -22,10 +22,13 @@ else path_suffix=sdk fi -if [ "$subtarget" ]; then +if [ ! "$subtarget" ]; then + subtarget=generic +fi + +if [ "$subtarget" != generic -o "$major" -ge 22 ]; then SDK_PATH=openwrt-$path_suffix-$release-$target-${subtarget}_gcc-${gcc_ver}_${abi}.Linux-x86_64 else - subtarget='generic' SDK_PATH=openwrt-$path_suffix-$release-${target}_gcc-${gcc_ver}_${abi}.Linux-x86_64 fi SDK_URL=https://downloads.openwrt.org/releases/$release/targets/$target/$subtarget/$SDK_PATH.tar.xz