mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 14:37:57 +00:00
lantiq: add support for upgrade led
Indicate a (sys)upgrade via leds as well. It brings the lantiq diag.sh script en par with the other implementations using devicetree aliases to define multiple leds for boot status indication. By default, use the boot finished led to indicate an upgrade for now. Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
parent
be06c726c4
commit
c9e9a78734
@ -6,6 +6,7 @@
|
|||||||
boot="$(get_dt_led boot)"
|
boot="$(get_dt_led boot)"
|
||||||
failsafe="$(get_dt_led failsafe)"
|
failsafe="$(get_dt_led failsafe)"
|
||||||
running="$(get_dt_led running)"
|
running="$(get_dt_led running)"
|
||||||
|
upgrade="$(get_dt_led upgrade)"
|
||||||
|
|
||||||
set_state() {
|
set_state() {
|
||||||
status_led="$boot"
|
status_led="$boot"
|
||||||
@ -26,6 +27,14 @@ set_state() {
|
|||||||
preinit_regular)
|
preinit_regular)
|
||||||
status_led_blink_preinit_regular
|
status_led_blink_preinit_regular
|
||||||
;;
|
;;
|
||||||
|
upgrade)
|
||||||
|
[ -n "$running" ] && {
|
||||||
|
status_led="$running"
|
||||||
|
status_led_off
|
||||||
|
}
|
||||||
|
status_led="$upgrade"
|
||||||
|
status_led_blink_preinit_regular
|
||||||
|
;;
|
||||||
done)
|
done)
|
||||||
status_led_off
|
status_led_off
|
||||||
[ -n "$running" ] && {
|
[ -n "$running" ] && {
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &power;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &online_green;
|
led-internet = &online_green;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power2;
|
led-failsafe = &power2;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-dsl = &adsl;
|
led-dsl = &adsl;
|
||||||
led-internet = &internet;
|
led-internet = &internet;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &power;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &online;
|
led-internet = &online;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &internet_green;
|
led-internet = &internet_green;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_blue;
|
led-boot = &power_blue;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_blue;
|
led-running = &power_blue;
|
||||||
|
led-upgrade = &power_blue;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &internet_blue;
|
led-internet = &internet_blue;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_blue;
|
led-boot = &power_blue;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_blue;
|
led-running = &power_blue;
|
||||||
|
led-upgrade = &power_blue;
|
||||||
|
|
||||||
led-dsl = &dsl_blue;
|
led-dsl = &dsl_blue;
|
||||||
led-usb = &led_usb;
|
led-usb = &led_usb;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &internet;
|
led-internet = &internet;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &power;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-dsl = &internet;
|
led-dsl = &internet;
|
||||||
led-usb = &umts;
|
led-usb = &umts;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &online_green;
|
led-internet = &online_green;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power2;
|
led-failsafe = &power2;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &online;
|
led-internet = &online;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_green;
|
led-failsafe = &power_green;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &internet_green;
|
led-dsl = &internet_green;
|
||||||
};
|
};
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &power_green;
|
led-dsl = &power_green;
|
||||||
led-internet = &online;
|
led-internet = &online;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_red;
|
led-boot = &power_red;
|
||||||
led-failsafe = &power_blue;
|
led-failsafe = &power_blue;
|
||||||
led-running = &power_red;
|
led-running = &power_red;
|
||||||
|
led-upgrade = &power_red;
|
||||||
|
|
||||||
led-dsl = &internet_red;
|
led-dsl = &internet_red;
|
||||||
led-usb = &umts;
|
led-usb = &umts;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_red;
|
led-boot = &power_red;
|
||||||
led-failsafe = &power_blue;
|
led-failsafe = &power_blue;
|
||||||
led-running = &power_red;
|
led-running = &power_red;
|
||||||
|
led-upgrade = &power_red;
|
||||||
|
|
||||||
led-dsl = &internet_red;
|
led-dsl = &internet_red;
|
||||||
led-usb = &umts;
|
led-usb = &umts;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl_green;
|
led-dsl = &dsl_green;
|
||||||
led-internet = &online_green;
|
led-internet = &online_green;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
};
|
};
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_orange;
|
led-boot = &power_orange;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_blue;
|
led-running = &power_blue;
|
||||||
|
led-upgrade = &power_blue;
|
||||||
|
|
||||||
led-dsl = &broadband_blue;
|
led-dsl = &broadband_blue;
|
||||||
led-wifi = &wireless_blue;
|
led-wifi = &wireless_blue;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_orange;
|
led-boot = &power_orange;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_blue;
|
led-running = &power_blue;
|
||||||
|
led-upgrade = &power_blue;
|
||||||
|
|
||||||
led-dsl = &broadband_blue;
|
led-dsl = &broadband_blue;
|
||||||
led-wifi = &wireless_blue;
|
led-wifi = &wireless_blue;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_blue;
|
led-running = &power_blue;
|
||||||
|
led-upgrade = &power_blue;
|
||||||
|
|
||||||
led-dsl = &broadband_blue;
|
led-dsl = &broadband_blue;
|
||||||
led-wifi = &wireless_blue;
|
led-wifi = &wireless_blue;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &power;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &online_green;
|
led-internet = &online_green;
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &internet;
|
led-internet = &internet;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_amber;
|
led-failsafe = &power_amber;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl_green;
|
led-dsl = &dsl_green;
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &power;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-usb = &led_usb1;
|
led-usb = &led_usb1;
|
||||||
led-usb2 = &led_usb2;
|
led-usb2 = &led_usb2;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &info_green;
|
led-internet = &info_green;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &power;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-internet = &info_green;
|
led-internet = &info_green;
|
||||||
led-dsl = &power;
|
led-dsl = &power;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power;
|
led-boot = &power;
|
||||||
led-failsafe = &power;
|
led-failsafe = &power;
|
||||||
led-running = &power;
|
led-running = &power;
|
||||||
|
led-upgrade = &power;
|
||||||
|
|
||||||
led-internet = &info_green;
|
led-internet = &info_green;
|
||||||
led-dsl = &power;
|
led-dsl = &power;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &info_green;
|
led-dsl = &info_green;
|
||||||
led-wifi = &wifi;
|
led-wifi = &wifi;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_green;
|
led-failsafe = &power_green;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &online;
|
led-internet = &online;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &online;
|
led-internet = &online;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl_green;
|
led-dsl = &dsl_green;
|
||||||
led-internet = &internet_green;
|
led-internet = &internet_green;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
};
|
};
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &internet_green;
|
led-internet = &internet_green;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &broadband_green;
|
led-dsl = &broadband_green;
|
||||||
led-internet = &internet_green;
|
led-internet = &internet_green;
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
led-boot = &power_green;
|
led-boot = &power_green;
|
||||||
led-failsafe = &power_red;
|
led-failsafe = &power_red;
|
||||||
led-running = &power_green;
|
led-running = &power_green;
|
||||||
|
led-upgrade = &power_green;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &online_green;
|
led-internet = &online_green;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
led-boot = &power_g;
|
led-boot = &power_g;
|
||||||
led-failsafe = &diag_r;
|
led-failsafe = &diag_r;
|
||||||
led-running = &power_g;
|
led-running = &power_g;
|
||||||
|
led-upgrade = &power_g;
|
||||||
|
|
||||||
led-dsl = &dsl;
|
led-dsl = &dsl;
|
||||||
led-internet = &router_g;
|
led-internet = &router_g;
|
||||||
|
Loading…
Reference in New Issue
Block a user