Watchdog timer in Pickle linux (remove omap_wdt?)

Hi,

A bit of investigation with Dr. Google found that the beagleboard XM
boards have a known issue with the omap_wdt driver. Instead of rebooting the board it holds it in reset. The easy solution is to not use the omap_wdt watchdog timer driver but rather the TLW4030 watchdog timer driver. Looking at the latest pickle Linux kernel I see there are currently 4 watchdog timer drivers built into the kernel including the working TLW4030. Since it
loads after the omap_wdt timer it doesn’t get used. The TLW4030 reportedly works on all version of the beagleboard.

lib/modules/2.6.33-500-omap/kernel/drivers/watchdog/softdog.ko
lib/modules/2.6.33-500-omap/kernel/drivers/watchdog/twl4030_wdt.ko
lib/modules/2.6.33-500-omap/kernel/drivers/watchdog/omap_wdt.ko

lib/modules/2.6.33-500-omap/kernel/drivers/watchdog/pcwd_usb.ko

Therefore would it be possible to get pickle rebuilt without the omap_wdt built in? That should then cause the twl4030 driver to be used whenever the /dev/watchdog file is written to and hopefully solve the problem. Anyone wanting to use the timer would still need to install the watchdog user space program as I don’t think it makes sense to include that in pickle.

A quick way to test the watchdog timer is to just cat /dev/watchdog and wait a minute. Current XM boards with the omap_wdt timer will crash after a minute. Newer beagleboards will restart. If my theory is correct after removing the omap_wdt driver all boards will restart

Thanks
Mike

Here is reference where someone did the research on the watchdog timer: http://gumstix.8.x6.nabble.com/Watchdog-timer-not-working-in-gumstix-overo-td812498.html Look near the bottom with the solution.

I also saw references on the TI site and perhaps the omap_wdt driver has been updated as well since these posts are old.

After sending my email to this group last week, I got a chance to dive deeper into the watchdog timer of the beagleboard and got it to work on the rev C XM board. The solution is fairly simple and I figured I would document it here as others might be interested. With this config change the board will reboot itself if it detects certain conditions. This is reported to work for all versions of the beagleboard. Only time will tell if this will prevent a trip to a mountaintop but it should hopefully solve the problem we encountered with a hung reboot.

Since Jim included a full build environment in pickle Linux, it is easy to rebuild the kernel in place. The steps to change the watchdog timer from the default of omap_wdt to twl4030 are simple. Unlike what I said in my original email the default kernel only has the omap_wdt timer.

The steps are (some of these are probably unnecessary) :
cd /usr/src/linux

make menuconfig

(navigate to the drivers/watchdog and remove the star next to the omap_wdt and put a star next to the twl4030_wdt)

make
make modules

make uImage

make modules_install

make install

cp /boot/uImage /boot/uImage_orig

cp arch/arm/boot/uImage /boot/uImage

reboot

After the reboot “cat /dev/watchdog” and the board should reboot after about 30 seconds. Assuming the board reboots and doesn’t hang then the watchdog user space app can be added. To install it run “apt-get install watchdog” and then configure the /etc/watchdog.conf file. At a minimum remove the comment on the /dev/watchdog line but you can also configure it to check all sort of other parameters. By default it will start when the board is started.

Mike

···

On Thu, Nov 7, 2013 at 9:28 AM, Mike Hugo ka6oij@arrl.net wrote:

Hi,

A bit of investigation with Dr. Google found that the beagleboard XM
boards have a known issue with the omap_wdt driver. Instead of rebooting the board it holds it in reset. The easy solution is to not use the omap_wdt watchdog timer driver but rather the TLW4030 watchdog timer driver.

A quick way to test the watchdog timer is to just cat /dev/watchdog and wait a minute. Current XM boards with the omap_wdt timer will crash after a minute. Newer beagleboards will restart. If my theory is correct after removing the omap_wdt driver all boards will restart

Thanks
Mike

Here is reference where someone did the research on the watchdog timer: http://gumstix.8.x6.nabble.com/Watchdog-timer-not-working-in-gumstix-overo-td812498.html Look near the bottom with the solution.

I also saw references on the TI site and perhaps the omap_wdt driver has been updated as well since these posts are old.