diff --git a/.github/workflows/build_mx4300_foss.yml b/.github/workflows/build_mx4300_foss.yml index 05acfb0be22db1..abc535703c7d90 100644 --- a/.github/workflows/build_mx4300_foss.yml +++ b/.github/workflows/build_mx4300_foss.yml @@ -29,6 +29,7 @@ jobs: unzip \ zlib1g-dev \ file \ + jq \ wget && \ sudo apt-get clean @@ -39,13 +40,13 @@ jobs: run: scripts/feeds update -a && scripts/feeds install -a - name: Generate config - run: sh genconfig.sh + run: sh genconfig.sh snapshots - name: Build firmware images run: make -j$(($(nproc)+1)) world - name: Prepare release - run: sh release.sh + run: sh release.sh ${{ env.ver }} - name: Get SHA uses: benjlevesque/short-sha@v3.0 @@ -53,6 +54,6 @@ jobs: - name: Release uses: ncipollo/release-action@v1 with: - tag: qualcommax-foss-${{ env.SHA }} + tag: qualcommax-foss-${{ env.ver }}-${{ env.SHA }} artifacts: release/* bodyFile: note.md diff --git a/genconfig.sh b/genconfig.sh index be47ca28b7f89b..69ada3ba38e2f3 100644 --- a/genconfig.sh +++ b/genconfig.sh @@ -1,6 +1,14 @@ #!/bin/sh -wget -qO- https://downloads.openwrt.org/snapshots/targets/qualcommax/ipq807x/config.buildinfo | grep -v CONFIG_TARGET_DEVICE_ | grep -v CONFIG_TARGET_ALL_PROFILES | grep -v CONFIG_TARGET_MULTI_PROFILE > .config +if [ ! -z "$1" ] && [ "$1" != "snapshots" ]; then + buildinfo="https://downloads.openwrt.org/releases/$1/targets/qualcommax/ipq807x/config.buildinfo" + echo "ver=$1" >> $GITHUB_ENV +else + buildinfo="https://downloads.openwrt.org/snapshots/targets/qualcommax/ipq807x/config.buildinfo" + echo "ver=snapshots" >> $GITHUB_ENV +fi + +wget -qO- $buildinfo | grep -v CONFIG_TARGET_DEVICE_ | grep -v CONFIG_TARGET_ALL_PROFILES | grep -v CONFIG_TARGET_MULTI_PROFILE > .config echo CONFIG_TARGET_ALL_PROFILES=n >> .config echo CONFIG_TARGET_MULTI_PROFILE=n >> .config echo CONFIG_TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4300=y >> .config @@ -14,6 +22,6 @@ make defconfig #echo CONFIG_PACKAGE_libpam=y >> .config #skip xdp compile -cat .config | grep -v "CONFIG_PACKAGE.*xdp" > .config.tmp -cp .config.tmp .config +#cat .config | grep -v "CONFIG_PACKAGE.*xdp" > .config.tmp +#cp .config.tmp .config diff --git a/release.sh b/release.sh index 845699bcd7f511..88e4aaadba219f 100644 --- a/release.sh +++ b/release.sh @@ -2,17 +2,36 @@ MD="note.md" mkdir release -cp bin/targets/qualcommax/ipq807x/openwrt-qualcommax-ipq807x-linksys_mx4300-* release/ -cp bin/targets/qualcommax/ipq807x/openwrt-qualcommax-ipq807x-linksys_mx4300.manifest release/ +cp bin/targets/qualcommax/ipq807x/openwrt-qualcommax-ipq807x-linksys_mx4300-* release/ +cp bin/targets/qualcommax/ipq807x/openwrt-qualcommax-ipq807x-linksys_mx4300.manifest release/ cp bin/targets/qualcommax/ipq807x/openwrt-imagebuilder* release/ kernel=$(cat release/openwrt-qualcommax-ipq807x-linksys_mx4300.manifest | grep ^kernel) checksum=$(sha256sum release/* | sed 's/release\///') #echo $checksum -echo "- $kernel + +if grep -q "CONFIG_USE_APK=y" .config ; then + errmsg="ERROR: unable to select packages" + mdfile="foss-kmod-apk.md" + warning="APK package manager" + echo "pkg=apk" >> $GITHUB_ENV +else + errmsg="pkg_hash_check_unresolved: cannot find dependency kernel" + mdfile="foss-kmod-opkg.md" + warning="OPKG package manager" + echo "pkg=opkg" >> $GITHUB_ENV +fi + +echo "- $warning + +- $kernel - sha256sum \`\`\` $checksum -\`\`\` +\`\`\`" > $MD + +if [ "$1" = "snapshots" ]; then + echo " +- \"$errmsg\" [fix](https://github.com/arix00/openwrt-mx4300/blob/doc/$mdfile)" >> $MD +fi -- \"pkg_hash_check_unresolved: cannot find dependency kernel\" [fix](https://github.com/arix00/openwrt-mx4300/blob/doc/snapshot-dependency-guide.md)" > $MD