[RESOLVED] Reset button not working
I've identified the reset button logic is in
... if [ "$SEEN" -lt 1 ] then echo "REBOOT" > /dev/console sync reboot elif [ "$SEEN" -gt 5 ] then echo "FACTORY RESET" > /dev/console jffs2reset -y && reboot & fi ...
which Google tells me is run by
procd. Customising this script would presumably alter the behaviour of the button, allowing it to be used in software, albeit probably not as a standard GPIO (as
procdwill still hold that port open)
cat /sys/kernel/debug/gpioalso tells me that
gpio-11 (reset)is an input, currently
lo. If I press the button, this changes to
hi, as expected.
However, on mine, it doesn't seem to lead to a reset, and I can't see a console message either. I wonder if this still works since I upgraded to firmware
0.1.4 (b330)... Any idea?
As I've invested some effort in getting this unit the way I want it, I'm loathe to try pressing it for more than five seconds to see if that works.
Duh. Solved the problem... I had a script in
/etc/init.dthat wasn't backgrounding properly, so the system wasn't actually booted all the way; as a result, the button wasn't working. Fixed that script, and the button now works as expected.
Anyway, I confirmed the script in
/etc/rc.button/resetdoes work, and you can replace the
rebootline with whatever you want. I hope that helps someone.