ath79: move D-Link DIR-859 and DIR-869 series to tiny sub-target

These devices only have 64 MiB RAM and ath10k wireless driver will
consume a lot of memory. Let's move them to the tiny sub-target to
get extra 7 MiB of free space. In this way, we can extend their
lifetime to receive support for the next OpenWrt LTS version. This
patch also trims the USB package for the non-existent USB port.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
This commit is contained in:
Shiji Yang 2024-03-19 21:25:52 +08:00 committed by Hauke Mehrtens
parent 9a6c1846bb
commit 8201e402c5
8 changed files with 72 additions and 56 deletions

View File

@ -249,12 +249,6 @@ dlink,dap-1720-a1)
ucidef_set_led_rssi "rssimediumhigh" "RSSI MEDIUM-HIGH" "green:signal-2" "wlan0" "61" "100"
ucidef_set_led_rssi "rssihigh" "RSSI HIGH" "green:signal-3" "wlan0" "81" "100"
;;
dlink,dir-859-a1)
ucidef_set_led_switch "internet" "WAN" "green:internet" "switch0" "0x20"
;;
dlink,dir-859-a3)
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20"
;;
engenius,ens202ext-v1|\
engenius,enstationac-v1)
ucidef_set_rssimon "wlan0" "200000" "1"

View File

@ -318,9 +318,6 @@ ath79_setup_interfaces()
dlink,dir-842-c1|\
dlink,dir-842-c2|\
dlink,dir-842-c3|\
dlink,dir-859-a1|\
dlink,dir-859-a3|\
dlink,dir-869-a1|\
engenius,epg5000|\
engenius,esr1200|\
engenius,esr1750|\
@ -699,15 +696,6 @@ ath79_setup_macs()
wan_mac=$(mtd_get_mac_ascii devdata "wanmac")
label_mac=$lan_mac
;;
dlink,dir-859-a1|\
dlink,dir-869-a1)
lan_mac=$(mtd_get_mac_text "devdata" 0xc9)
wan_mac=$(mtd_get_mac_text "devdata" 0x79)
;;
dlink,dir-859-a3)
lan_mac=$(get_mac_label)
wan_mac=$(macaddr_add "$lan_mac" 3)
;;
qihoo,c301|\
wd,mynet-n600|\
wd,mynet-n750)

View File

@ -23,9 +23,6 @@ dlink,dap-3662-a1)
;;
dlink,dap-1720-a1|\
dlink,dir-629-a1|\
dlink,dir-859-a1|\
dlink,dir-859-a3|\
dlink,dir-869-a1|\
qihoo,c301)
fix_seama_header
;;

View File

@ -1278,41 +1278,6 @@ define Device/dlink_dir-842-c3
endef
TARGET_DEVICES += dlink_dir-842-c3
define Device/dlink_dir-859-ax
$(Device/seama)
SOC := qca9563
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-859
IMAGE_SIZE := 15872k
DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859
endef
define Device/dlink_dir-859-a1
$(Device/dlink_dir-859-ax)
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += dlink_dir-859-a1
define Device/dlink_dir-859-a3
$(Device/dlink_dir-859-ax)
DEVICE_VARIANT := A3
endef
TARGET_DEVICES += dlink_dir-859-a3
define Device/dlink_dir-869-a1
$(Device/seama)
SOC := qca9563
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-869
DEVICE_VARIANT := A1
IMAGE_SIZE := 15872k
DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct-smallbuffers ath10k-firmware-qca988x-ct
SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
SUPPORTED_DEVICES += dir-869-a1
endef
TARGET_DEVICES += dlink_dir-869-a1
define Device/elecom_wab
DEVICE_VENDOR := ELECOM
IMAGE_SIZE := 14336k

View File

@ -30,6 +30,41 @@ define Device/dlink_dir-615-e4
endef
TARGET_DEVICES += dlink_dir-615-e4
define Device/dlink_dir-859-a
$(Device/seama)
SOC := qca9563
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-859
IMAGE_SIZE := 15872k
SEAMA_SIGNATURE := wrgac37_dlink.2013gui_dir859
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct-smallbuffers
endef
define Device/dlink_dir-859-a1
$(Device/dlink_dir-859-a)
DEVICE_VARIANT := A1
endef
TARGET_DEVICES += dlink_dir-859-a1
define Device/dlink_dir-859-a3
$(Device/dlink_dir-859-a)
DEVICE_VARIANT := A3
endef
TARGET_DEVICES += dlink_dir-859-a3
define Device/dlink_dir-869-a1
$(Device/seama)
SOC := qca9563
DEVICE_VENDOR := D-Link
DEVICE_MODEL := DIR-869
DEVICE_VARIANT := A1
IMAGE_SIZE := 15872k
SEAMA_SIGNATURE := wrgac54_dlink.2015_dir869
DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct-smallbuffers
SUPPORTED_DEVICES += dir-869-a1
endef
TARGET_DEVICES += dlink_dir-869-a1
define Device/engenius_eap350-v1
$(Device/senao_loader_okli)
BLOCKSIZE := 4k

View File

@ -20,6 +20,12 @@ tplink,tl-wr941-v4)
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08"
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10"
;;
dlink,dir-859-a1)
ucidef_set_led_switch "internet" "INTERNET" "green:internet" "switch0" "0x20"
;;
dlink,dir-859-a3)
ucidef_set_led_switch "wan" "WAN" "green:wan" "switch0" "0x20"
;;
engenius,enh202-v1)
ucidef_set_led_switch "lan" "LAN" "amber:lan" "switch0" "0x10"
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"

View File

@ -27,6 +27,12 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan"
;;
dlink,dir-859-a1|\
dlink,dir-859-a3|\
dlink,dir-869-a1)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan"
;;
engenius,eap350-v1|\
engenius,ecb350-v1|\
pqi,air-pen|\
@ -126,6 +132,15 @@ ath79_setup_macs()
wan_mac=$(mtd_get_mac_ascii "nvram" "wan_mac")
label_mac=$wan_mac
;;
dlink,dir-859-a1|\
dlink,dir-869-a1)
lan_mac=$(mtd_get_mac_text "devdata" 0xc9)
wan_mac=$(mtd_get_mac_text "devdata" 0x79)
;;
dlink,dir-859-a3)
lan_mac=$(get_mac_label)
wan_mac=$(macaddr_add "$lan_mac" 3)
;;
engenius,enh202-v1|\
ubnt,airrouter|\
ubnt,bullet-m-ar7240|\

View File

@ -0,0 +1,16 @@
. /lib/functions.sh
fix_seama_header() {
local kernel_size=$(sed -n 's/mtd[0-9]*: \([0-9a-f]*\).*"kernel".*/\1/p' /proc/mtd)
[ "$kernel_size" ] && mtd -c 0x$kernel_size fixseama firmware
}
board=$(board_name)
case "$board" in
dlink,dir-859-a1|\
dlink,dir-859-a3|\
dlink,dir-869-a1)
fix_seama_header
;;
esac