Indy Hardware Watchdog µ-Howto

Guido Günther ( agx@sigxcpu.org)

v0.1, 18 February 2002


This document explains very briefly how to use the hardware watchdog on IP22 machines ake Indy/I2.

1. News

2002-03-07 The watchdog driver is now part of the Linux/Mips kernel tree. No need for extra patches.

2002-02-18 indydog-2001-02-15.diff: move the config stuff to the other watchdog drivers and use dep_tristate to only make it selectable when building for ip22.

2002-02-11 indydog-2001-02-08.diff: adapt driver to kernel 2.4.17. I'm only providing this as a kernel patch now. Syslog interaction problems are gone now.

2. How it works

I'm never nearby when my machine freezes. Therefore I sat down and wrote a small kernel module based on Alan Cox's softdog.c to make use of the Indy's hardware watchdog. A small userspace program has to notify the module at least once in a minute that "it's still alive". If this doesn't happen the Indy resets automagically.

3. Installation Instructions

First you need the IndyDog module and the above mentioned userspace program. A patch against kernel 2.4.17 can be found at:

http://honk.physik.uni-konstanz.de/linux-mips/indy-watchdog/

To apply the patch against the kernel source cd into your kernel tree and do patch -p1 < path_to_patch/indydog-<releasedate>.diff afterwards compile the modules using make modules. With modutils installed insert the module using insmod drivers/char/indydog.o. lsmod should now show something like:

        Module                  Size  Used by
        indydog                 1312   1 

To activate the watchdog a userspace program now has to open /dev/watchdog. Afterwards it has to write to this device at least once every minute to prevent the system from resetting. For testing you can use user.c that comes with the linux kernel(see Documentation/watchdog.txt in your linux source tree). If everything works you can do a make modules_install to install the module into /lib/modules/<kernel_version>.

4. Notes