Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Apr 19, 2023
1 parent 2d8db40 commit b866906
Show file tree
Hide file tree
Showing 47 changed files with 10,747 additions and 390 deletions.
23 changes: 14 additions & 9 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: |
( sudo -E apt-get -qq update
sudo -E apt-get -qq update
sudo -E apt-get -qq install build-essential clang flex g++ gawk gcc-multilib gettext \
git libncurses5-dev libssl-dev python3-distutils rsync unzip zlib1g-dev swig libpython3-dev aria2 jq subversion qemu-utils ccache rename libelf-dev device-tree-compiler
git libncurses5-dev libssl-dev python3-distutils python3-pyelftools libpython3-dev rsync unzip zlib1g-dev swig aria2 jq subversion qemu-utils ccache rename libelf-dev device-tree-compiler libgnutls28-dev
sudo -E apt-get -qq purge azure-cli ghc* zulu* llvm* firefox powershell openjdk* dotnet* google* mysql* php* android*
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc
sudo -E apt-get -qq autoremove --purge
sudo -E apt-get -qq clean ) &
sudo -E apt-get -qq clean
sudo timedatectl set-timezone "$TZ"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
Expand Down Expand Up @@ -194,10 +194,11 @@ jobs:
- name: Apply patches
run: |
cd openwrt
find "devices/common/patches" -type f ! -name 'china_mirrors.patch' -name '*.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -B --merge -p1 -E --forward"
find "devices/common/patches" -type f ! -name 'china_mirrors.patch' -name '*.patch' ! -name '*.revert.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -B --merge -p1 -E --forward"
#git apply devices/common/patches/*.patch
if [ -n "$(ls -A "devices/${{matrix.target}}/patches" 2>/dev/null)" ]; then
find "devices/${{matrix.target}}/patches" -maxdepth 1 -type f -name '*.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -B --merge -p1 -E --forward"
find "devices/${{matrix.target}}/patches" -maxdepth 1 -type f -name '*.patch' ! -name '*.revert.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -B --merge -p1 -E --forward"
find "devices/${{matrix.target}}/patches" -maxdepth 1 -type f -name '*.revert.patch' -print0 | sort -z | xargs -I % -t -0 -n 1 sh -c "cat '%' | patch -d './' -R -B --merge -p1 -E --forward"
#git apply devices/${{matrix.target}}/patches/*.patch
fi
sed -i '$a \
Expand Down Expand Up @@ -234,13 +235,17 @@ jobs:
uses: stupidloud/cachewrtbuild@main
with:
ccache: 'true'
mixkey: ${{ matrix.target }}
clean: ${{ contains(github.event.action, 'nocache') }}
prefix: ${{ github.workspace }}/openwrt

- name: Check space usage
run: |
shopt -s extglob
rm -rf openwrt/staging_dir/!(*${{ env.MTARGET }}*|host|hostpkg) openwrt/build_dir/!(*${{ env.MTARGET }}*|host|hostpkg)
cd openwrt
if [[ -f staging_dir/*${{ env.MTARGET }}*/bin ]]; then
rm -rf staging_dir/!(*${{ env.MTARGET }}*|host|hostpkg) build_dir/!(*${{ env.MTARGET }}*|host|hostpkg)
fi
df -hT
- name: SSH connection to Actions
Expand All @@ -253,7 +258,7 @@ jobs:
shopt -s extglob
cd openwrt
echo -e "$(($(nproc)+1)) thread compile"
make -j$(($(nproc)+1)) V=s 2>&1 | tee build.log | grep -i "Error 2" && tail -20 build.log && (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";exit 1)
make -j$(($(nproc)+1)) || make V=s &>build.log || (tail -50 build.log; 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";exit 1)
sed -i "s/# CONFIG_IB is not set/CONFIG_IB=y/" .config
rm -rf staging_dir/toolchain-*/bin/*openwrt-linux-musl-lto-dump
rm -rf staging_dir/toolchain-*/initial
Expand Down Expand Up @@ -292,8 +297,8 @@ jobs:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
ARGS: "-avzr"
SOURCE: openwrt/bin/targets
REMOTE_HOST: op.supes.top
REMOTE_PORT: '223'
REMOTE_HOST: ${{ secrets.SERVER_HOST }}
REMOTE_PORT: ${{ secrets.SERVER_PORT }}
REMOTE_USER: root
TARGET: "/www/wwwroot/op.supes.top/releases/tmp/"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/repo-dispatcher.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

- name: cancel running workflows
uses: styfle/cancel-workflow-action@main
if: contains(github.event.inputs.param, ' cw')
if: contains(github.event.inputs.param, 'cw')
with:
workflow_id: all
access_token: ${{ github.token }}
Expand Down Expand Up @@ -118,6 +118,7 @@ jobs:
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "mediatek_mt7981 ${{ github.event.inputs.param }}", "client_payload": {"target": "mediatek_mt7981"}}'
curl \
-X POST https://api.github.com/repos/${{ github.repository }}/dispatches \
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
Expand Down Expand Up @@ -207,4 +208,3 @@ jobs:
-H "Accept: application/vnd.github.everest-preview+json" \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-d '{"event_type": "ath79_nand ${{ github.event.inputs.param }}", "client_payload": {"target": "ath79_nand"}}'
2 changes: 2 additions & 0 deletions devices/armvirt_64/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SHELL_FOLDER=$(dirname $(readlink -f "$0"))
bash $SHELL_FOLDER/../common/kernel_5.15.sh



sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += perl btrfs-progs luci-app-amlogic kmod-brcmfmac wpad-basic-wolfssl iw -luci-app-attendedsysupgrade -luci-app-gpsysupgrade fdisk lsblk/' target/linux/armvirt/Makefile


133 changes: 8 additions & 125 deletions devices/armvirt_64/diy/target/linux/armvirt/image/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,136 +15,19 @@ define Device/Default
KERNEL := kernel-bin
endef

define Device/n1
DEVICE_VENDOR := Phicomm
DEVICE_MODEL := N1
SOC := s905d
define Device/box
DEVICE_VENDOR :=
DEVICE_MODEL := 电视盒子全系列 / N1
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += n1

define Device/beikeyun
DEVICE_VENDOR := 贝壳云
DEVICE_MODEL :=P1
SOC := rk3328
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += beikeyun

define Device/vplus
DEVICE_VENDOR := 微加云
DEVICE_MODEL := V-Plus
SOC := h6
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += vplus

define Device/l1pro
DEVICE_VENDOR := 我家云
DEVICE_MODEL := lL Pro
SOC := rk3328
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += l1pro

define Device/mxqpro
DEVICE_VENDOR := MXQ
DEVICE_MODEL := Pro+
SOC := s905
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += mxqpro

define Device/x96max
DEVICE_VENDOR := x96 Max
DEVICE_MODEL := s905x2
SOC := s905x2
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += x96max

define Device/hk1
DEVICE_VENDOR := HK1
DEVICE_MODEL := Box
SOC := s905x3
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += hk1

define Device/zyxq
DEVICE_VENDOR := 章鱼星球
DEVICE_MODEL := ZYXQ
SOC := s912
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += zyxq

define Device/gtking
DEVICE_VENDOR := Beelink
DEVICE_MODEL := GT-King
SOC := s922x
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += gtking

define Device/odroid-n2
DEVICE_VENDOR := Hardkernel
DEVICE_MODEL := Odroid-N2
SOC := s922x
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += odroid-n2

define Device/rock5b
DEVICE_VENDOR := Radxa
DEVICE_MODEL := ROCK 5B
SOC := RK3588
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += rock5b

define Device/h88k
DEVICE_VENDOR := HinLink
DEVICE_MODEL := H88K
SOC := RK3588
DEVICE_PACKAGES :=
endef
TARGET_DEVICES += h88k
TARGET_DEVICES += box

define Image/Build
export IMG_PREFIX="$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED))"; \
export BIN_DIR=$(BIN_DIR); \
export PARTSIZE=$(CONFIG_TARGET_ROOTFS_PARTSIZE); \
cd /www/wwwroot/op.supes.top/bcache/armvirt/64/openwrt_packit; \
. ../modify_packit.sh; \
if [ $(PROFILE_SANITIZED) == "n1" ]; then \
./mk_s905d_n1.sh; \
elif [ $(PROFILE_SANITIZED) == "beikeyun" ]; then \
./mk_rk3328_beikeyun.sh; \
elif [ $(PROFILE_SANITIZED) == "l1pro" ]; then \
./mk_rk3328_l1pro.sh; \
elif [ $(PROFILE_SANITIZED) == "mxqpro" ]; then \
./mk_s905_mxqpro+.sh; \
elif [ $(PROFILE_SANITIZED) == "x96max" ]; then \
./mk_s905x2_x96max.sh; \
elif [ $(PROFILE_SANITIZED) == "zyxq" ]; then \
./mk_s912_zyxq.sh; \
elif [ $(PROFILE_SANITIZED) == "gtking" ]; then \
./mk_s922x_gtking.sh; \
elif [ $(PROFILE_SANITIZED) == "odroid-n2" ]; then \
./mk_s922x_odroid-n2.sh; \
elif [ $(PROFILE_SANITIZED) == "vplus" ]; then \
./mk_h6_vplus.sh; \
elif [ $(PROFILE_SANITIZED) == "fastrhino_r68s" ]; then \
./mk_rk3568_r68s.sh; \
elif [ $(PROFILE_SANITIZED) == "hk1" ]; then \
./mk_s905x3_multi.sh; \
elif [ $(PROFILE_SANITIZED) == "rock5b" ]; then \
./mk_rk3588_rock5b.sh; \
elif [ $(PROFILE_SANITIZED) == "h88k" ]; then \
./mk_rk3588_h88k.sh; \
fi; \
gzip -f9n $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).img || true
export DATE=$(DATE); \
cd /www/wwwroot/op.supes.top/bcache/armvirt/64/amlogic-s9xxx-openwrt; \
. ../modify_amlogic.sh; \
./make -k 5.15.100 -b $(MORE) -s $(shell echo $$(($(ROOTFS_PARTSIZE)/1024/1024))) || true
endef

