How do I automatically reboot beagleboard XM after usb hub crash

At the moment, when my Beagleboard XM crashes due to the USB hub issue, control is switched over to the serial port. Obviously this makes sense since you could run diagnostics from that port. However, what I would like to do is to have the Beagleboard XM automatically reboot when it crashes. I have set up the programs I want to run as services (placed in init.d), so all I need is a reboot rather than control going over to the serial port.

I’m am going to do the usb patch, but it seems like for a board destined for remote use, I might as well set up an automatic reboot now, especially when the system is horribly buggy, i.e. the testing will come naturally. Presumably then after I patch the kernel, I will be doubly protected. That is, if the patch isn’t 100% perfect, I can live with the reboot.

Run state 6 is reboot. From the shell

# init 6

Does the trick.

Perhaps you can set up a watchdog that would fork/exec "init 6" .


Actually init 6 is a good clue. I hadn’t realized this, but the scripts in init.d not only handle start up but also shutdown. Possibly one of the scripts in that directory is what hands control back to the serial port.

It seems there is a kernel panic and a kernel oops (a degree less that a panic). Combining data from a few webages: