Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update diy.sh #1285

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,12 @@ jobs:
- 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
make dirclean
else
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
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
7 changes: 6 additions & 1 deletion devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ 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
svn co https://github.com/openwrt/openwrt/trunk/package/network/services/hostapd package/feeds/kiddin9/hostapd

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,7 +28,9 @@ 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
Expand Down
4 changes: 2 additions & 2 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,7 +9,7 @@ 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
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