aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-12-15 10:37:00 +0000
committerJohn Crispin <john@openwrt.org>2014-12-15 10:37:00 +0000
commit019ea725aad8481c34aaa8b7561c3f9ba6d79e1d (patch)
tree21b1f4bb215895cc20de6c7833b6e17dfd143cf5
parenta5b6b7e41943fec0eb28593ce92b0713990c8d23 (diff)
downloadupstream-019ea725aad8481c34aaa8b7561c3f9ba6d79e1d.tar.gz
upstream-019ea725aad8481c34aaa8b7561c3f9ba6d79e1d.tar.bz2
upstream-019ea725aad8481c34aaa8b7561c3f9ba6d79e1d.zip
add "preinit_regular" diag.sh set_state argument
This new argument is used right after starting regular preinit (which happens if failsafe wasn't triggered). The main purpose of "preinit" argument is to indicate that failsafe can be triggered, however we were missing a way to inform user that we don't wait for a trigger anymore. With this change it's clear when failsafe mode can be triggered. Signed-off-by: Rafał Miłecki <zajec5@gmail.com> SVN-Revision: 43715
-rw-r--r--package/base-files/files/lib/functions/leds.sh4
-rw-r--r--package/base-files/files/lib/preinit/10_indicate_preinit6
-rw-r--r--package/base-files/files/lib/preinit/50_indicate_regular_preinit2
-rwxr-xr-xtarget/linux/adm5120/base-files/etc/diag.sh3
-rw-r--r--target/linux/ar7/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/ar71xx/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/avr32/base-files/etc/diag.sh4
-rw-r--r--target/linux/bcm53xx/base-files/etc/diag.sh3
-rw-r--r--target/linux/brcm47xx/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/brcm63xx/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/cns21xx/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/kirkwood/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/mpc85xx/base-files/etc/diag.sh4
-rwxr-xr-xtarget/linux/mvebu/base-files/etc/diag.sh3
-rw-r--r--target/linux/mxs/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/oxnas/base-files/etc/diag.sh3
-rwxr-xr-xtarget/linux/ramips/base-files/etc/diag.sh3
17 files changed, 50 insertions, 6 deletions
diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh
index 743c7da782..4ac81455fa 100644
--- a/package/base-files/files/lib/functions/leds.sh
+++ b/package/base-files/files/lib/functions/leds.sh
@@ -66,3 +66,7 @@ status_led_blink_preinit() {
status_led_blink_failsafe() {
led_timer $status_led 50 50
}
+
+status_led_blink_preinit_regular() {
+ led_timer $status_led 500 500
+}
diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit
index 900911606a..8e94df9ab2 100644
--- a/package/base-files/files/lib/preinit/10_indicate_preinit
+++ b/package/base-files/files/lib/preinit/10_indicate_preinit
@@ -36,13 +36,9 @@ preinit_echo() {
echo $1
}
-pi_indicate_led() {
- set_state preinit
-}
-
pi_indicate_preinit() {
preinit_net_echo "Doing OpenWrt Preinit\n"
- pi_indicate_led
+ set_state preinit
}
boot_hook_add preinit_main preinit_ip
diff --git a/package/base-files/files/lib/preinit/50_indicate_regular_preinit b/package/base-files/files/lib/preinit/50_indicate_regular_preinit
index bc223b358e..5b7523f6fd 100644
--- a/package/base-files/files/lib/preinit/50_indicate_regular_preinit
+++ b/package/base-files/files/lib/preinit/50_indicate_regular_preinit
@@ -4,7 +4,7 @@
indicate_regular_preinit() {
preinit_net_echo "Continuing with Regular Preinit\n"
- pi_indicate_led
+ set_state preinit_regular
}
boot_hook_add preinit_main indicate_regular_preinit
diff --git a/target/linux/adm5120/base-files/etc/diag.sh b/target/linux/adm5120/base-files/etc/diag.sh
index f1317c5574..08952bdaaa 100755
--- a/target/linux/adm5120/base-files/etc/diag.sh
+++ b/target/linux/adm5120/base-files/etc/diag.sh
@@ -12,6 +12,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;
diff --git a/target/linux/ar7/base-files/etc/diag.sh b/target/linux/ar7/base-files/etc/diag.sh
index 37eed6a1a1..f6548e8d50 100644
--- a/target/linux/ar7/base-files/etc/diag.sh
+++ b/target/linux/ar7/base-files/etc/diag.sh
@@ -29,6 +29,9 @@ set_state() {
failsafe)
status_led_set_timer 50 50
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
[ "$status_led" = "status" ] && {
status_led_set_heartbeat
diff --git a/target/linux/ar71xx/base-files/etc/diag.sh b/target/linux/ar71xx/base-files/etc/diag.sh
index c022013f8f..63e1ca6c86 100755
--- a/target/linux/ar71xx/base-files/etc/diag.sh
+++ b/target/linux/ar71xx/base-files/etc/diag.sh
@@ -305,6 +305,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
case $(ar71xx_board_name) in
diff --git a/target/linux/avr32/base-files/etc/diag.sh b/target/linux/avr32/base-files/etc/diag.sh
index f7604ae715..38cd189681 100755
--- a/target/linux/avr32/base-files/etc/diag.sh
+++ b/target/linux/avr32/base-files/etc/diag.sh
@@ -15,6 +15,10 @@ set_state() {
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
+
done)
status_led_on
;;
diff --git a/target/linux/bcm53xx/base-files/etc/diag.sh b/target/linux/bcm53xx/base-files/etc/diag.sh
index 05ac9e8374..0a8c5fbcdb 100644
--- a/target/linux/bcm53xx/base-files/etc/diag.sh
+++ b/target/linux/bcm53xx/base-files/etc/diag.sh
@@ -33,6 +33,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;
diff --git a/target/linux/brcm47xx/base-files/etc/diag.sh b/target/linux/brcm47xx/base-files/etc/diag.sh
index 539af36c51..67453e6fd4 100644
--- a/target/linux/brcm47xx/base-files/etc/diag.sh
+++ b/target/linux/brcm47xx/base-files/etc/diag.sh
@@ -31,6 +31,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;
diff --git a/target/linux/brcm63xx/base-files/etc/diag.sh b/target/linux/brcm63xx/base-files/etc/diag.sh
index bbf5c0b2e8..f6a65d1107 100755
--- a/target/linux/brcm63xx/base-files/etc/diag.sh
+++ b/target/linux/brcm63xx/base-files/etc/diag.sh
@@ -12,6 +12,9 @@ set_state() {
failsafe)
status_led_set_timer 50 50
;;
+ preinit_regular)
+ status_led_set_timer 500 500
+ ;;
done)
if [ "${status_led/power}" != "$status_led" ]; then
status_led_on
diff --git a/target/linux/cns21xx/base-files/etc/diag.sh b/target/linux/cns21xx/base-files/etc/diag.sh
index 292ddb757a..d61f467267 100755
--- a/target/linux/cns21xx/base-files/etc/diag.sh
+++ b/target/linux/cns21xx/base-files/etc/diag.sh
@@ -22,6 +22,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;
diff --git a/target/linux/kirkwood/base-files/etc/diag.sh b/target/linux/kirkwood/base-files/etc/diag.sh
index bd6bd98cad..b2bb5835ae 100755
--- a/target/linux/kirkwood/base-files/etc/diag.sh
+++ b/target/linux/kirkwood/base-files/etc/diag.sh
@@ -22,6 +22,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;
diff --git a/target/linux/mpc85xx/base-files/etc/diag.sh b/target/linux/mpc85xx/base-files/etc/diag.sh
index 123a90dbae..1107763a37 100755
--- a/target/linux/mpc85xx/base-files/etc/diag.sh
+++ b/target/linux/mpc85xx/base-files/etc/diag.sh
@@ -24,6 +24,10 @@ set_state() {
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
+
done)
status_led_on
;;
diff --git a/target/linux/mvebu/base-files/etc/diag.sh b/target/linux/mvebu/base-files/etc/diag.sh
index 07570b9188..adba975ede 100755
--- a/target/linux/mvebu/base-files/etc/diag.sh
+++ b/target/linux/mvebu/base-files/etc/diag.sh
@@ -22,6 +22,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;
diff --git a/target/linux/mxs/base-files/etc/diag.sh b/target/linux/mxs/base-files/etc/diag.sh
index 683e1234d5..11b1f75fae 100644
--- a/target/linux/mxs/base-files/etc/diag.sh
+++ b/target/linux/mxs/base-files/etc/diag.sh
@@ -28,6 +28,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;
diff --git a/target/linux/oxnas/base-files/etc/diag.sh b/target/linux/oxnas/base-files/etc/diag.sh
index ba42218049..5370696b44 100755
--- a/target/linux/oxnas/base-files/etc/diag.sh
+++ b/target/linux/oxnas/base-files/etc/diag.sh
@@ -28,6 +28,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;
diff --git a/target/linux/ramips/base-files/etc/diag.sh b/target/linux/ramips/base-files/etc/diag.sh
index f50ae1fe7f..1af64b2770 100755
--- a/target/linux/ramips/base-files/etc/diag.sh
+++ b/target/linux/ramips/base-files/etc/diag.sh
@@ -227,6 +227,9 @@ set_state() {
failsafe)
status_led_blink_failsafe
;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
done)
status_led_on
;;