aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-11-03 13:32:02 +0000
committerJohn Crispin <blogic@openwrt.org>2015-11-03 13:32:02 +0000
commit47b9616ce38edbd6969f226f9b7825d51394b480 (patch)
treecb29e07cb269bc6b1ce9b4b6e6faf0c0b3a2df0c
parent92b95d7747a939af57c2ee30cbce5eb42dea6c47 (diff)
downloadmaster-187ad058-47b9616ce38edbd6969f226f9b7825d51394b480.tar.gz
master-187ad058-47b9616ce38edbd6969f226f9b7825d51394b480.tar.bz2
master-187ad058-47b9616ce38edbd6969f226f9b7825d51394b480.zip
ramips: add feature to blink led on sysupgrade
Signed-off-by: John Crispin <blogic@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@47373 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--target/linux/ramips/base-files/etc/diag.sh7
-rwxr-xr-xtarget/linux/ramips/base-files/lib/upgrade/platform.sh5
2 files changed, 11 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index e0dd92ab97..3013d245d6 100644
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -110,6 +110,10 @@ get_status_led() {
mlwg2)
status_led="$board:blue:system"
;;
+ linkits7688| \
+ linkits7688d)
+ [ "$1" = "upgrade" ] && status_led="mediatek:orange:wifi"
+ ;;
m2m)
status_led="$board:blue:wifi"
;;
@@ -179,7 +183,7 @@ get_status_led() {
}
set_state() {
- get_status_led
+ get_status_led $1
case "$1" in
preinit)
@@ -188,6 +192,7 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ upgrade | \
preinit_regular)
status_led_blink_preinit_regular
;;
diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh
index 3d4b73afb6..0e8d619069 100755
--- a/target/linux/ramips/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh
@@ -203,4 +203,9 @@ disable_watchdog() {
}
}
+blink_led() {
+ . /etc/diag.sh; set_state upgrade
+}
+
append sysupgrade_pre_upgrade disable_watchdog
+append sysupgrade_pre_upgrade blink_led