[oe-commits] Klaus Kurzmann : watchdog_5.6.bb: add config for the nokia900 machine

git version control git at git.openembedded.org
Tue Sep 14 15:56:01 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: a54c780914ea4a12c3e14c0aec406f81b8928b14
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=a54c780914ea4a12c3e14c0aec406f81b8928b14

Author: Klaus Kurzmann <mok at fluxnetz.de>
Date:   Tue Sep 14 17:54:06 2010 +0200

watchdog_5.6.bb: add config for the nokia900 machine

Signed-off-by: Klaus Kurzmann <mok at fluxnetz.de>

---

 recipes/watchdog/files/nokia900/init               |   34 ++++++++++++++++++++
 recipes/watchdog/files/nokia900/watchdog-omap.conf |    4 ++
 recipes/watchdog/files/nokia900/watchdog.conf      |    4 ++
 recipes/watchdog/watchdog_5.6.bb                   |   10 ++++++
 4 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/recipes/watchdog/files/nokia900/init b/recipes/watchdog/files/nokia900/init
new file mode 100644
index 0000000..9d07871
--- /dev/null
+++ b/recipes/watchdog/files/nokia900/init
@@ -0,0 +1,34 @@
+#!/bin/sh
+DAEMON="/usr/sbin/watchdog"
+NAME="watchdog"
+DESC="watchdog daemon"
+OPTIONS=""
+
+test -f $DAEMON || exit 0
+
+case "$1" in
+    start)
+        echo -n "Starting $DESC: $NAME... "
+        start-stop-daemon -S -x $DAEMON -- $OPTIONS
+	/usr/sbin/wd_keepalive -c /etc/watchdog-omap.conf &
+        echo "done."
+       ;;
+    stop)
+        echo -n "Stopping $DESC: $NAME... "
+        start-stop-daemon -K -x $DAEMON
+        echo "done."
+        ;;
+    restart)
+        echo "Restarting $DESC: $NAME... "
+        $0 stop
+        sleep 1
+        $0 start
+        echo "done."
+        ;;
+    *)
+        echo "Usage: $0 {start|stop|restart}"
+        exit 1
+        ;;
+esac
+
+exit 0
diff --git a/recipes/watchdog/files/nokia900/watchdog-omap.conf b/recipes/watchdog/files/nokia900/watchdog-omap.conf
new file mode 100644
index 0000000..43c5896
--- /dev/null
+++ b/recipes/watchdog/files/nokia900/watchdog-omap.conf
@@ -0,0 +1,4 @@
+watchdog-device = /dev/watchdog 
+interval = 10 
+realtime = yes 
+priority = 1
diff --git a/recipes/watchdog/files/nokia900/watchdog.conf b/recipes/watchdog/files/nokia900/watchdog.conf
new file mode 100644
index 0000000..48855ab
--- /dev/null
+++ b/recipes/watchdog/files/nokia900/watchdog.conf
@@ -0,0 +1,4 @@
+watchdog-device = /dev/twl4030_wdt 
+interval = 10 
+realtime = yes 
+priority = 1
diff --git a/recipes/watchdog/watchdog_5.6.bb b/recipes/watchdog/watchdog_5.6.bb
index 8c0845f..569a1b2 100644
--- a/recipes/watchdog/watchdog_5.6.bb
+++ b/recipes/watchdog/watchdog_5.6.bb
@@ -1,9 +1,14 @@
 DESCRIPTION = "System watchdog daemon"
 LICENSE = "GPL"
+PR = "r1"
 
 SRC_URI = "http://www.ibiblio.org/pub/Linux/system/daemons/watchdog/${PN}-${PV}.tar.gz \
 	file://init"
 
+SRC_URI_append_nokia900 = " \
+	file://watchdog.conf \
+	file://watchdog-omap.conf"
+
 inherit autotools update-rc.d
 
 INITSCRIPT_NAME = "watchdog"
@@ -14,6 +19,11 @@ do_install_append() {
 	install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/watchdog
 }
 
+do_install_append_nokia900() {
+	install -m 0644 ${WORKDIR}/watchdog.conf ${D}${sysconfdir}/watchdog.conf
+	install -m 0644 ${WORKDIR}/watchdog-omap.conf ${D}${sysconfdir}/watchdog-omap.conf
+}
+
 
 SRC_URI[md5sum] = "6df285569dd1d85528b983c98c9b2b7c"
 SRC_URI[sha256sum] = "a2c7d6726e092315dbb047211b754528e4532521678a30e16f60a31bb86a7f74"





More information about the Openembedded-commits mailing list