kiddin9 6 місяців тому
батько
коміт
0e95c3ce7b

+ 4 - 1
devices/common/diy.sh

@@ -36,7 +36,7 @@ git_clone_path openwrt-24.10 https://github.com/immortalwrt/immortalwrt package/
 echo "$(date +"%s")" >version.date
 sed -i '/$(curdir)\/compile:/c\$(curdir)/compile: package/opkg/host/compile' package/Makefile
 sed -i "s/DEFAULT_PACKAGES:=/DEFAULT_PACKAGES:=luci-app-advancedplus luci-app-firewall luci-app-package-manager luci-app-upnp luci-app-syscontrol luci-proto-wireguard \
-luci-app-wizard luci-base luci-compat luci-lib-ipkg luci-lib-fs \
+luci-app-wizard luci-base luci-compat luci-lib-ipkg luci-lib-fs luci-app-log \
 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 luci-app-fan luci-app-filemanager /" include/target.mk
 
 sed -i "s/procd-ujail//" include/target.mk
@@ -84,3 +84,6 @@ sed -i \
 	package/feeds/kiddin9/*/Makefile
 
 sed -i "s/OpenWrt/Kwrt/g" package/base-files/files/bin/config_generate package/base-files/image-config.in package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc config/Config-images.in Config.in include/u-boot.mk include/version.mk || true
+
+sed -i -e "s/set \${s}.country='\${country || ''}'/set \${s}.country='\${country || \"CN\"}'/g" -e "s/set \${s}.disabled=.*/set \${s}.disabled='0'/" package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc
+

+ 1 - 1
devices/common/patches/imagebuilder.patch

@@ -113,7 +113,7 @@
 +        $(shell echo "`grep kwrt_kiddin9 $(TOPDIR)/repositories.conf | sed -e 's/kiddin9/small_flash/g'`" >>$(TOPDIR)/repositories.conf)
 +	endif
 +	ifneq ($(findstring /data/bcache/,$(BIN_DIR)),)
-+		BUILD_PACKAGES += -luci-app-homeproxy -luci-app-istorex -luci-theme-argon -htop -bash -openssh-sftp-server -luci-nginx luci-ssl
++		BUILD_PACKAGES += -luci-app-istorex -luci-theme-argon -htop -bash -openssh-sftp-server -luci-nginx luci-ssl
 +	endif
 +else
 +        $(shell sed -i "/small_flash/d" $(TOPDIR)/repositories.conf)

+ 26 - 13
devices/common/patches/wifi-scripts.patch

