From a8f67cddd7122705bab2d4255b5a0bd3f59e3bf8 Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Thu, 19 May 2022 05:59:48 +0800 Subject: [PATCH 1/3] update --- .github/workflows/Openwrt-AutoBuild.yml | 31 ++++++++++++++++++------- .github/workflows/repo-dispatcher.yml | 6 ----- devices/armvirt_64/.config | 2 -- devices/common/.config | 1 - devices/common/diy.sh | 20 ++++++++++++---- devices/common/patches/targets.patch | 2 +- devices/ipq807x/diy.sh | 8 +++---- devices/x86_64/.config | 2 +- devices/x86_64/diy.sh | 2 +- 9 files changed, 45 insertions(+), 29 deletions(-) diff --git a/.github/workflows/Openwrt-AutoBuild.yml b/.github/workflows/Openwrt-AutoBuild.yml index bd82d1cc92f4..c59e0a1f0ce1 100644 --- a/.github/workflows/Openwrt-AutoBuild.yml +++ b/.github/workflows/Openwrt-AutoBuild.yml @@ -120,6 +120,24 @@ jobs: -H "Authorization: Bearer ${{ secrets.REPO_TOKEN }}" \ -X POST -d '{ "query": "query {repository(owner: \"openwrt\", name: \"openwrt\") {refs(refPrefix: \"refs/tags/\", last: 4, orderBy: {field: TAG_COMMIT_DATE, direction: ASC}) {edges {node {name}}}}}"}' https://api.github.com/graphql) | jq -r '.data.repository.refs.edges[].node.name' | grep v22 | tail -n 1 | sed -e 's/v//')" git clone $REPO_URL -b v$REPO_BRANCH openwrt + if [[ "${{ contains(github.event.action, 'nosdk') }}" != "true" ]]; then + cd openwrt + if [[ ${{matrix.target}} == "x86_64" ]]; then + curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/x86/64/openwrt-sdk-x86-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true + elif [[ ${{matrix.target}} == "rockchip_armv8" ]]; then + curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/rockchip/armv8/openwrt-sdk-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true + elif [[ ${{matrix.target}} == "bcm27xx_bcm2711" ]]; then + curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/bcm27xx/bcm2711/openwrt-sdk-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true + elif [[ ${{matrix.target}} == "armvirt_64" ]]; then + curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/armvirt/64/openwrt-sdk-armvirt-64_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true + elif [[ ${{matrix.target}} == "ramips_mt7621" ]]; then + curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/ramips/mt7621/openwrt-sdk-ramips-mt7621_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true + elif [[ ${{matrix.target}} == "mediatek_mt7622" ]]; then + curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/mediatek/mt7622/openwrt-sdk-mediatek-mt7622_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true + elif [[ ${{matrix.target}} == "ipq807x" ]]; then + curl -fL -m 60 -o sdk.tar.xz https://op.supes.top/releases/targets/ipq807x/generic/openwrt-sdk-ipq807x-generic_gcc-11.2.0_musl.Linux-x86_64.tar.xz || true + fi + fi ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt echo "REPO_BRANCH=$REPO_BRANCH" >> $GITHUB_ENV echo "$REPO_BRANCH" @@ -179,24 +197,22 @@ jobs: make download -j$(($(nproc)+1)) & sleep 5 - - name: Cache - if: contains(github.event.action, 'nocache') != 'true' - run: | - curl -fL -m 60 -o openwrt/cache.tar.gz https://op.supes.top/releases/targets/cache.tar.gz || true - - name: Compile the firmware id: compile run: | cd openwrt echo -e "$(($(nproc)+1)) thread compile" make -j$(($(nproc)+1)) || (curl -k --data chat_id="${{ env.TELEGRAM_CHAT_ID }}" --data "text=❌ OpenWrt ${{ env.VERSION }} ${{matrix.target}} 编译失败 😂" "https://api.telegram.org/bot${{ env.TELEGRAM_TOKEN }}/sendMessage" ; make -j1 V=s) - echo "::set-output name=status::success" + sed -i "/# CONFIG_IB is not set/CONFIG_IB=y/" .config + make defconfig + make target/imagebuilder/compile -j$(($(nproc)+1)) - name: Check space usage run: df -hT - name: Organize files id: organize + continue-on-error: true run: | shopt -s extglob mkdir -p firmware/${{matrix.target}} @@ -208,7 +224,6 @@ jobs: mkdir packages cp -rf ${{ env.KERNEL }}/Packages* packages/ cd - - tar -zcf openwrt/bin/targets/cache.tar.gz build_dir/host* build_dir/tool* staging_dir/host* staging_dir/tool* rename -v "s/openwrt-/${{ env.VERSION }}-openwrt-/" ./firmware/*/* || true rename -v "s/friendlyarm_//" ./firmware/*/*gz || true rename -v "s/embedfire_//" ./firmware/*/*gz || true @@ -272,7 +287,7 @@ jobs: with: name: ${{ env.VERSION }}_${{matrix.target}} path: | - openwrt/bin/targets + openwrt/bin/targets/ - name: Upload firmware to cowtransfer if: env.UPLOAD_FIRMWARE_TO_COWTRANSFER == 'true' diff --git a/.github/workflows/repo-dispatcher.yml b/.github/workflows/repo-dispatcher.yml index c0efec55672d..cda53c053253 100644 --- a/.github/workflows/repo-dispatcher.yml +++ b/.github/workflows/repo-dispatcher.yml @@ -29,12 +29,6 @@ jobs: build: runs-on: Ubuntu-20.04 steps: - - name: cancel running workflows - uses: styfle/cancel-workflow-action@main - with: - workflow_id: Openwrt-AutoBuild.yml,repo-dispatcher.yml - access_token: ${{ github.token }} - - name: Checkout uses: actions/checkout@main diff --git a/devices/armvirt_64/.config b/devices/armvirt_64/.config index a87960bfec2b..e4b34602912a 100644 --- a/devices/armvirt_64/.config +++ b/devices/armvirt_64/.config @@ -7,5 +7,3 @@ CONFIG_PACKAGE_kmod-brcmfmac=y CONFIG_BRCMFMAC_SDIO=y CONFIG_TESTING_KERNEL=y - -CONFIG_JSON_OVERVIEW_IMAGE_INFO=n \ No newline at end of file diff --git a/devices/common/.config b/devices/common/.config index 427c4836ee0f..4cc4f8926786 100644 --- a/devices/common/.config +++ b/devices/common/.config @@ -20,7 +20,6 @@ CONFIG_PACKAGE_kmod-usb-serial-xr_usb_serial_common=n CONFIG_SDK=y -CONFIG_IB=y CONFIG_IB_STANDALONE=y CONFIG_JSON_OVERVIEW_IMAGE_INFO=y diff --git a/devices/common/diy.sh b/devices/common/diy.sh index e849b6ec9289..e2bc6658d504 100644 --- a/devices/common/diy.sh +++ b/devices/common/diy.sh @@ -28,7 +28,7 @@ sed -i '/ refresh_config();/d' scripts/feeds sed -i '$a src-git kiddin9 https://github.com/kiddin9/openwrt-packages.git;master' feeds.conf.default } -rm -rf package/{base-files,network/config/firewall,network/config/firewall4,network/services/dnsmasq,network/services/ppp,system/opkg,libs/mbedtls} +rm -rf package/{base-files,network/config/firewall,network/config/firewall4,network/services/dnsmasq,network/services/ppp,system/opkg,libs/mbedtls,firmware/wireless-regdb} ./scripts/feeds update -a ./scripts/feeds install -a -p kiddin9 @@ -74,9 +74,19 @@ sed -i \ package/feeds/kiddin9/*/Makefile ( -if [ -f cache.tar.gz ]; then - tar -zxf cache.tar.gz - rm -f cache.tar.gz - find build_dir/{host*,toolchain-*} -name .built* -exec touch {} \;; touch staging_dir/{host*,toolchain-*}/stamp/.* +if [ -f sdk.tar.xz ]; then + sed -i 's,$(STAGING_DIR_HOST)/bin/upx,upx,' package/feeds/kiddin9/*/Makefile + mkdir sdk + tar -xJf sdk.tar.xz -C sdk + cp -rf sdk/*/staging_dir/* ./staging_dir/ + rm -rf sdk.tar.xz sdk + rm -rf `find "staging_dir/host/" -maxdepth 2 -name 'libelf*'` || true + sed -i '/\(tools\|toolchain\)\/Makefile/d' Makefile + if [ -f /usr/bin/python ]; then + ln -sf /usr/bin/python staging_dir/host/bin/python + else + ln -sf /usr/bin/python3 staging_dir/host/bin/python + fi + ln -sf /usr/bin/python3 staging_dir/host/bin/python3 fi ) & diff --git a/devices/common/patches/targets.patch b/devices/common/patches/targets.patch index b01466dc9d9e..e368c3155790 100644 --- a/devices/common/patches/targets.patch +++ b/devices/common/patches/targets.patch @@ -10,7 +10,7 @@ - kmod-nft-offload \ + dnsmasq-full \ + firewall \ -+ nftables iptables-legacy ip6tables-legacy \ ++ nftables iptables-legacy ip6tables-legacy ipset \ + kmod-ipt-offload \ odhcp6c \ odhcpd-ipv6only \ diff --git a/devices/ipq807x/diy.sh b/devices/ipq807x/diy.sh index 79d2531a7fa5..3b2dbacbb457 100644 --- a/devices/ipq807x/diy.sh +++ b/devices/ipq807x/diy.sh @@ -11,10 +11,10 @@ svn export https://github.com/Boos4721/openwrt/trunk/package/qca package/qca svn export https://github.com/Boos4721/openwrt/trunk/package/qat package/qat svn export https://github.com/Boos4721/openwrt/trunk/package/kernel/mac80211 package/kernel/mac80211 -rm -rf target/linux/ipq807x/!(patches-5.15) -svn co https://github.com/Boos4721/openwrt/trunk/target/linux/ipq807x target/linux/ipq807x -rm -rf target/linux/ipq807x/{.svn,patches-5.15/.svn} -svn co https://github.com/Boos4721/openwrt/trunk/target/linux/ipq807x/patches-5.15 target/linux/ipq807x/patches-5.15 + +rm -rf target/linux +svn export https://github.com/Boos4721/openwrt/trunk/target/linux target/linux +rm -rf target/linux/generic/hack-5.15/531-debloat_lzma.patch target/linux/generic/hack-5.15/600-bridge_offload.patch sed -i 's/autocore-arm /my-autocore-arm /' target/linux/ipq807x/Makefile sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += luci-app-turboacc/' target/linux/ipq807x/Makefile diff --git a/devices/x86_64/.config b/devices/x86_64/.config index c25825f1a615..864f03cd7c81 100644 --- a/devices/x86_64/.config +++ b/devices/x86_64/.config @@ -8,6 +8,6 @@ CONFIG_GRUB_EFI_IMAGES=y CONFIG_VMDK_IMAGES=n # 其他需要安装的软件包: -CONFIG_PACKAGE_kmod-r8168=n +#CONFIG_PACKAGE_kmod-r8168=n CONFIG_OPENSSL_PREFER_CHACHA_OVER_GCM=n diff --git a/devices/x86_64/diy.sh b/devices/x86_64/diy.sh index 7385c24b7b76..51d77d821376 100644 --- a/devices/x86_64/diy.sh +++ b/devices/x86_64/diy.sh @@ -6,7 +6,7 @@ rm -rf target/linux/x86/patches-5.15/.svn sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += my-autocore-x86 lm-sensors-detect kmod-r8125 kmod-vmxnet3 kmod-igc kmod-drm-i915 kmod-mlx4-core kmod-usb2 kmod-usb3 fdisk/' target/linux/x86/Makefile mv -f tmp/r81* feeds/kiddin9/ -#sed -i 's,kmod-r8169,kmod-r8168,g' target/linux/x86/image/64.mk +sed -i 's,kmod-r8169,kmod-r8168,g' target/linux/x86/image/64.mk echo ' CONFIG_CRYPTO_CHACHA20_X86_64=y From a369f3da850c87370cb28d3317b3efe16ec4b2f6 Mon Sep 17 00:00:00 2001 From: kiddin9 <48883331+kiddin9@users.noreply.github.com> Date: Thu, 19 May 2022 07:09:45 +0800 Subject: [PATCH 2/3] Update .config --- devices/ipq807x/.config | 2 ++ 1 file changed, 2 insertions(+) diff --git a/devices/ipq807x/.config b/devices/ipq807x/.config index 2468986e0a91..b6067acfa16d 100644 --- a/devices/ipq807x/.config +++ b/devices/ipq807x/.config @@ -9,6 +9,8 @@ CONFIG_TARGET_DEVICE_ipq807x_generic_DEVICE_xiaomi_ax9000=y CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_SHORTCUT_FE_DRV=n CONFIG_PACKAGE_luci-app-turboacc_INCLUDE_SHORTCUT_FE=y +CONFIG_ALL_KMODS=n + CONFIG_PACKAGE_kmod-qca-mcs=n CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=n CONFIG_PACKAGE_kmod-qca-nss-ecm=n From 609853eb2968310313e282cb98c070bfa420a301 Mon Sep 17 00:00:00 2001 From: Zhuang-ds <77040310+Zhuang-ds@users.noreply.github.com> Date: Thu, 19 May 2022 07:35:10 +0800 Subject: [PATCH 3/3] Update repo-dispatcher.yml --- .github/workflows/repo-dispatcher.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/repo-dispatcher.yml b/.github/workflows/repo-dispatcher.yml index cda53c053253..725dfac5dd0f 100644 --- a/.github/workflows/repo-dispatcher.yml +++ b/.github/workflows/repo-dispatcher.yml @@ -9,9 +9,9 @@ name: Repo Dispatcher on: - # push: - # branches: - # - master + push: + branches: + - master #schedule: # - cron: 30 18 * * * workflow_dispatch: @@ -22,7 +22,7 @@ on: default: '' env: - REPO_TOKEN: ${{ secrets.REPO_TOKEN }} + REPO_TOKEN:${{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 }} TZ: Asia/Shanghai jobs: