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>
(backported from
c9e9a787343fb9190b5491188025bcfdebc94beb)
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"
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" ] && {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
+ led-upgrade = &power;
led-dsl = &dsl;
led-internet = &online_green;
led-boot = &power;
led-failsafe = &power2;
led-running = &power;
+ led-upgrade = &power;
led-dsl = &adsl;
led-internet = &internet;
led-boot = &power;
led-failsafe = &power;
led-running = &power;
+ led-upgrade = &power;
led-dsl = &dsl;
led-internet = &online;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &internet_green;
led-boot = &power_blue;
led-failsafe = &power_red;
led-running = &power_blue;
+ led-upgrade = &power_blue;
led-dsl = &dsl;
led-internet = &internet_blue;
led-boot = &power_blue;
led-failsafe = &power_red;
led-running = &power_blue;
+ led-upgrade = &power_blue;
led-dsl = &dsl_blue;
led-usb = &led_usb;
led-boot = &power;
led-failsafe = &power_red;
led-running = &power;
+ led-upgrade = &power;
led-dsl = &dsl;
led-internet = &internet;
led-boot = &power;
led-failsafe = &power;
led-running = &power;
+ led-upgrade = &power;
led-dsl = &internet;
led-usb = &umts;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &online_green;
led-boot = &power;
led-failsafe = &power2;
led-running = &power;
+ led-upgrade = &power;
led-dsl = &dsl;
led-internet = &online;
led-boot = &power_green;
led-failsafe = &power_green;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &internet_green;
};
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &power_green;
led-internet = &online;
led-boot = &power_red;
led-failsafe = &power_blue;
led-running = &power_red;
+ led-upgrade = &power_red;
led-dsl = &internet_red;
led-usb = &umts;
led-boot = &power_red;
led-failsafe = &power_blue;
led-running = &power_red;
+ led-upgrade = &power_red;
led-dsl = &internet_red;
led-usb = &umts;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl_green;
led-internet = &online_green;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
};
led-boot = &power_orange;
led-failsafe = &power_red;
led-running = &power_blue;
+ led-upgrade = &power_blue;
led-dsl = &broadband_blue;
led-wifi = &wireless_blue;
led-boot = &power_orange;
led-failsafe = &power_red;
led-running = &power_blue;
+ led-upgrade = &power_blue;
led-dsl = &broadband_blue;
led-wifi = &wireless_blue;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_blue;
+ led-upgrade = &power_blue;
led-dsl = &broadband_blue;
led-wifi = &wireless_blue;
led-boot = &power;
led-failsafe = &power;
led-running = &power;
+ led-upgrade = &power;
led-dsl = &dsl;
led-internet = &online_green;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &internet;
led-boot = &power_green;
led-failsafe = &power_amber;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl_green;
};
led-boot = &power;
led-failsafe = &power;
led-running = &power;
+ led-upgrade = &power;
led-usb = &led_usb1;
led-usb2 = &led_usb2;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &info_green;
led-boot = &power;
led-failsafe = &power;
led-running = &power;
+ led-upgrade = &power;
led-internet = &info_green;
led-dsl = &power;
led-boot = &power;
led-failsafe = &power;
led-running = &power;
+ led-upgrade = &power;
led-internet = &info_green;
led-dsl = &power;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &info_green;
led-wifi = &wifi;
led-boot = &power_green;
led-failsafe = &power_green;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &online;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &online;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl_green;
led-internet = &internet_green;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
};
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &internet_green;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &broadband_green;
led-internet = &internet_green;
led-boot = &power_green;
led-failsafe = &power_red;
led-running = &power_green;
+ led-upgrade = &power_green;
led-dsl = &dsl;
led-internet = &online_green;
led-boot = &power_g;
led-failsafe = &diag_r;
led-running = &power_g;
+ led-upgrade = &power_g;
led-dsl = &dsl;
led-internet = &router_g;