watchdog_5.6.bb: add config for the nokia900 machine
authorKlaus Kurzmann <mok@fluxnetz.de>
Tue, 14 Sep 2010 15:54:06 +0000 (17:54 +0200)
committerKlaus Kurzmann <mok@fluxnetz.de>
Tue, 14 Sep 2010 15:55:42 +0000 (17:55 +0200)
Signed-off-by: Klaus Kurzmann <mok@fluxnetz.de>
recipes/watchdog/files/nokia900/init [new file with mode: 0644]
recipes/watchdog/files/nokia900/watchdog-omap.conf [new file with mode: 0644]
recipes/watchdog/files/nokia900/watchdog.conf [new file with mode: 0644]
recipes/watchdog/watchdog_5.6.bb

diff --git a/recipes/watchdog/files/nokia900/init b/recipes/watchdog/files/nokia900/init
new file mode 100644 (file)
index 0000000..9d07871
--- /dev/null
@@ -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 (file)
index 0000000..43c5896
--- /dev/null
@@ -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 (file)
index 0000000..48855ab
--- /dev/null
@@ -0,0 +1,4 @@
+watchdog-device = /dev/twl4030_wdt 
+interval = 10 
+realtime = yes 
+priority = 1
index 8c0845f..569a1b2 100644 (file)
@@ -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"