$(eval $(call BuildImage))
Expand Down
2 changes: 2 additions & 0 deletions devices/ath79_nand/.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_netgear_wndr4300-v2=y
CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_netgear_wndr4300sw=y
CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_netgear_wndr4300tn=y
CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_netgear_wndr4500-v3=y
CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_linksys_ea4500-v3=y
CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_zte_mf286=y
CONFIG_TARGET_DEVICE_ath79_nand_DEVICE_zte_mf281=y

CONFIG_PACKAGE_luci-ssl=y # uhttpd服务

Expand Down
2 changes: 2 additions & 0 deletions devices/bcm27xx_bcm2710/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SHELL_FOLDER=$(dirname $(readlink -f "$0"))
bash $SHELL_FOLDER/../common/kernel_5.15.sh



sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile

sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile
Expand Down
2 changes: 2 additions & 0 deletions devices/bcm27xx_bcm2711/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
SHELL_FOLDER=$(dirname $(readlink -f "$0"))
bash $SHELL_FOLDER/../common/kernel_5.15.sh



sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += fdisk lsblk kmod-usb-net-asix-ax88179 kmod-usb-net-rtl8152/' target/linux/bcm27xx/Makefile
sed -i 's/ factory.img.gz / /' target/linux/bcm27xx/image/Makefile

17 changes: 9 additions & 8 deletions devices/common/.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CONFIG_LUCI_LANG_zh_Hans=y
CONFIG_LUCI_LANG_en=y
CONFIG_PACKAGE_coremark=y
CONFIG_DEVEL=y
CONFIG_CCACHE=y
CONFIG_CCACHE=n
CONFIG_TOOLCHAINOPTS=y
CONFIG_COREMARK_OPTIMIZE_O3=y
CONFIG_COREMARK_ENABLE_MULTITHREADING=y
Expand Down Expand Up @@ -81,17 +81,18 @@ CONFIG_PACKAGE_ca-bundle=y

CONFIG_PACKAGE_dockerd=m

CONFIG_PACKAGE_kmod-hermes-pci=n
CONFIG_PACKAGE_kmod-hermes-pcmcia=n
CONFIG_PACKAGE_kmod-hermes-plx=n
CONFIG_PACKAGE_kmod-ipw2100=n
CONFIG_PACKAGE_kmod-ipw2200=n
CONFIG_PACKAGE_kmod-libipw=n
CONFIG_PACKAGE_kmod-rtl8189es=n
CONFIG_PACKAGE_kmod-drm-nouveau=n
CONFIG_PACKAGE_kmod-rtl8821cu=n
CONFIG_PACKAGE_kmod-rtl88x2bu=n

CONFIG_PACKAGE_kmod-rtl8189es=n

CONFIG_PACKAGE_kmod-sprd_pcie=n

CONFIG_PACKAGE_kmod-pcie_mhi=n




CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y
Expand Down
11 changes: 8 additions & 3 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,20 @@ sed -i '/$(curdir)\/compile:/c\$(curdir)/compile: package/opkg/host/compile' pac
sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite --force-depends/' package/Makefile
sed -i "s/DEFAULT_PACKAGES:=/DEFAULT_PACKAGES:=luci-app-advanced luci-app-firewall luci-app-gpsysupgrade luci-app-opkg luci-app-upnp luci-app-autoreboot \
luci-app-wizard luci-base luci-compat luci-lib-ipkg luci-lib-fs \
coremark wget-ssl curl htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr bash openssh-sftp-server block-mount resolveip ds-lite swconfig /" include/target.mk
coremark wget-ssl curl autocore htop nano zram-swap kmod-lib-zstd kmod-tcp-bbr bash openssh-sftp-server block-mount resolveip ds-lite swconfig /" include/target.mk
sed -i "s/procd-ujail//" include/target.mk

sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk

status=$(curl -H "Authorization: token $REPO_TOKEN" -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].status')
while [ "$status" == "in_progress" ];do
echo "$status"
while [[ "$status" == "in_progress" || "$status" == "queued" ]];do
echo "wait 5s"
sleep 5
status=$(curl -H "Authorization: token $REPO_TOKEN" -s "https://api.github.com/repos/kiddin9/openwrt-packages/actions/runs" | jq -r '.workflow_runs[0].status')
done


mv -f feeds/kiddin9/r81* tmp/

sed -i "s/192.168.1/10.0.0/" package/feeds/kiddin9/base-files/files/bin/config_generate
Expand All @@ -40,8 +43,9 @@ svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/hack-5.10
rm -rf target/linux/generic/hack-5.10/{220-gc_sections*,781-dsa-register*,780-drivers-net*,996-fs-ntfs3*,100-update-mtk_wed_h.patch}
) &

curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-5.10/613-netfilter_optional_tcp_window_check.patch

sed -i "/BuildPackage,miniupnpd-iptables/d" feeds/packages/net/miniupnpd/Makefile
sed -i 's/\/cgi-bin\/\(luci\|cgi-\)/\/\1/g' `find package/feeds/kiddin9/luci-*/ -name "*.lua" -or -name "*.htm*" -or -name "*.js"` &
sed -i 's/Os/O2/g' include/target.mk
sed -i "/mediaurlbase/d" package/feeds/*/luci-theme*/root/etc/uci-defaults/*
sed -i 's/=bbr/=cubic/' package/kernel/linux/files/sysctl-tcp-bbr.conf
Expand All @@ -51,6 +55,7 @@ sed -i 's/max_requests 3/max_requests 20/g' package/network/services/uhttpd/file
#rm -rf ./feeds/packages/lang/{golang,node}
sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab


date=`date +%m.%d.%Y`
sed -i -e "/\(# \)\?REVISION:=/c\REVISION:=$date" -e '/VERSION_CODE:=/c\VERSION_CODE:=$(REVISION)' include/version.mk

Expand Down
9 changes: 5 additions & 4 deletions devices/common/kernel_5.15.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

rm -rf tools target/linux package/kernel package/boot package/firmware/linux-firmware include/{kernel-*,netfilter.mk}
rm -rf target/linux package/kernel package/boot package/firmware/linux-firmware include/{kernel-*,netfilter.mk}
latest="$(curl -sfL https://github.com/openwrt/openwrt/commits/master/include | grep -o 'href=".*>kernel: bump 5.15' | head -1 | cut -d / -f 5 | cut -d '"' -f 1)"
latest=""
mkdir new; cp -rf .git new/.git
Expand All @@ -9,10 +9,10 @@ cd new

[ "$(echo $(git log -1 --pretty=short) | grep "kernel: bump 5.15")" ] && git checkout $latest

cp -rf --parents tools target/linux package/kernel package/boot package/firmware/linux-firmware include/{kernel-*,netfilter.mk} ../
cp -rf --parents target/linux package/kernel package/boot package/firmware/linux-firmware include/{kernel-*,netfilter.mk} ../
cd -

sed -i "s/9 -Xe/extreme/" include/image.mk
#sed -i "s/9 -Xe/extreme/" include/image.mk

sed -i "s/^.*vermagic$/\techo '1' > \$(LINUX_DIR)\/.vermagic/" include/kernel-defaults.mk

Expand All @@ -24,7 +24,8 @@ svn export --force https://github.com/openwrt/packages/trunk/net/xtables-addons
svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/hack-5.15 target/linux/generic/hack-5.15
svn co https://github.com/coolsnowwolf/lede/trunk/target/linux/generic/backport-5.15 target/linux/generic/backport-5.15
find target/linux/generic/backport-5.15 -name "[0-9][0-9][0-9]-[a-z][a-z]*" -exec rm -f {} \;
rm -rf target/linux/generic/backport-5.15/{802-v6.1-nvmem*,803-v5.19-nvmem*}
rm -rf target/linux/generic/backport-5.15/{802-v6.1-nvmem*,803-v5.19-nvmem*,733-v6.2-02-net-mediatek-sgmii-ensure*,733-v6.2-03-net-mediatek*,733-v6.2-04-mtk_sgmii-enable*}
curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch -o target/linux/generic/pending-5.15/613-netfilter_optional_tcp_window_check.patch

sed -i "s/tty\(0\|1\)::askfirst/tty\1::respawn/g" target/linux/*/base-files/etc/inittab

Expand Down
Loading

0 comments on commit b866906

Please sign in to comment.