difos/target/linux/ath79/tiny/base-files/etc/board.d/01_leds
Ivan Diaz 65b6f1c1b2 ath79: move TP-Link RE450 v1 & v2 and RE355 v1 to tiny target
This restores sysupgrade support

Since OpenWrt 23.05, the firmware selector no longer provides sysupgrade
images for RE450 V1 & V2 and RE355 v1 due to image size constraints
(~5.7MB limit), making the generic build unusable.

This commit moves RE450 V1 & V2 to the tiny target, enabling:
- Smaller image builds within the flash size limit.
- Restored sysupgrade support via the firmware selector.
- A secure-by-default wireless setup while allowing full management via UCI.
- Officially supported images, reducing the need for custom (potentially insecure) builds.

This ensures users can install a functional OpenWrt build without compromising security defaults.

Signed-off-by: Ivan Diaz <diaz.it@icloud.com>
[Squashed the commits together and just copied the target definition
from the generic subtarget.]
Link: https://github.com/openwrt/openwrt/pull/18126
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2025-03-31 23:59:12 +02:00

149 lines
5.7 KiB
Text

. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
buffalo,whr-g301n|\
dlink,dir-615-e4|\
tplink,tl-wr740n-v1|\
tplink,tl-wr740n-v3|\
tplink,tl-wr741-v1|\
tplink,tl-wr743nd-v1|\
tplink,tl-wr841-v5|\
tplink,tl-wr941-v4)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02"
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04"
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x08"
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x10"
;;
dlink,dap-1720-a1)
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "RSSI LOW" "red:signal-1" "wlan0" "1" "40"
ucidef_set_led_rssi "rssimediumlow" "RSSI MEDIUM-LOW" "green:signal-1" "wlan0" "21" "100"
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" "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"
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:rssilow" "wlan0" "1" "100"
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "amber:rssimedium" "wlan0" "33" "100"
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:rssihigh" "wlan0" "67" "100"
;;
netgear,wnr1000-v2|\
netgear,wnr2000-v3)
ucidef_set_led_netdev "wan-amber" "WAN (amber)" "amber:wan" "eth0"
ucidef_set_led_switch "lan1green" "LAN1 (green)" "green:lan1" "switch0" "0x02" "0x04"
ucidef_set_led_switch "lan2green" "LAN2 (green)" "green:lan2" "switch0" "0x04" "0x04"
ucidef_set_led_switch "lan3green" "LAN3 (green)" "green:lan3" "switch0" "0x08" "0x04"
ucidef_set_led_switch "lan4green" "LAN4 (green)" "green:lan4" "switch0" "0x10" "0x04"
ucidef_set_led_switch "lan1amber" "LAN1 (amber)" "amber:lan1" "switch0" "0x02" "0x02"
ucidef_set_led_switch "lan2amber" "LAN2 (amber)" "amber:lan2" "switch0" "0x04" "0x02"
ucidef_set_led_switch "lan3amber" "LAN3 (amber)" "amber:lan3" "switch0" "0x08" "0x02"
ucidef_set_led_switch "lan4amber" "LAN4 (amber)" "amber:lan4" "switch0" "0x10" "0x02"
;;
netgear,wnr612-v2|\
on,n150r)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth0"
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x02" "0x0f"
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x04" "0x0f"
;;
tplink,re355-v1|\
tplink,re450-v1|\
tplink,re450-v2)
ucidef_set_led_netdev "lan_data" "LAN Data" "green:lan_data" "eth0" "tx rx"
ucidef_set_led_netdev "lan_link" "LAN Link" "green:lan_link" "eth0" "link"
;;
tplink,tl-mr3020-v1|\
tplink,tl-mr3040-v2|\
tplink,tl-wa701nd-v1|\
tplink,tl-wa730re-v1|\
tplink,tl-wa801nd-v1|\
tplink,tl-wa801nd-v3|\
tplink,tl-wa801nd-v4|\
tplink,tl-wa830re-v1|\
tplink,tl-wa860re-v1|\
tplink,tl-wa901nd-v1|\
tplink,tl-wa901nd-v3|\
tplink,tl-wa901nd-v4|\
tplink,tl-wa901nd-v5)
ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
;;
tplink,tl-mr3420-v2|\
tplink,tl-wr740n-v4|\
tplink,tl-wr740n-v5|\
tplink,tl-wr741nd-v4|\
tplink,tl-wr841-v8|\
tplink,tl-wr941nd-v5)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x04"
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08"
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x10"
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
;;
tplink,tl-mr3420-v3|\
tplink,tl-wr841-v9|\
tplink,tl-wr841-v10|\
tplink,tl-wr841-v11|\
tplink,tl-wr841-v12)
ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "green:lan1" "switch0" "0x10"
ucidef_set_led_switch "lan2" "LAN2" "green:lan2" "switch0" "0x08"
ucidef_set_led_switch "lan3" "LAN3" "green:lan3" "switch0" "0x04"
ucidef_set_led_switch "lan4" "LAN4" "green:lan4" "switch0" "0x02"
;;
tplink,tl-wa850re-v1|\
tplink,tl-wa850re-v2)
ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "RSSILOW" "blue:signal1" "wlan0" "1" "100"
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "blue:signal2" "wlan0" "20" "100"
ucidef_set_led_rssi "rssimedium" "RSSIMEDIUM" "blue:signal3" "wlan0" "40" "100"
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "blue:signal4" "wlan0" "60" "100"
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "blue:signal5" "wlan0" "80" "100"
;;
tplink,tl-wpa8630p-v2-int|\
tplink,tl-wpa8630p-v2.0-eu|\
tplink,tl-wpa8630p-v2.1-eu)
ucidef_set_led_switch "lan" "LAN" "green:lan" "switch0" "0x3c"
;;
tplink,tl-wr940n-v3|\
tplink,tl-wr940n-v4|\
tplink,tl-wr941nd-v6)
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
ucidef_set_led_switch "lan1" "LAN1" "blue:lan1" "switch0" "0x10"
ucidef_set_led_switch "lan2" "LAN2" "blue:lan2" "switch0" "0x08"
ucidef_set_led_switch "lan3" "LAN3" "blue:lan3" "switch0" "0x04"
ucidef_set_led_switch "lan4" "LAN4" "blue:lan4" "switch0" "0x02"
;;
tplink,tl-wr940n-v6)
ucidef_set_led_netdev "wan" "WAN" "blue:wan" "eth1"
;;
ubnt,bullet-m-ar7240|\
ubnt,bullet-m-ar7241|\
ubnt,nanobridge-m|\
ubnt,nanostation-loco-m|\
ubnt,nanostation-m|\
ubnt,picostation-m)
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "RSSILOW" "red:link1" "wlan0" "1" "100"
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "orange:link2" "wlan0" "26" "100"
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "green:link3" "wlan0" "51" "100"
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "green:link4" "wlan0" "76" "100"
;;
esac
board_config_flush
exit 0