[nas-2000] Re: how to grab the power-button?

  • From: "Alfred Bruckner" <alfred.bruckner@xxxxxx>
  • To: <nas-2000@xxxxxxxxxxxxx>
  • Date: Tue, 27 Nov 2007 09:36:13 +0100

the power button has two connections:

1. to U4 which is a CPLD (programmable logic - cannot be modified) that
device seems to have some internal timer which causes the power LED to blink
and later switches off the power

2. directly to the CPU on GPIO25, where it should generate an interrupt and
SW initiates a system shutdown


-----Original Message-----
From: nas-2000-bounce@xxxxxxxxxxxxx [mailto:nas-2000-bounce@xxxxxxxxxxxxx]
On Behalf Of philipp Wehrheim
Sent: Saturday, November 17, 2007 12:52 PM
To: nas-2000@xxxxxxxxxxxxx
Subject: [nas-2000] Re: how to grab the power-button?

Hey Felix,

as always I'm not at home over the weekend.
So the infos below are just some wild guesses!

Felix Mellmann wrote:
> Hey guys,
> my nas-1000 runs with a debian system from hdd, so i had to exchange
> some parts of the flash.
> I know, that the originial system was able to shutdown the system
> whenever someone pushes the power-button. Okay since debian does not get
> that information, it keeps running, but one of the leds flashes and
> after 30 seconds, the nas shuts down itself, leaving the filesystem in
> an unconsistent state. So I have to use a remote "slogin root@nas halt"
> for system halt.
> In /sys/class/misc there are two devices listed - sl_pwr and sl_gpio
> (aka /dev/sl_pwr and /dev/sl_gpio).
> Does anyone know if those devices return the push on the power-button,
> and how to use it?

In the start script /etc/rc somewhere a daemon "powermgmt" is started.
I would recon to use string and/or strace to look inside.

Ofcourse you can create the two dev's in your debian root if the above
prog is responceable and execute it there.

> In the meantime I think I will try to open one of those devices and
> print on the console what they return, but I fear, that I will have to
> use ioctl's ...

Will you tell us what you did to get debian to work and
if you had success with the powerbutton what was needed too.

> thank you in advance,
> Felix

Other related posts: