summaryrefslogtreecommitdiff
path: root/target/linux/lantiq/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/lantiq/base-files')
-rwxr-xr-xtarget/linux/lantiq/base-files/etc/board.d/01_leds18
-rw-r--r--target/linux/lantiq/base-files/etc/diag.sh52
2 files changed, 16 insertions, 54 deletions
diff --git a/target/linux/lantiq/base-files/etc/board.d/01_leds b/target/linux/lantiq/base-files/etc/board.d/01_leds
index a95c72c..ac9e14e 100755
--- a/target/linux/lantiq/base-files/etc/board.d/01_leds
+++ b/target/linux/lantiq/base-files/etc/board.d/01_leds
@@ -27,39 +27,21 @@ board_config_update
board=$(lantiq_board_name)
case "$board" in
-BTHOMEHUBV2B)
- ucidef_set_led_default "power" "power" "soc:blue:power" "1"
- ;;
-BTHOMEHUBV3A)
- ucidef_set_led_default "power" "power" "soc:blue:power" "1"
- ;;
BTHOMEHUBV5A)
- ucidef_set_led_default "power" "power" "soc:blue:power" "1"
ucidef_set_led_default "dimmed" "dimmed" "dimmed" "0"
;;
VGV7510KW22)
- ucidef_set_led_default "power" "power" "power" "1"
- ucidef_set_led_default "power2" "power2" "power2" "0"
ucidef_set_led_wlan "wifi" "wifi" "wifi" "phy0radio"
;;
VGV7519)
- ucidef_set_led_default "power" "power" "power" "0"
- ucidef_set_led_default "power2" "power2" "power2" "1"
ucidef_set_led_wlan "wifi" "wifi" "wireless_yellow" "phy0radio"
;;
P2812HNUF*)
- ucidef_set_led_default "power" "power" "power" "0"
- ucidef_set_led_default "power2" "power2" "power2" "1"
ucidef_set_led_wlan "wifi" "wifi" "wireless_green" "phy0radio"
;;
ARV7519RW22)
- ucidef_set_led_default "power" "power" "power" "1"
ucidef_set_led_netdev "lan" "lan" "lan" "eth0.1"
;;
-ARV8539PW22)
- ucidef_set_led_default "power" "power" "soc:green:power" "1"
- ucidef_set_led_default "power2" "power2" "soc:red:power" "0"
- ;;
*)
;;
esac
diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh
index 0e65e61..8356bcd 100644
--- a/target/linux/lantiq/base-files/etc/diag.sh
+++ b/target/linux/lantiq/base-files/etc/diag.sh
@@ -1,54 +1,34 @@
#!/bin/sh
-# Copyright (C) 2012-2013 OpenWrt.org
+# Copyright (C) 2010-2015 OpenWrt.org
. /lib/functions/leds.sh
. /lib/functions/lantiq.sh
-power="$(lantiq_get_dt_led_chosen power)"
-power1="$(lantiq_get_dt_led_chosen power1)"
-power2="$(lantiq_get_dt_led_chosen power2)"
-
-status_led="$power"
+boot="$(lantiq_get_dt_led_chosen boot)"
+failsafe="$(lantiq_get_dt_led_chosen failsafe)"
+running="$(lantiq_get_dt_led_chosen running)"
set_state() {
+ status_led="$boot"
+
case "$1" in
preinit)
- if [ -n "$power2" ]; then
- status_led_on
- status_led="$power2"
- status_led_blink_preinit
- status_led="$power"
- else
- status_led_blink_preinit
- fi
+ status_led_blink_preinit
;;
failsafe)
- if [ -n "$power2" ]; then
- led_off "$power2"
- status_led_blink_failsafe
- elif [ -n "$power1" ]; then
- status_led_off
- status_led="$power1"
- status_led_blink_failsafe
- status_led="$power"
- else
- status_led_blink_failsafe
- fi
+ status_led_off
+ status_led="$failsafe"
+ status_led_blink_failsafe
;;
preinit_regular)
- if [ -n "$power2" ]; then
- status_led_on
- status_led="$power2"
- status_led_blink_preinit_regular
- status_led="$power"
- else
- status_led_blink_preinit_regular
- fi
+ status_led_blink_preinit_regular
;;
done)
- status_led_on
- led_off "$power1"
- led_off "$power2"
+ status_led_off
+ [ -n "$running" ] & {
+ status_led="$running"
+ status_led_on
+ }
;;
esac
}