[OpenWrt-Devel] [PATCH][v2] BB : kirkwood : Seagate GoFlex Net "Board Name" and cleanup
L. D. Pinney
ldpinney at gmail.com
Mon Feb 16 13:19:54 EST 2015
Add the diag.sh file for failsafe LEDs.
Cleanup uci-defaults for network and LEDs.
Sets the "fault" LEDs in uci-defaults to off
Add the GoFlex Net "Board Name"
Remove kmod-rtc-marvell from default packages, as the GoFlex net does not have a Real Time Clock.
V2 adds led "name" in uci-defaults missing from V1.
Signed-off-by: L. D. Pinney <ldpinney at gmail.com>
---
target/linux/kirkwood/base-files/etc/diag.sh | 37 +++++++++++++++++++++++++++++++++++++
target/linux/kirkwood/base-files/etc/uci-defaults/01_leds | 17 ++++++++++-------
target/linux/kirkwood/base-files/etc/uci-defaults/02_network | 13 ++++---------
target/linux/kirkwood/base-files/lib/kirkwood.sh | 4 ++++
target/linux/kirkwood/profiles/110-nas.mk | 2 +-
5 files changed, 56 insertions(+), 17 deletions(-)
diff --git a/target/linux/kirkwood/base-files/etc/diag.sh b/target/linux/kirkwood/base-files/etc/diag.sh
new file mode 100755
index 0000000..29445d5
--- /dev/null
+++ b/target/linux/kirkwood/base-files/etc/diag.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright (C) 2014 OpenWrt.org
+
+. /lib/functions/leds.sh
+. /lib/kirkwood.sh
+
+get_status_led() {
+ case $(kirkwood_board_name) in
+ dockstar|\
+ goflexnet|\
+ pogo_e02)
+ status_led="status:orange:fault"
+ ;;
+ ea4500)
+ status_led="ea4500:white:health"
+ ;;
+ esac
+}
+
+set_state() {
+ get_status_led
+
+ case "$1" in
+ preinit)
+ status_led_blink_preinit
+ ;;
+ failsafe)
+ status_led_blink_failsafe
+ ;;
+ preinit_regular)
+ status_led_blink_preinit_regular
+ ;;
+ done)
+ status_led_on
+ ;;
+ esac
+}
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
index 07c1a0e..9961913 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/01_leds
@@ -9,22 +9,25 @@
board=$(kirkwood_board_name)
case "$board" in
-"dockstar")
- ucidef_set_led_default "health" "status:green:health" "1"
- ucidef_set_led_default "fault" "status:orange:fault" "1"
+"dockstar"|\
+"pogo_e02")
+ ucidef_set_led_default "health" "health" "status:green:health" "1"
+ ucidef_set_led_default "fault" "fault" "status:orange:fault" "0"
;;
"ea4500")
ucidef_set_led_default "health" "ea4500:white:health" "1"
ucidef_set_led_default "pulse" "ea4500:white:pulse" "1"
;;
+"goflexnet")
+ ucidef_set_led_default "health" "health" "status:green:health" "1"
+ ucidef_set_led_default "fault" "fault" "status:orange:fault" "0"
+ ucidef_set_led_default "status" "status" "status:white:misc" "0"
+ ;;
"ib62x0")
ucidef_set_led_default "health" "ib62x0:green:os" "1"
ucidef_set_led_default "fault" "ib62x0:red:os" "1"
;;
-"pogo_e02")
- ucidef_set_led_default "health" "status:green:health" "1"
- ucidef_set_led_default "fault" "status:orange:fault" "1"
- ;;
+
*)
;;
esac
diff --git a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
index e795d65..cff31a8 100644
--- a/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
+++ b/target/linux/kirkwood/base-files/etc/uci-defaults/02_network
@@ -28,15 +28,10 @@ board=$(kirkwood_board_name)
ucidef_set_interface_loopback
case "$board" in
-"dockstar")
- set_lan_dhcp "eth0"
- ;;
-"iconnect")
- set_lan_dhcp "eth0"
- ;;
-"ib62x0")
- set_lan_dhcp "eth0"
- ;;
+"dockstar"|\
+"goflexnet"|\
+"iconnect"|\
+"ib62x0"|\
"pogo_e02")
set_lan_dhcp "eth0"
;;
diff --git a/target/linux/kirkwood/base-files/lib/kirkwood.sh b/target/linux/kirkwood/base-files/lib/kirkwood.sh
index ba080f4..e2a84a7 100755
--- a/target/linux/kirkwood/base-files/lib/kirkwood.sh
+++ b/target/linux/kirkwood/base-files/lib/kirkwood.sh
@@ -17,6 +17,10 @@ kirkwood_board_detect() {
name="dockstar"
;;
+ "Seagate GoFlex Net")
+ name="goflexnet"
+ ;;
+
"Iomega Iconnect")
name="iconnect"
;;
diff --git a/target/linux/kirkwood/profiles/110-nas.mk b/target/linux/kirkwood/profiles/110-nas.mk
index eff5952..daad904 100644
--- a/target/linux/kirkwood/profiles/110-nas.mk
+++ b/target/linux/kirkwood/profiles/110-nas.mk
@@ -25,7 +25,7 @@ define Profile/GOFLEXNET
NAME:=Seagate GoFlexNet
PACKAGES:= \
kmod-ata-core kmod-ata-marvell-sata \
- kmod-rtc-marvell kmod-usb2 kmod-usb-storage \
+ kmod-usb2 kmod-usb-storage \
uboot-envtools
endef
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list