aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2018-08-15 20:18:26 +0200
committerMathias Kresin <dev@kresin.me>2018-08-16 21:20:57 +0200
commitc9e9a787343fb9190b5491188025bcfdebc94beb (patch)
tree4eb5024b324977c6394de945964c51076fc9086c /target/linux/lantiq/base-files
parentbe06c726c4f7275325dd380ca151963dd7597638 (diff)
downloadupstream-c9e9a787343fb9190b5491188025bcfdebc94beb.tar.gz
upstream-c9e9a787343fb9190b5491188025bcfdebc94beb.tar.bz2
upstream-c9e9a787343fb9190b5491188025bcfdebc94beb.zip
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>
Diffstat (limited to 'target/linux/lantiq/base-files')
-rw-r--r--target/linux/lantiq/base-files/etc/diag.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/target/linux/lantiq/base-files/etc/diag.sh b/target/linux/lantiq/base-files/etc/diag.sh
index 4fb47bd273..06cf7e2714 100644
--- a/target/linux/lantiq/base-files/etc/diag.sh
+++ b/target/linux/lantiq/base-files/etc/diag.sh
@@ -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" ] && {