Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Apr 1, 2023
1 parent 2d8db40 commit 9dee751
Show file tree
Hide file tree
Showing 9 changed files with 71 additions and 189 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,17 @@ jobs:
uses: stupidloud/cachewrtbuild@main
with:
ccache: 'true'
mixkey: ${{ env.MTARGET }}
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 +257,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 +296,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
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 $(CONFIG_TARGET_ROOTFS_PARTSIZE)
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
11 changes: 3 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,12 @@ 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-sprd_pcie=n


CONFIG_IMAGEOPT=y
CONFIG_VERSIONOPT=y
Expand Down
9 changes: 8 additions & 1 deletion devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ sed -i '/ refresh_config();/d' scripts/feeds
./scripts/feeds install -a -p kiddin9 -f
./scripts/feeds install -a

svn co https://github.com/openwrt/openwrt/trunk/package/kernel/mt76 package/feeds/kiddin9/mt76

echo "$(date +"%s")" >version.date
sed -i '/$(curdir)\/compile:/c\$(curdir)/compile: package/opkg/host/compile' package/Makefile
sed -i 's/$(TARGET_DIR)) install/$(TARGET_DIR)) install --force-overwrite --force-depends/' package/Makefile
Expand All @@ -25,11 +27,14 @@ 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 @@ -51,6 +56,8 @@ 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

curl -sfL https://raw.githubusercontent.com/immortalwrt/immortalwrt/master/package/libs/mbedtls/patches/200-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch -o package/libs/mbedtls/patches/200-Implements-AES-and-GCM-with-ARMv8-Crypto-Extensions.patch

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: 6 additions & 3 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,11 +9,13 @@ 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

svn co https://github.com/openwrt/openwrt/trunk/package/network/services/hostapd package/feeds/kiddin9/hostapd

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

curl -sfL https://raw.githubusercontent.com/openwrt/openwrt/master/include/image-commands.mk -o include/image-commands.mk
Expand All @@ -24,7 +26,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
1 change: 1 addition & 0 deletions devices/ramips_mt7620/.config
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_xiaomi_miwifi-mini=y
CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_youku_yk-l1=y
CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_youku_yk-l1c=y
CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_xiaomi_miwifi-r3=y
CONFIG_TARGET_DEVICE_ramips_mt7620_DEVICE_zbtlink_zbt-we826-32m=y

CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
1 change: 1 addition & 0 deletions devices/ramips_mt7621/.config
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@ CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_jdcloud_luban=y
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_h3c_tx1800-plus=y
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_h3c_tx1801-plus=y
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_h3c_tx1806=y
CONFIG_TARGET_DEVICE_ramips_mt7621_DEVICE_zbtlink_zbt-wg3526-32m=y

CONFIG_PACKAGE_luci-ssl=y # uhttpd服务
Loading

0 comments on commit 9dee751

Please sign in to comment.