https://github.com/mkj/pihelp
A hardware watchdog for a Raspberry Pi using an AVR
https://github.com/mkj/pihelp
Last synced: about 1 year ago
JSON representation
A hardware watchdog for a Raspberry Pi using an AVR
- Host: GitHub
- URL: https://github.com/mkj/pihelp
- Owner: mkj
- Created: 2014-06-26T14:01:10.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2017-02-27T15:09:52.000Z (over 9 years ago)
- Last Synced: 2025-05-06T12:38:07.041Z (about 1 year ago)
- Language: C
- Size: 1.29 MB
- Stars: 25
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A hardware watchdog for a Raspberry Pi. It uses an atmega328 attached to the Raspberry Pi's
serial port, with a simple command line interface.
It will reset the Raspberry Pi if either a long or short watchdog timer isn't reset within
a time period. It will also toggle a pin to alternate between booting to kernel\_emergency.img
and the normal kernel - see http://elinux.org/RPI_safe_mode . This makes it less risky to upgrading
the boot image remotely. There are a few other features such as a bodgy random number generator
and hmac. The 'oneshot' watchdog lets you set a failsafe so that if you try something that doesn't work, it'l reboot after a set period of time.
A rough list of functionality is in the [read handler](main.c#L1134).
I implemented this to use with [PCextreme's](https://www.pcextreme.nl/)
[Raspberry Colocation](http://raspberrycolocation.com/).
The system boots an initramfs as a bootloader with SSH - [Dropbear](https://github.com/mkj/dropbear) of course. I then boot the real kernel with [kexec](http://manpages.ubuntu.com/manpages/precise/man8/kexec.8.html) - that allows low-risk upgrades over the network.
