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>
openwrt-19.07
Mathias Kresin 2018-08-15 20:18:26 +02:00
parent be06c726c4
commit c9e9a78734
36 changed files with 44 additions and 0 deletions

View File

@ -6,6 +6,7 @@
boot="$(get_dt_led boot)"
failsafe="$(get_dt_led failsafe)"
running="$(get_dt_led running)"
upgrade="$(get_dt_led upgrade)"
set_state() {
status_led="$boot"
@ -26,6 +27,14 @@ set_state() {
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)
status_led_off
[ -n "$running" ] && {

View File

@ -13,6 +13,7 @@
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-dsl = &dsl;
led-internet = &online_green;

View File

@ -16,6 +16,7 @@
led-boot = &power;
led-failsafe = &power2;
led-running = &power;
led-upgrade = &power;
led-dsl = &adsl;
led-internet = &internet;

View File

@ -11,6 +11,7 @@
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-dsl = &dsl;
led-internet = &online;

View File

@ -16,6 +16,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &internet_green;

View File

@ -16,6 +16,7 @@
led-boot = &power_blue;
led-failsafe = &power_red;
led-running = &power_blue;
led-upgrade = &power_blue;
led-dsl = &dsl;
led-internet = &internet_blue;

View File

@ -16,6 +16,7 @@
led-boot = &power_blue;
led-failsafe = &power_red;
led-running = &power_blue;
led-upgrade = &power_blue;
led-dsl = &dsl_blue;
led-usb = &led_usb;

View File

@ -16,6 +16,7 @@
led-boot = &power;
led-failsafe = &power_red;
led-running = &power;
led-upgrade = &power;
led-dsl = &dsl;
led-internet = &internet;

View File

@ -16,6 +16,7 @@
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-dsl = &internet;
led-usb = &umts;

View File

@ -16,6 +16,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &online_green;

View File

@ -16,6 +16,7 @@
led-boot = &power;
led-failsafe = &power2;
led-running = &power;
led-upgrade = &power;
led-dsl = &dsl;
led-internet = &online;

View File

@ -17,6 +17,7 @@
led-boot = &power_green;
led-failsafe = &power_green;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &internet_green;
};

View File

@ -16,6 +16,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &power_green;
led-internet = &online;

View File

@ -16,6 +16,7 @@
led-boot = &power_red;
led-failsafe = &power_blue;
led-running = &power_red;
led-upgrade = &power_red;
led-dsl = &internet_red;
led-usb = &umts;

View File

@ -16,6 +16,7 @@
led-boot = &power_red;
led-failsafe = &power_blue;
led-running = &power_red;
led-upgrade = &power_red;
led-dsl = &internet_red;
led-usb = &umts;

View File

@ -16,6 +16,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl_green;
led-internet = &online_green;

View File

@ -17,6 +17,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
};

View File

@ -16,6 +16,7 @@
led-boot = &power_orange;
led-failsafe = &power_red;
led-running = &power_blue;
led-upgrade = &power_blue;
led-dsl = &broadband_blue;
led-wifi = &wireless_blue;

View File

@ -16,6 +16,7 @@
led-boot = &power_orange;
led-failsafe = &power_red;
led-running = &power_blue;
led-upgrade = &power_blue;
led-dsl = &broadband_blue;
led-wifi = &wireless_blue;

View File

@ -17,6 +17,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_blue;
led-upgrade = &power_blue;
led-dsl = &broadband_blue;
led-wifi = &wireless_blue;

View File

@ -16,6 +16,7 @@
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-dsl = &dsl;
led-internet = &online_green;

View File

@ -11,6 +11,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &internet;

View File

@ -17,6 +17,7 @@
led-boot = &power_green;
led-failsafe = &power_amber;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl_green;
};

View File

@ -14,6 +14,7 @@
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-usb = &led_usb1;
led-usb2 = &led_usb2;

View File

@ -15,6 +15,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &info_green;

View File

@ -16,6 +16,7 @@
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-internet = &info_green;
led-dsl = &power;

View File

@ -16,6 +16,7 @@
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
led-internet = &info_green;
led-dsl = &power;

View File

@ -17,6 +17,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &info_green;
led-wifi = &wifi;

View File

@ -16,6 +16,7 @@
led-boot = &power_green;
led-failsafe = &power_green;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &online;

View File

@ -16,6 +16,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &online;

View File

@ -14,6 +14,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl_green;
led-internet = &internet_green;

View File

@ -17,6 +17,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
};

View File

@ -14,6 +14,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &internet_green;

View File

@ -14,6 +14,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &broadband_green;
led-internet = &internet_green;

View File

@ -16,6 +16,7 @@
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &online_green;

View File

@ -17,6 +17,7 @@
led-boot = &power_g;
led-failsafe = &diag_r;
led-running = &power_g;
led-upgrade = &power_g;
led-dsl = &dsl;
led-internet = &router_g;