aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm63xx/base-files/etc
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/bcm63xx/base-files/etc')
-rwxr-xr-xtarget/linux/bcm63xx/base-files/etc/board.d/01_leds109
-rw-r--r--target/linux/bcm63xx/base-files/etc/uci-defaults/04_led_migration21
2 files changed, 69 insertions, 61 deletions
diff --git a/target/linux/bcm63xx/base-files/etc/board.d/01_leds b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
index cdaf0e77c9..b84009313f 100755
--- a/target/linux/bcm63xx/base-files/etc/board.d/01_leds
+++ b/target/linux/bcm63xx/base-files/etc/board.d/01_leds
@@ -8,104 +8,91 @@
board_config_update
board=$(board_name)
-model="${board##*,}"
case "$board" in
actiontec,r1000h)
- ucidef_set_led_usbport "usb" "USB" "R1000H:green:usb" "usb1-port1" "usb2-port1"
+ ucidef_set_led_usbport "usb" "USB" "green:usb" "usb1-port1" "usb2-port1"
;;
-adb,a4001n)
- ucidef_set_led_usbdev "usb" "USB" "A4001N:green:usb" "1-1"
+adb,a4001n|\
+comtrend,ar-5315u|\
+comtrend,vr-3032u|\
+huawei,hg253s-v2|\
+nucom,r5010un-v2|\
+sagem,fast-2704-v2)
+ ucidef_set_led_usbdev "usb" "USB" "green:usb" "1-1"
;;
adb,a4001n1)
- ucidef_set_led_netdev "lan" "LAN" "A4001N1:green:eth" "eth0"
- ucidef_set_led_usbdev "usb" "USB" "A4001N1:green:3g" "1-1"
+ ucidef_set_led_netdev "lan" "LAN" "green:eth" "eth0"
+ ucidef_set_led_usbdev "usb" "USB" "green:3g" "1-1"
;;
adb,pdg-a4001n-a-000-1a1-ax)
- ucidef_set_led_netdev "lan" "LAN" "$model:green:internet" "eth0.1"
- ucidef_set_led_netdev "wan" "WAN" "$model:green:adsl" "eth0.2"
- ucidef_set_led_netdev "wlan0" "WIFI" "$model:green:wifi" "wlan0"
- ucidef_set_led_usbdev "usb" "USB" "$model:green:service" "1-1"
+ ucidef_set_led_netdev "lan" "LAN" "green:internet" "eth0.1"
+ ucidef_set_led_netdev "wan" "WAN" "green:adsl" "eth0.2"
+ ucidef_set_led_netdev "wlan0" "WIFI" "green:wifi" "wlan0"
+ ucidef_set_led_usbdev "usb" "USB" "green:service" "1-1"
;;
adb,av4202n)
- ucidef_set_led_netdev "wlan0" "WLAN" "AV4202N:blue:wifi" "wlan0"
+ ucidef_set_led_netdev "wlan0" "WLAN" "blue:wifi" "wlan0"
;;
bt,home-hub-2-a)
- ucidef_set_led_netdev "lan" "LAN" "HOMEHUB2A:blue:broadband" "eth0.1"
- ucidef_set_led_netdev "wlan0" "WIFI" "HOMEHUB2A:green:wireless" "wlan0"
- ucidef_set_led_usbdev "usb1" "USB1" "HOMEHUB2A:blue:phone" "1-1"
- ucidef_set_led_usbdev "usb2" "USB2" "HOMEHUB2A:green:phone" "2-1"
- ;;
-comtrend,ar-5315u)
- ucidef_set_led_usbdev "usb" "USB" "AR-5315u:green:usb" "1-1"
- ;;
-comtrend,vr-3032u|\
-huawei,hg253s-v2)
- ucidef_set_led_usbdev "usb" "USB" "$model:green:usb" "1-1"
+ ucidef_set_led_netdev "lan" "LAN" "blue:broadband" "eth0.1"
+ ucidef_set_led_netdev "wlan0" "WIFI" "green:wireless" "wlan0"
+ ucidef_set_led_usbdev "usb1" "USB1" "blue:phone" "1-1"
+ ucidef_set_led_usbdev "usb2" "USB2" "green:phone" "2-1"
;;
huawei,echolife-hg553)
- ucidef_set_led_netdev "lan" "LAN" "HW553:blue:lan" "eth0"
- ucidef_set_led_usbdev "usb1" "USB1" "HW553:red:hspa" "1-1"
- ucidef_set_led_usbdev "usb2" "USB2" "HW553:blue:hspa" "1-2"
+ ucidef_set_led_netdev "lan" "LAN" "blue:lan" "eth0"
+ ucidef_set_led_usbdev "usb1" "USB1" "red:hspa" "1-1"
+ ucidef_set_led_usbdev "usb2" "USB2" "blue:hspa" "1-2"
;;
huawei,echolife-hg556a-a|\
huawei,echolife-hg556a-b|\
huawei,echolife-hg556a-c)
- ucidef_set_led_netdev "lan" "LAN" "HW556:red:dsl" "eth0"
- ucidef_set_led_usbdev "usb" "USB" "HW556:red:hspa" "1-2"
- ;;
-huawei,echolife-hg622)
- ucidef_set_led_usbdev "usb" "USB" "HG622:green:usb" "1-2"
+ ucidef_set_led_netdev "lan" "LAN" "red:dsl" "eth0"
+ ucidef_set_led_usbdev "usb" "USB" "red:hspa" "1-2"
;;
+huawei,echolife-hg622|\
huawei,echolife-hg655b)
- ucidef_set_led_usbdev "usb" "USB" "HW65x:green:usb" "1-2"
+ ucidef_set_led_usbdev "usb" "USB" "green:usb" "1-2"
;;
inventel,livebox-1)
- ucidef_set_led_netdev "lan" "LAN" "Livebox1:red:traffic" "eth0"
- ucidef_set_led_netdev "wan" "WAN" "Livebox1:red:adsl" "eth1"
- ucidef_set_led_netdev "wlan0" "WIFI" "Livebox1:red:wifi" "wlan0"
+ ucidef_set_led_netdev "lan" "LAN" "red:traffic" "eth0"
+ ucidef_set_led_netdev "wan" "WAN" "red:adsl" "eth1"
+ ucidef_set_led_netdev "wlan0" "WIFI" "red:wifi" "wlan0"
;;
netgear,dgnd3700-v1)
- ucidef_set_led_netdev "lan" "LAN" "DGND3700v1_3800B:green:lan" "eth0.1"
- ucidef_set_led_netdev "wan" "WAN" "DGND3700v1_3800B:green:inet" "eth0.2"
- ucidef_set_led_netdev "wlan0" "WIFI2G" "DGND3700v1_3800B:green:wifi2g" "wlan0"
- ucidef_set_led_netdev "wlan1" "WIFI5G" "DGND3700v1_3800B:blue:wifi5g" "wlan1"
- ucidef_set_led_usbdev "usb1" "USB1" "DGND3700v1_3800B:green:usb-back" "1-1"
- ucidef_set_led_usbdev "usb2" "USB2" "DGND3700v1_3800B:green:usb-front" "1-2"
+ ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0.1"
+ ucidef_set_led_netdev "wan" "WAN" "green:inet" "eth0.2"
+ ucidef_set_led_netdev "wlan0" "WIFI2G" "green:wifi2g" "wlan0"
+ ucidef_set_led_netdev "wlan1" "WIFI5G" "blue:wifi5g" "wlan1"
+ ucidef_set_led_usbdev "usb1" "USB1" "green:usb-back" "1-1"
+ ucidef_set_led_usbdev "usb2" "USB2" "green:usb-front" "1-2"
;;
netgear,dgnd3700-v2)
- ucidef_set_led_netdev "lan" "LAN" "$model:green:ethernet" "eth0"
- ucidef_set_led_usbdev "usb1" "USB1" "$model:green:usb1" "1-1"
- ucidef_set_led_usbdev "usb2" "USB2" "$model:green:usb2" "1-2"
+ ucidef_set_led_netdev "lan" "LAN" "green:ethernet" "eth0"
+ ucidef_set_led_usbdev "usb1" "USB1" "green:usb1" "1-1"
+ ucidef_set_led_usbdev "usb2" "USB2" "green:usb2" "1-2"
;;
netgear,evg2000)
- ucidef_set_led_netdev "lan" "LAN" "EVG2000:green:lan" "eth0"
- ucidef_set_led_netdev "wan" "WAN" "EVG2000:green:wan" "eth1"
- ucidef_set_led_netdev "wlan0" "WIFI" "EVG2000:green:wireless" "wlan0"
- ucidef_set_led_usbdev "usb1" "USB1" "EVG2000:green:voip1" "1-1"
- ucidef_set_led_usbdev "usb2" "USB2" "EVG2000:green:voip2" "1-2"
- ;;
-nucom,r5010un-v2)
- ucidef_set_led_usbdev "usb" "USB" "R5010UNv2:green:usb" "1-1"
+ ucidef_set_led_netdev "lan" "LAN" "green:lan" "eth0"
+ ucidef_set_led_netdev "wan" "WAN" "green:wan" "eth1"
+ ucidef_set_led_netdev "wlan0" "WIFI" "green:wireless" "wlan0"
+ ucidef_set_led_usbdev "usb1" "USB1" "green:voip1" "1-1"
+ ucidef_set_led_usbdev "usb2" "USB2" "green:voip2" "1-2"
;;
sagem,fast-2704n)
- ucidef_set_led_netdev "wan" "WAN" "F@ST2704N:green:inet" "eth0.2"
- ;;
-sagem,fast-2704-v2)
- ucidef_set_led_usbdev "usb" "USB" "F@ST2704V2:green:usb" "1-1"
- ;;
-sercomm,ad1018)
- ucidef_set_led_netdev "wlan0" "WLAN" "$model:green:wifi" "wlan0"
+ ucidef_set_led_netdev "wan" "WAN" "green:inet" "eth0.2"
;;
+sercomm,ad1018|\
sercomm,ad1018-nor)
- ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0"
+ ucidef_set_led_netdev "wlan0" "WLAN" "green:wifi" "wlan0"
;;
sercomm,h500-s-lowi|\
sercomm,h500-s-vfes)
- ucidef_set_led_netdev "wan" "WAN" "h500-s:green:internet" "eth0.2"
+ ucidef_set_led_netdev "wan" "WAN" "green:internet" "eth0.2"
;;
telsey,cpva502plus)
- ucidef_set_led_netdev "lan" "LAN" "CPVA502+:amber:link" "eth0"
+ ucidef_set_led_netdev "lan" "LAN" "amber:link" "eth0"
;;
esac
diff --git a/target/linux/bcm63xx/base-files/etc/uci-defaults/04_led_migration b/target/linux/bcm63xx/base-files/etc/uci-defaults/04_led_migration
new file mode 100644
index 0000000000..33ec4d51f9
--- /dev/null
+++ b/target/linux/bcm63xx/base-files/etc/uci-defaults/04_led_migration
@@ -0,0 +1,21 @@
+. /lib/functions/migrations.sh
+
+board=$(board_name)
+
+case "$board" in
+brcm,bcm96318ref-p300|\
+brcm,bcm963281tan|\
+brcm,bcm96328avng|\
+d-link,dsl-2640b-b|\
+d-link,dva-g3810bn-tl|\
+netgear,dg834g-v4|\
+usrobotics,usr9108)
+ migrate_leds "^.*::="
+ ;;
+esac
+
+remove_devicename_leds
+
+migrations_apply system
+
+exit 0