bb xm - safe halt?

I’m embedding a BeagleBoard XM rev C in a system. One issue is how to safely power down. Do we just remove power, or do we do something more kosher - like issuing “shutdown -h” and waiting.

Of course, shutdown -h doesn’t actually halt! So what is safe? Pull down “reset” and then power off?

This question applies even to development systems. What’s the right way to shut down this little guy?

Thanks for enlightenment.

Martin

give “init 0” on the command prompt.

give “init 0” on the command prompt and wait till it goes down. Then remove the power supply.

OK, thanks. But is there a way to do it without a terminal session? I suppose you could poll a GPIO pin, but is there a simpler way? The system really wants to have a simple on/off switch and that’s all.

Martin

OK, thanks. But is there a way to do it without a terminal session? I
suppose you could poll a GPIO pin, but is there a simpler way? The system
really wants to have a simple on/off switch and that's all.

That seems pretty simple, given that you can take an event from the
USER button [1] (just replace the print with a shell call to 'init
0'). Don't poll in a loop as that would be a waste of CPU.

Depending on what you are doing with the file system, simply cutting
power might be just fine. For any long-term deployment, I'd recommend
using a tmpfs for any volatile files, as has been mentioned multiple
times recently on this list, and very intentionally write to the SD
card only when necessary. If you keep the file system on the SD card
as read-only, there would be no risk of needing to perform any data
recovery at your next boot. You can follow a related thread at [2].

[1] http://mechomaniac.com/BeagleboardUserButton
[2] http://permalink.gmane.org/gmane.comp.handhelds.openembedded.core/16556