soft shutdown

Hi all,
I have a beagelboard that execute an industrial application without
the need of uman interaction and without monitor.
Sometimes I need to shutdown the board but I only can to power off the
board unplugging the power cable.

Is there a way to generate a soft shutdown as if I run "halt" commend
in the console?

What os are you on? The shutdown command works in many variants of linux

-Alex

I am not sure if got what you exactly need but to turn off your Beagle
Board from the Linux terminal, it is necessary only to write:
#shutdown -h now
"-h" means halt. So, it will keep off.

But maybe, you just need to reboot:
#reboot

Regards,
Frederico

I use Angstrom OS.

I know how to shutdown from command line but sometimes I haven't
access to the console so I only can to unplug the power cable.

For example if I must copy a file into the SD I must before to power
off the board.

But if I haven't access to the console (and to the monitor) how can I
do?

With a PC if I press power button it shutdown and then it power-off. I
need the same with the beagle.

BB does not have a power switch controller which is able to unplug the power. I saw this feature at i.mx515 devkit.

2010/11/25 luca26 <luca_devnet@ventisei.eu>

Thanks,
isn't there a way to customize the USER button?

luca26 wrote:

Thanks,
isn't there a way to customize the USER button?

you can of course hook up some functionality to the user button,
which could be to e.g. unmount and sync all drives so that you
can then remove the power safely.

Can you post me some links to know how to customize user button?

http://wh1t3s.com/tag/beagleboard/

2010/11/25 luca26 <luca_devnet@ventisei.eu>

Thanks,
very useful!

Hai Luca…

I am using beagleboard Xm Rev C with running angstrome…kernel 2.6.32…

For the same purpose I need to access the user button…

Can you please tell me which GPIO port you used ?..

Thanks…

Hi,

Here is my script to shutdown with user button:

#!/bin/sh

BTN=/dev/input/event0

while true; do
BTNVAL=hexdump -e '8/2 "%x " "\n"' -n 16 $BTN | grep 114 | awk '{print $7}'
if [ “$BTNVAL” = “1” ]
then
echo “USER_BTN pressed”
/sbin/shutdown -h now
exit 0
fi
sleep 1
done

I start this script in rc.local:

/usr/bin/btnucheck 2>&1 > /dev/null &

Regards

Thanks Leslie for your fast replay…

Hi Leslie,

Is there a way run your script with other button?Probably, make another button using the GPIO?

Thanks,
Jeffrey