Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
kiddin9 committed Mar 2, 2024
1 parent 74f4a6e commit a4f573c
Show file tree
Hide file tree
Showing 24 changed files with 1,937 additions and 763 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Openwrt-AutoBuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ jobs:
cp -rf devices/${{matrix.target}}/. openwrt/
cp -rf devices openwrt/
cd openwrt
cp -Rf ./diy/* ./ || true
chmod +x devices/common/$DIY_SH
/bin/bash "devices/common/$DIY_SH"
cp -f devices/common/$CONFIG_FILE .config
Expand All @@ -196,6 +195,7 @@ jobs:
echo "/bin/bash devices/${{matrix.target}}/$DIY_SH"
/bin/bash "devices/${{matrix.target}}/$DIY_SH"
fi
cp -Rf ./diy/* ./ || true
- name: Apply patches
run: |
Expand Down
4 changes: 1 addition & 3 deletions devices/common/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ grep -q 'PKG_RELEASE:=9' package/libs/openssl/Makefile && {
sh -c "curl -sfL https://github.com/openwrt/openwrt/commit/a48d0bdb77eb93f7fba6e055dace125c72755b6a.patch | patch -d './' -p1 --forward"
}

sed -i "/wireless.\${name}.disabled/d" package/kernel/mac80211/files/lib/wifi/mac80211.sh
sed -i "/wireless.\${name}.disabled/d" package/kernel/mac80211/files/lib/wifi/mac80211.sh || sed -i "/wireless.\${name}.disabled/d" package/network/config/wifi-scripts/files/lib/wifi/mac80211.sh

sed -i "/BuildPackage,miniupnpd-iptables/d" feeds/packages/net/miniupnpd/Makefile
sed -i 's/Os/O2/g' include/target.mk
Expand All @@ -69,8 +69,6 @@ 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

sed -i '/echo "radio_config_id=${radio_md5sum}" >> $hostapd_conf_file/d' package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh

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

Expand Down
15 changes: 0 additions & 15 deletions devices/ipq807x_generic/.config

This file was deleted.

8 changes: 0 additions & 8 deletions devices/ipq807x_generic/diy.sh

This file was deleted.

600 changes: 0 additions & 600 deletions devices/ipq807x_generic/patches/01-zte_mf269.bin.patch

This file was deleted.

2 changes: 1 addition & 1 deletion devices/mediatek_filogic/.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_jcg_q30-pro=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cetron_ct3003=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-mt6000=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_glinet_gl-mt2500=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cmcc_rax3000m=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cmcc_rax3000m-nand=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cmcc_rax3000m-emmc=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_jdcloud_re-cp-03=y
CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_abt_asr3000=y
Expand Down
6 changes: 0 additions & 6 deletions devices/mediatek_filogic/diy.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
#!/bin/bash

shopt -s extglob

sed -i "/mt7986_xiaomi_redmi-router-ax6000 /d" package/boot/uboot-mediatek/Makefile
sed -i "/mt7981_h3c_magic-nx30-pro /d" package/boot/uboot-mediatek/Makefile
sed -i "/mt7981_qihoo_360t7 /d" package/boot/uboot-mediatek/Makefile
sed -i "/cmcc_rax3000m.* /d" package/boot/uboot-mediatek/Makefile
sed -i "/mt7981_jcg_q30-pro /d" package/boot/uboot-mediatek/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/ {
model = "CMCC RAX3000M (NAND version)";
compatible = "cmcc,rax3000m", "mediatek,mt7981";
compatible = "cmcc,rax3000m-nand", "mediatek,mt7981";

aliases {
label-mac-device = &gmac1;
Expand Down
97 changes: 48 additions & 49 deletions devices/mediatek_filogic/patches/08-cmcc_rax3000m.patch
Original file line number Diff line number Diff line change
Expand Up @@ -12,66 +12,47 @@

--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -46,9 +46,9 @@ case "$board" in
[ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress
[ "$PHYNBR" = "1" ] && macaddr_setbit_la $(macaddr_add $addr 2) > /sys${DEVPATH}/macaddress
@@ -57,6 +57,13 @@ case "$board" in
esac
[ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
;;
- cmcc,rax3000m)
- case "$(cmdline_get_var root)" in
- /dev/mmc*)
+ cmcc,rax3000m*)
+ case "$board" in
+ cmcc,rax3000m-emmc)
addr=$(mmc_get_mac_binary factory 0xa)
;;
*)
+ cmcc,rax3000m-emmc)
+ [ "$PHYNBR" = "1" ] && mmc_get_mac_binary factory 0xa > /sys${DEVPATH}/macaddress
+ ;;
+ cmcc,a10|\
+ cmcc,rax3000m-nand)
+ [ "$PHYNBR" = "1" ] && mtd_get_mac_binary Factory 0xa > /sys${DEVPATH}/macaddress
+ ;;
cudy,wr3000-v1)
addr=$(mtd_get_mac_binary bdinfo 0xde00)
# Originally, phy0 is phy1 mac with LA bit set. However, this would conflict

--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -251,37 +251,36 @@ TARGET_DEVICES += cetron_ct3003

define Device/cmcc_rax3000m
DEVICE_VENDOR := CMCC
- DEVICE_MODEL := RAX3000M
- DEVICE_DTS := mt7981b-cmcc-rax3000m
- DEVICE_DTS_OVERLAY := mt7981b-cmcc-rax3000m-emmc mt7981b-cmcc-rax3000m-nand
@@ -280,7 +280,38 @@ define Device/cmcc_rax3000m
ARTIFACT/nand-preloader.bin := mt7981-bl2 spim-nand-ddr4
ARTIFACT/nand-bl31-uboot.fip := mt7981-bl31-uboot cmcc_rax3000m-nand
endef
-TARGET_DEVICES += cmcc_rax3000m
+
+define Device/cmcc_rax3000m-nand
+ DEVICE_VENDOR := CMCC
+ DEVICE_MODEL := RAX3000M NAND
+ DEVICE_DTS := mt7981b-cmcc-rax3000m-nand
DEVICE_DTS_DIR := ../dts
- DEVICE_DTC_FLAGS := --pad 4096
- DEVICE_DTS_LOADADDR := 0x43f00000
DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \
e2fsprogs f2fsck mkf2fs
- KERNEL_LOADADDR := 0x44000000
- KERNEL := kernel-bin | gzip
- KERNEL_INITRAMFS := kernel-bin | lzma | \
- fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
- KERNEL_INITRAMFS_SUFFIX := -recovery.itb
+ DEVICE_DTS_DIR := ../dts
+ DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware kmod-usb3 \
+ e2fsprogs f2fsck mkf2fs
+ UBINIZE_OPTS := -E 5
+ BLOCKSIZE := 128k
+ PAGESIZE := 2048
+ IMAGE_SIZE := 116736k
KERNEL_IN_UBI := 1
- UBOOTENV_IN_UBI := 1
- IMAGES := sysupgrade.itb
- IMAGE_SIZE := $$(shell expr 64 + $$(CONFIG_TARGET_ROOTFS_PARTSIZE))m
- IMAGE/sysupgrade.itb := append-kernel | \
- fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | \
- pad-rootfs | append-metadata
- ARTIFACTS := \
- emmc-gpt.bin emmc-preloader.bin emmc-bl31-uboot.fip \
- nand-preloader.bin nand-bl31-uboot.fip
- ARTIFACT/emmc-gpt.bin := mt798x-gpt emmc
- ARTIFACT/emmc-preloader.bin := mt7981-bl2 emmc-ddr4
- ARTIFACT/emmc-bl31-uboot.fip := mt7981-bl31-uboot cmcc_rax3000m-emmc
- ARTIFACT/nand-preloader.bin := mt7981-bl2 spim-nand-ddr4
- ARTIFACT/nand-bl31-uboot.fip := mt7981-bl31-uboot cmcc_rax3000m-nand
+ KERNEL_IN_UBI := 1
+ IMAGES += factory.bin
+ IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
endef
TARGET_DEVICES += cmcc_rax3000m
+endef
+TARGET_DEVICES += cmcc_rax3000m-nand
+
+define Device/cmcc_rax3000m-emmc
+ DEVICE_VENDOR := CMCC
+ DEVICE_MODEL := RAX3000M eMMC
Expand All @@ -85,7 +66,25 @@
+ IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+endef
+TARGET_DEVICES += cmcc_rax3000m-emmc
+
define Device/confiabits_mt7981
DEVICE_VENDOR := Confiabits
DEVICE_MODEL := MT7981

--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -109,6 +109,7 @@ platform_do_upgrade() {
cudy,wr3000-v1)
default_do_upgrade "$1"
;;
+ cmcc,rax3000m-emmc|\
glinet,gl-mt6000)
CI_KERNPART="kernel"
CI_ROOTPART="rootfs"
@@ -184,6 +185,7 @@ platform_copy_config() {
;;
esac
;;
+ cmcc,rax3000m-emmc|\
glinet,gl-mt6000|\
ubnt,unifi-6-plus)
emmc_copy_config
4 changes: 2 additions & 2 deletions devices/mediatek_filogic/patches/11-gl-mt2500.patch
Original file line number Diff line number Diff line change
Expand Up @@ -238,17 +238,17 @@ index 3c278d5faf2c4..6130768cb4c66 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -97,6 +97,7 @@ platform_do_upgrade() {
cudy,wr3000-v1)
default_do_upgrade "$1"
;;
cmcc,rax3000m-emmc|\
+ glinet,gl-mt2500|\
glinet,gl-mt6000)
CI_KERNPART="kernel"
CI_ROOTPART="rootfs"
@@ -176,6 +177,7 @@ platform_copy_config() {
;;
esac
;;
cmcc,rax3000m-emmc|\
+ glinet,gl-mt2500|\
glinet,gl-mt6000|\
ubnt,unifi-6-plus)
Expand Down
14 changes: 0 additions & 14 deletions devices/mediatek_filogic/patches/15-cmcc-a10.patch
Original file line number Diff line number Diff line change
Expand Up @@ -270,20 +270,6 @@ index 53e7b024e40fb..61637e09c7f0e 100644
confiabits,mt7981|\
cudy,wr3000-v1|\
tenbay,wr3000k|\
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index cb476d84d9115..125bec12cdb88 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -62,6 +62,9 @@
esac
[ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
;;
+ cmcc,a10)
+ [ "$PHYNBR" = "1" ] && mtd_get_mac_binary factory 0xa > /sys${DEVPATH}/macaddress
+ ;;
cudy,wr3000-v1)
addr=$(mtd_get_mac_binary bdinfo 0xde00)
# Originally, phy0 is phy1 mac with LA bit set. However, this would conflict
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 6976a399e86dc..83428f0d981e7 100644
--- a/target/linux/mediatek/image/filogic.mk
Expand Down
3 changes: 2 additions & 1 deletion devices/qualcommax_ipq60xx/diy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))

git_clone_path master https://github.com/coolsnowwolf/lede target/linux/generic/hack-6.1

rm -rf target/linux/qualcommax package/kernel/qca-* package/boot/uboot-envtools package/firmware/ipq-wifi
rm -rf target/linux/qualcommax/!(Makefile) package/kernel/qca-* package/boot/uboot-envtools package/firmware/ipq-wifi
git_clone_path master https://github.com/coolsnowwolf/lede target/linux/qualcommax
git_clone_path master https://github.com/coolsnowwolf/lede package/qca
git_clone_path master https://github.com/coolsnowwolf/lede package/boot/uboot-envtools
Expand All @@ -18,3 +18,4 @@ curl -sfL https://raw.githubusercontent.com/coolsnowwolf/lede/master/target/linu




Binary file not shown.
11 changes: 11 additions & 0 deletions devices/qualcommax_ipq60xx/patches/01-zn-m2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/target/linux/qualcommax/image/ipq60xx.mk
+++ b/target/linux/qualcommax/image/ipq60xx.mk
@@ -28,6 +28,8 @@ define Device/cmiot_ax18
$(call Device/UbiFit)
DEVICE_VENDOR := CMIOT
DEVICE_MODEL := AX18
+ DEVICE_ALT0_VENDOR := ZN
+ DEVICE_ALT0_MODEL := M2
BLOCKSIZE := 128k
PAGESIZE := 2048
DEVICE_DTS_CONFIG := config@cp03-c1
Loading

0 comments on commit a4f573c

Please sign in to comment.