@@ -1,14 +1,27 @@
---- a/package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc
-+++ b/package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc
-@@ -96,9 +96,9 @@ set ${s}.${id}
- set ${s}.band='${band_name}'
- set ${s}.channel='${channel}'
- set ${s}.htmode='${htmode}'
--set ${s}.country='${country || ''}'
-+set ${s}.country='${country || "CN"}'
- set ${s}.num_global_macaddr='${num_global_macaddr || ''}'
--set ${s}.disabled='${defaults ? 0 : 1}'
-+set ${s}.disabled='0'
+--- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
++++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
+@@ -122,6 +122,7 @@ hostapd_common_add_device_config() {
+ 	config_add_int maxassoc
+ 	config_add_int reg_power_type
+ 	config_add_boolean stationary_ap
++	config_add_boolean vendor_vht
  
- set ${si}=wifi-iface
- set ${si}.device='${name}'
+ 	config_add_string acs_chan_bias
+ 	config_add_array hostapd_options
+@@ -141,7 +142,7 @@ hostapd_prepare_device_config() {
+ 	json_get_vars country country3 country_ie beacon_int:100 doth require_mode legacy_rates \
+ 		acs_chan_bias local_pwr_constraint spectrum_mgmt_required airtime_mode cell_density \
+ 		rts_threshold beacon_rate rssi_reject_assoc_rssi rssi_ignore_probe_request maxassoc \
+-		mbssid:0 band reg_power_type stationary_ap
++		mbssid:0 band reg_power_type stationary_ap vendor_vht
+ 
+ 	hostapd_set_log_options base_cfg
+ 
+@@ -210,6 +211,7 @@ hostapd_prepare_device_config() {
+ 				set_default rate_list "24000 36000 48000 54000"
+ 				set_default basic_rate_list "24000"
+ 			fi
++			[ -n "$vendor_vht" ] && append base_cfg "vendor_vht=$vendor_vht" "$N"
+ 		;;
+ 		a)
+ 			if [ "$cell_density" -eq 1 ]; then

+ 5 - 91
devices/common/patches/wireless.patch

@@ -1,101 +1,15 @@
 --- a/package/feeds/luci/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
 +++ b/package/feeds/luci/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js
-@@ -944,6 +944,10 @@ return view.extend({
- 					o = ss.taboption('general', form.Flag, 'legacy_rates', _('Allow legacy 802.11b rates'), _('Legacy or badly behaving devices may require legacy 802.11b rates to interoperate. Airtime efficiency may be significantly reduced where these are used. It is recommended to not allow 802.11b rates where possible.'));
- 					o.depends({'_freq': '2g', '!contains': true});
- 
-+					o = ss.taboption("advanced", form.Flag, 'mu_beamformer', _('MU-MIMO'));
-+					o.rmempty = false;
-+					o.default = '0';
-+
- 					o = ss.taboption('general', CBIWifiTxPowerValue, 'txpower', _('Maximum transmit power'), _('Specifies the maximum transmit power the wireless radio may use. Depending on regulatory requirements and wireless usage, the actual transmit power may be reduced by the driver.'));
- 					o.wifiNetwork = radioNet;
- 
-@@ -975,6 +979,9 @@ return view.extend({
- 					o.datatype = 'range(15,65535)';
+@@ -1026,6 +1026,12 @@ return view.extend({
  					o.placeholder = 100;
  					o.rmempty = true;
-+
-+					o = ss.taboption('advanced', form.Flag, 'vendor_vht', _('Enable 256-QAM'), _('802.11n 2.4Ghz Only'));
-+					o.default = o.disabled;
- 				}
- 
  
-@@ -1069,6 +1076,68 @@ return view.extend({
- 				};
- 
- 				if (hwtype == 'mac80211') {
-+					// Probe 802.11k support
-+					o = ss.taboption('encryption', form.Flag, 'ieee80211k', _('802.11k'), _('Enables The 802.11k standard provides information to discover the best available access point'));
-+					o.depends({ mode : 'ap', encryption : 'wpa' });
-+					o.depends({ mode : 'ap', encryption : 'wpa2' });
-+					o.depends({ mode : 'ap-wds', encryption : 'wpa' });
-+					o.depends({ mode : 'ap-wds', encryption : 'wpa2' });
-+					o.depends({ mode : 'ap', encryption : 'psk' });
-+					o.depends({ mode : 'ap', encryption : 'psk2' });
-+					o.depends({ mode : 'ap', encryption : 'psk-mixed' });
-+					o.depends({ mode : 'ap-wds', encryption : 'psk' });
-+					o.depends({ mode : 'ap-wds', encryption : 'psk2' });
-+					o.depends({ mode : 'ap-wds', encryption : 'psk-mixed' });
-+					o.rmempty = true;
-+
-+					o = ss.taboption('encryption', form.Flag, 'rrm_neighbor_report', _('Enable neighbor report via radio measurements'));
-+					o.default = o.enabled;
-+					o.depends({ ieee80211k : '1' });
-+					o.rmempty = true;
-+
-+					o = ss.taboption('encryption', form.Flag, 'rrm_beacon_report', _('Enable beacon report via radio measurements'));
-+					o.default = o.enabled;
-+					o.depends({ ieee80211k : '1' });
-+					o.rmempty = true;
-+					// End of 802.11k options
-+
-+					// Probe 802.11v support
-+					o = ss.taboption('encryption', form.Flag, 'ieee80211v', _('802.11v'), _('Enables 802.11v allows client devices to exchange information about the network topology,tating overall improvement of the wireless network.'));
-+					o.depends({ mode : 'ap', encryption : 'wpa' });
-+					o.depends({ mode : 'ap', encryption : 'wpa2' });
-+					o.depends({ mode : 'ap-wds', encryption : 'wpa' });
-+					o.depends({ mode : 'ap-wds', encryption : 'wpa2' });
-+					o.depends({ mode : 'ap', encryption : 'psk' });
-+					o.depends({ mode : 'ap', encryption : 'psk2' });
-+					o.depends({ mode : 'ap', encryption : 'psk-mixed' });
-+					o.depends({ mode : 'ap-wds', encryption : 'psk' });
-+					o.depends({ mode : 'ap-wds', encryption : 'psk2' });
-+					o.depends({ mode : 'ap-wds', encryption : 'psk-mixed' });
-+					o.rmempty = true;
-+
-+
-+					o = ss.taboption('encryption', form.Flag, 'wnm_sleep_mode', _('extended sleep mode for stations'));
++					o = ss.taboption("advanced", form.Flag, 'mu_beamformer', _('MU-MIMO'));
 +					o.default = o.disabled;
-+					o.depends({ ieee80211v : '1' });
-+					o.rmempty = true;
 +
-+					o = ss.taboption('encryption', form.Flag, 'bss_transition', _('BSS Transition Management'));
++					o = ss.taboption('advanced', form.Flag, 'vendor_vht', _('Enable 256-QAM'), _('802.11n 2.4Ghz Only'));
 +					o.default = o.disabled;
-+					o.depends({ ieee80211v : '1' });
-+					o.rmempty = true;
-+
-+					o = ss.taboption('encryption', form.ListValue, 'time_advertisement', _('Time advertisement'));
-+					o.depends({ ieee80211v : '1' });
-+					o.value('0', _('disabled'));
-+					o.value('2', _('UTC time at which the TSF timer is 0'));
-+					o.rmempty = true;
-+
-+					o = ss.taboption('encryption', form.Value, 'time_zone', _('time zone'), _('Local time zone as specified in 8.3 of IEEE Std 1003.1-2004'));
-+					o.depends({ time_advertisement : '2' });
-+					o.placeholder = 'UTC8';
-+					o.rmempty = true;
-+					// End of 802.11v options
 +
- 					var mode = ss.children[0],
- 					    bssid = ss.children[5],
- 					    encr;
-@@ -1254,7 +1323,7 @@ return view.extend({
- 
- 				var crypto_modes = [];
- 
--				if (hwtype == 'mac80211') {
-+				if (hwtype != 'broadcom') {
- 					var has_supplicant = L.hasSystemFeature('wpasupplicant'),
- 					    has_hostapd = L.hasSystemFeature('hostapd');
+ 					o = ss.taboption('advanced', form.Flag, 'rxldpc', _('Rx LDPC'), _('Low-Density Parity-Check'));
+ 					o.default = '1';
  

+ 1 - 1
devices/mediatek_filogic/diy.sh

@@ -5,7 +5,7 @@ SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
 #bash $SHELL_FOLDER/../common/kernel_6.6.sh
 
-sed -i '/bootargs-.* = " root=\/dev\/fit0 rootwait";/d' target/linux/mediatek/dts/*
+sed -i '/bootargs-.* = ".*root=\/dev\/fit0 rootwait";/d' target/linux/mediatek/dts/*
 
 find target/linux/mediatek/filogic/base-files/ -type f -exec sed -i "s/-stock//g" {} \;
 find target/linux/mediatek/base-files/ -type f -exec sed -i "s/-stock//g" {} \;

+ 0 - 190
devices/mediatek_filogic/diy/target/linux/mediatek/dts/mt7981b-huasifei-wh3000.dts

@@ -1,190 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-
-/dts-v1/;
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
-#include <dt-bindings/leds/common.h>
-
-#include "mt7981.dtsi"
-
-/ {
-	model = "Huasifei WH3000";
-	compatible = "huasifei,wh3000", "mediatek,mt7981";
-
-	aliases {
-		serial0 = &uart0;
-		led-boot = &wlan_led;
-		led-failsafe = &wlan_led;
-		led-upgrade = &wlan_led;
-	};
-
-	chosen {
-		bootargs = "root=PARTLABEL=rootfs rootwait";
-		stdout-path = "serial0:115200n8";
-	};
-
-	gpio-keys {
-		compatible = "gpio-keys";
-
-		button-mode {
-			label = "mode";
-			linux,code = <BTN_0>;
-			linux,input-type = <EV_SW>;
-			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
-			debounce-interval = <60>;
-		};
-
-		button-reset {
-			label = "reset";
-			linux,code = <KEY_RESTART>;
-			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
-		};
-	};
-
-	gpio-leds {
-		compatible = "gpio-leds";
-
-		wan_led: led-0 {
-			function = LED_FUNCTION_WAN;
-			color = <LED_COLOR_ID_RED>;
-			gpios = <&pio 11 GPIO_ACTIVE_LOW>;
-		};
-
-		wlan_led: led-1 {
-			function = LED_FUNCTION_WLAN;
-			color = <LED_COLOR_ID_BLUE>;
-			gpios = <&pio 10 GPIO_ACTIVE_LOW>;
-			linux,default-trigger = "phy1tpt";
-		};
-	};
-
-	memory@40000000 {
-		reg = <0 0x40000000 0 0x40000000>;
-	};
-};
-
-&eth {
-	pinctrl-names = "default";
-	pinctrl-0 = <&mdio_pins>;
-	status = "okay";
-
-	gmac0: mac@0 {
-		compatible = "mediatek,eth-mac";
-		reg = <0>;
-		nvmem-cells = <&macaddr_factory_4 2>;
-		nvmem-cell-names = "mac-address";
-		phy-mode = "2500base-x";
-		phy-handle = <&phy1>;
-	};
-
-	gmac1: mac@1 {
-		compatible = "mediatek,eth-mac";
-		reg = <1>;
-		nvmem-cells = <&macaddr_factory_4 3>;
-		nvmem-cell-names = "mac-address";
-		phy-mode = "gmii";
-		phy-handle = <&int_gbe_phy>;
-	};
-};
-
-&mdio_bus {
-	phy1: ethernet-phy@1 {
-		compatible = "ethernet-phy-ieee802.3-c45";
-		reg = <1>;
-		interrupts = <38 IRQ_TYPE_LEVEL_LOW>;
-		interrupt-parent = <&pio>;
-		reset-assert-us = <100000>;
-		reset-deassert-us = <100000>;
-		reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
-		realtek,aldps-enable;
-	};
-};
-
-&mmc0 {
-	bus-width = <8>;
-	cap-mmc-highspeed;
-	max-frequency = <52000000>;
-	no-sd;
-	no-sdio;
-	non-removable;
-	pinctrl-names = "default", "state_uhs";
-	pinctrl-0 = <&mmc0_pins_default>;
-	pinctrl-1 = <&mmc0_pins_uhs>;
-	vmmc-supply = <&reg_3p3v>;
-	status = "okay";
-
-	card@0 {
-		compatible = "mmc-card";
-		reg = <0>;
-
-		block {
-			compatible = "block-device";
-
-			partitions {
-				block-partition-factory {
-					partname = "factory";
-
-					nvmem-layout {
-						compatible = "fixed-layout";
-						#address-cells = <1>;
-						#size-cells = <1>;
-
-						eeprom_factory_0: eeprom@0 {
-							reg = <0x0 0x1000>;
-						};
-
-						macaddr_factory_4: macaddr@4 {
-							compatible = "mac-base";
-							reg = <0x4 0x6>;
-							#nvmem-cell-cells = <1>;
-						};
-					};
-				};
-			};
-		};
-	};
-};
-
-&pio {
-	mmc0_pins_default: mmc0-pins-default {
-		mux {
-			function = "flash";
-			groups = "emmc_45";
-		};
-	};
-
-	mmc0_pins_uhs: mmc0-pins-uhs {
-		mux {
-			function = "flash";
-			groups = "emmc_45";
-		};
-	};
-};
-
-&uart0 {
-	status = "okay";
-};
-
-&usb_phy {
-	status = "okay";
-};
-
-&watchdog {
-	status = "okay";
-};
-
-&wifi {
-	nvmem-cells = <&eeprom_factory_0>;
-	nvmem-cell-names = "eeprom";
-	status = "okay";
-
-	band@1 {
-		reg = <1>;
-		nvmem-cells = <&macaddr_factory_4 1>;
-		nvmem-cell-names = "mac-address";
-	};
-};
-
-&xhci {
-	status = "okay";
-};

+ 3 - 1
devices/mediatek_filogic/patches/03-nx30.patch

@@ -14,7 +14,7 @@
 
 --- a/target/linux/mediatek/image/filogic.mk
 +++ b/target/linux/mediatek/image/filogic.mk
-@@ -208,19 +208,9 @@ define Device/h3c_magic-nx30-pro
+@@ -208,19 +208,11 @@ define Device/h3c_magic-nx30-pro
    BLOCKSIZE := 128k
    PAGESIZE := 2048
    KERNEL_IN_UBI := 1
@@ -27,6 +27,8 @@
 -        fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
 -  IMAGE/sysupgrade.itb := append-kernel | \
 -        fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-static-with-rootfs | append-metadata
++  IMAGES += factory.bin
++  IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
 +  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
    DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware
 -  ARTIFACTS := preloader.bin bl31-uboot.fip

+ 3 - 4
devices/mediatek_filogic/patches/24-nradio-c8-660.patch

@@ -89,12 +89,11 @@
 
 --- a/package/boot/uboot-envtools/files/mediatek_filogic
 +++ b/package/boot/uboot-envtools/files/mediatek_filogic
-@@ -57,7 +57,9 @@ acer,vero-w6m|\
- glinet,gl-mt2500|\
+@@ -60,7 +60,8 @@ glinet,gl-mt2500|\
  glinet,gl-mt6000|\
  glinet,gl-x3000|\
--glinet,gl-xe3000)
-+glinet,gl-xe3000|\
+ glinet,gl-xe3000|\
+-huasifei,wh3000)
 +huasifei,wh3000|\
 +nradio,c8-668gl)
  	local envdev=$(find_mmc_part "u-boot-env")

+ 12 - 5
devices/mediatek_filogic/patches/25-platform.patch

@@ -1,6 +1,6 @@
 --- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
 +++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
-@@ -64,29 +64,17 @@ platform_do_upgrade() {
+@@ -66,30 +66,18 @@ platform_do_upgrade() {
  	local board=$(board_name)
  
  	case "$board" in
@@ -18,6 +18,7 @@
  	mediatek,mt7981-rfb|\
  	mediatek,mt7988a-rfb|\
  	mercusys,mr90x-v1-ubi|\
+ 	netis,nx31|\
 -	nokia,ea0326gmp|\
  	openwrt,one|\
 -	netcore,n60|\
@@ -30,11 +31,17 @@
  	xiaomi,mi-router-ax3000t-ubootmod|\
  	xiaomi,redmi-router-ax6000-ubootmod|\
  	xiaomi,mi-router-wr30u-ubootmod|\
-@@ -150,7 +138,6 @@ platform_do_upgrade() {
+@@ -160,13 +148,6 @@ platform_do_upgrade() {
  			;;
  		esac
  		;;
 -	xiaomi,mi-router-ax3000t|\
- 	xiaomi,mi-router-wr30u|\
- 	xiaomi,redmi-router-ax6000)
- 		CI_KERN_UBIPART=ubi_kernel
+-	xiaomi,mi-router-wr30u|\
+-	xiaomi,redmi-router-ax6000)
+-		CI_KERN_UBIPART=ubi_kernel
+-		CI_ROOT_UBIPART=ubi
+-		nand_do_upgrade "$1"
+-		;;
+ 	*)
+ 		nand_do_upgrade "$1"
+ 		;;

+ 0 - 71
devices/mediatek_filogic/patches/35-wh3000.patch

@@ -1,71 +0,0 @@
---- a/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
-+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/01_leds
-@@ -49,6 +49,9 @@ glinet,gl-xe3000)
- 	ucidef_set_led_netdev "wlan2g" "WLAN2G" "green:wifi2g" "phy0-ap0"
- 	ucidef_set_led_netdev "wlan5g" "WLAN5G" "green:wifi5g" "phy1-ap0"
- 	;;
-+huasifei,wh3000)
-+	ucidef_set_led_netdev "wan" "WAN" "red:wan" "eth1"
-+	;;
- ikuai,q3000)
- 	ucidef_set_led_default "green" "GREEN" "q3000:green" "1"
- 	ucidef_set_led_default "blue" "BLUE" "q3000:blue" "0"
-
---- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
-+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
-@@ -70,7 +70,8 @@ mediatek_setup_interfaces()
- 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "sfp1 wan"
- 		;;
- 	bananapi,bpi-r3-mini|\
--	edgecore,eap111)
-+	edgecore,eap111|\
-+	huasifei,wh3000)
- 		ucidef_set_interfaces_lan_wan eth0 eth1
- 		;;
- 	bananapi,bpi-r4)
-
---- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
-+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
-@@ -105,6 +105,7 @@ platform_do_upgrade() {
- 	glinet,gl-mt6000|\
- 	glinet,gl-x3000|\
- 	glinet,gl-xe3000|\
-+	huasifei,wh3000|\
- 	smartrg,sdg-8612|\
- 	smartrg,sdg-8614|\
- 	smartrg,sdg-8622|\
-@@ -229,6 +230,7 @@ platform_copy_config() {
- 	glinet,gl-mt6000|\
- 	glinet,gl-x3000|\
- 	glinet,gl-xe3000|\
-+	huasifei,wh3000|\
- 	jdcloud,re-cp-03|\
- 	nradio,c8-668gl|\
- 	smartrg,sdg-8612|\
-
---- a/target/linux/mediatek/image/filogic.mk
-+++ b/target/linux/mediatek/image/filogic.mk
-@@ -954,6 +954,23 @@ define Device/h3c_magic-nx30-pro-nmbm
- endef
- TARGET_DEVICES += h3c_magic-nx30-pro-nmbm
- 
-+define Device/huasifei_wh3000
-+  DEVICE_VENDOR := Huasifei
-+  DEVICE_MODEL := WH3000
-+  DEVICE_ALT0_VENDOR := Fudy
-+  DEVICE_ALT0_MODEL := MT3000
-+  SUPPORTED_DEVICES += huasifei,wh3000-emmc
-+  DEVICE_DTS := mt7981b-huasifei-wh3000
-+  DEVICE_DTS_DIR := ../dts
-+  DEVICE_PACKAGES := kmod-mt7915e kmod-mt7981-firmware mt7981-wo-firmware \
-+	kmod-usb3 f2fsck mkf2fs
-+  KERNEL := kernel-bin | lzma | fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb
-+  KERNEL_INITRAMFS := kernel-bin | lzma | \
-+	fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
-+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
-+endef
-+TARGET_DEVICES += huasifei_wh3000
-+
- define Device/imou_lc-hx3001
-   DEVICE_VENDOR := Imou
-   DEVICE_MODEL := LC-HX3001

+ 3 - 4
devices/qualcommax_ipq60xx/diy.sh

@@ -4,9 +4,6 @@ shopt -s extglob
 
 SHELL_FOLDER=$(dirname $(readlink -f "$0"))
 
-
-rm -rf devices/common/patches/{wifi-scripts.patch,curl.patch}
-
 wget -N https://raw.githubusercontent.com/openwrt/openwrt/refs/heads/openwrt-24.10/target/imagebuilder/files/Makefile -P target/imagebuilder/files/
 wget -N https://raw.githubusercontent.com/openwrt/openwrt/refs/heads/openwrt-24.10/package/base-files/files/sbin/sysupgrade -P package/base-files/files/sbin/
 wget -N https://github.com/openwrt/openwrt/raw/refs/heads/openwrt-24.10/package/network/config/firewall/Makefile -P package/network/config/firewall/
@@ -23,4 +20,6 @@ rm -rf package/libs/libnftnl/patches/001-libnftnl-add-fullcone-expression-suppor
 
 sed -i 's/DEFAULT_PACKAGES +=/DEFAULT_PACKAGES += kmod-qca-mcs kmod-qca-nss-drv-igs kmod-qca-nss-drv-l2tpv2 kmod-qca-nss-drv-lag-mgr kmod-qca-nss-drv-map-t kmod-qca-nss-drv-pppoe kmod-qca-nss-drv-pptp kmod-qca-nss-drv-qdisc kmod-qca-nss-macsec/' target/linux/qualcommax/Makefile
 
-sed -i "s/LiBwrt/Kwrt/Ig" package/base-files/files/bin/config_generate package/base-files/image-config.in package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc config/Config-images.in Config.in include/u-boot.mk include/version.mk || true
+sed -i "s/LiBwrt/Kwrt/Ig" package/base-files/files/bin/config_generate package/base-files/image-config.in package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc config/Config-images.in Config.in include/u-boot.mk include/version.mk || true
+
+sed -i -e "s/set \${s}.country='\${country || ''}'/set \${s}.country='\${country || \"CN\"}'/g" -e "s/set \${s}.disabled=.*/set \${s}.disabled='0'/" package/network/config/wifi-scripts/files/lib/wifi/mac80211.uc