Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed May 20, 2022
1 parent b2ead75 commit 6ce877b
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 53 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 "s/# 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}}
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/repo-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions devices/armvirt_64/.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ CONFIG_PACKAGE_kmod-brcmfmac=y
CONFIG_BRCMFMAC_SDIO=y

CONFIG_TESTING_KERNEL=y

CONFIG_JSON_OVERVIEW_IMAGE_INFO=n
1 change: 0 additions & 1 deletion devices/common/.config
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
23 changes: 16 additions & 7 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,18 @@ 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
./scripts/feeds install -a
cd feeds/kiddin9; git pull; cd -

mv -f feeds/kiddin9/r81* tmp/

svn export --force https://github.com/openwrt/packages/trunk/kernel feeds/packages/kernel
sed -i "s/192.168.1/10.0.0/" package/feeds/kiddin9/base-files/files/bin/config_generate
rm -f package/feeds/packages/libpfring; svn export https://github.com/openwrt/packages/trunk/libs/libpfring package/feeds/kiddin9/libpfring
rm -f package/feeds/packages/xtables-addons; svn export https://github.com/openwrt/packages/trunk/net/xtables-addons package/feeds/kiddin9/xtables-addons
curl -sfL https://raw.githubusercontent.com/coolsnowwolf/packages/master/libs/xr_usb_serial_common/patches/0001-fix-build-with-kernel-5.15.patch -o package/feeds/packages/xr_usb_serial_common/patches/0001-fix-build-with-kernel-5.15.patch

(
svn export --force https://github.com/coolsnowwolf/lede/trunk/tools/upx tools/upx
Expand Down Expand Up @@ -74,9 +73,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
) &
24 changes: 0 additions & 24 deletions devices/common/patches/disable-antfs.patch

This file was deleted.

2 changes: 1 addition & 1 deletion devices/common/patches/targets.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
- kmod-nft-offload \
+ dnsmasq-full \
+ firewall \
+ nftables iptables-legacy ip6tables-legacy \
+ nftables iptables-legacy ip6tables-legacy ipset kmod-ipt-nat6 \
+ kmod-ipt-offload \
odhcp6c \
odhcpd-ipv6only \
Expand Down
2 changes: 2 additions & 0 deletions devices/ipq807x/.config
Original file line number Diff line number Diff line change
Expand Up @@ -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=y

CONFIG_PACKAGE_kmod-qca-mcs=n
CONFIG_PACKAGE_kmod-qca-nss-drv-qdisc=n
CONFIG_PACKAGE_kmod-qca-nss-ecm=n
Expand Down
4 changes: 2 additions & 2 deletions devices/ipq807x/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

shopt -s extglob

rm -rf package/boot/uboot-envtools package/firmware/ipq-wifi package/firmware/ath11k* package/qca package/qat package/kernel/mac80211
rm -rf package/boot/uboot-envtools package/firmware/ipq-wifi package/firmware/ath11k* package/qca package/qat package/kernel
svn export https://github.com/Boos4721/openwrt/trunk/package/boot/uboot-envtools package/boot/uboot-envtools
svn export https://github.com/Boos4721/openwrt/trunk/package/firmware/ipq-wifi package/firmware/ipq-wifi
svn export https://github.com/Boos4721/openwrt/trunk/package/firmware/ath11k-board package/firmware/ath11k-board
svn export https://github.com/Boos4721/openwrt/trunk/package/firmware/ath11k-firmware package/firmware/ath11k-firmware
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
svn export https://github.com/Boos4721/openwrt/trunk/package/kernel package/kernel

rm -rf target/linux/ipq807x/!(patches-5.15)
svn co https://github.com/Boos4721/openwrt/trunk/target/linux/ipq807x target/linux/ipq807x
Expand Down
2 changes: 1 addition & 1 deletion devices/x86_64/.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion devices/x86_64/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ce877b

Please sign in to comment.