Re: NetBSD 7.0_RC1 on Raspberry Pi : reboots on poweroff

2015-07-11 Thread Christos Zoulas
On Jul 11,  6:08pm, mayur...@acm.org (Mayuresh) wrote:
-- Subject: Re: NetBSD 7.0_RC1 on Raspberry Pi : reboots on poweroff

| On Sat, Jul 11, 2015 at 12:20:38PM +, Christos Zoulas wrote:
|  2. the cpu_reboot code in src/sys/arch/arm/arm32/arm32_reboot.c in 1.6
| which is the revision in netbsd-7 reboots on halt. This has been
| fixed in later revisions to loop and wait.
| 
| Thanks.
| 
| Would it be considered important enough to be patched in 7 as well?
| 
| It's a show stopper for use of NetBSD on pi.

Yes, I will ask for a pullup.

christos


Re: NetBSD 7.0_RC1 on Raspberry Pi : reboots on poweroff

2015-07-11 Thread Christos Zoulas
In article 20150711052153.GA3022@odin, Mayuresh  mayur...@acm.org wrote:
On Sat, Jul 11, 2015 at 04:06:22AM +, Michael van Elst wrote:
 The RPI cannot power itself off but it should really wait for
 a keypress. This used to work with a serial console, but maybe
 not with a USB keyboard.

If I remove the USB keyboard and issue poweroff over ssh, it does not even
wait at reboot message. It just reboots without waiting. (And if I have
USB keyboard, it waits at reboot message for a few seconds and then
reboots.)

I am sure the issue is not about RPI's lack of ability to power itself
down.

1. there is no code for the arm to poweroff.
2. the cpu_reboot code in src/sys/arch/arm/arm32/arm32_reboot.c in 1.6
   which is the revision in netbsd-7 reboots on halt. This has been
   fixed in later revisions to loop and wait.

christos



Re: NetBSD 7.0_RC1 on Raspberry Pi : reboots on poweroff

2015-07-11 Thread Mayuresh
On Sat, Jul 11, 2015 at 12:20:38PM +, Christos Zoulas wrote:
 2. the cpu_reboot code in src/sys/arch/arm/arm32/arm32_reboot.c in 1.6
which is the revision in netbsd-7 reboots on halt. This has been
fixed in later revisions to loop and wait.

Thanks.

Would it be considered important enough to be patched in 7 as well?

It's a show stopper for use of NetBSD on pi.

Mayuresh.


Re: NetBSD 7.0_RC1 on Raspberry Pi : reboots on poweroff

2015-07-10 Thread Mayuresh
On Fri, Jul 10, 2015 at 05:54:43PM -0400, Louis Guillaume wrote:
 # poweroff -p
 
 - or if you're not in single-user -
 
 # shutdown -p now
 
 Should do the trick.

shutdown -p now also went to reboot prompt.

Mayuresh.


Re: NetBSD 7.0_RC1 on Raspberry Pi : reboots on poweroff

2015-07-10 Thread Michael van Elst
mayur...@acm.org (Mayuresh) writes:

I find that when I run poweroff on pi on NetBSD 7.0_RC1, it goes to
Press any key to reboot prompt instead of powering itself off.

And after some time it reboots. I have to pull the power chord exactly in
those moments when it is still at above prompt, else I run the risk of
corrupting the sd card. (Already happened once, with the device going to
file system checks.)

The RPI cannot power itself off but it should really wait for
a keypress. This used to work with a serial console, but maybe
not with a USB keyboard.

-- 
-- 
Michael van Elst
Internet: mlel...@serpens.de
A potential Snark may lurk in every tree.


Re: NetBSD 7.0_RC1 on Raspberry Pi : reboots on poweroff

2015-07-10 Thread Mayuresh
On Sat, Jul 11, 2015 at 04:06:22AM +, Michael van Elst wrote:
 The RPI cannot power itself off but it should really wait for
 a keypress. This used to work with a serial console, but maybe
 not with a USB keyboard.

If I remove the USB keyboard and issue poweroff over ssh, it does not even
wait at reboot message. It just reboots without waiting. (And if I have
USB keyboard, it waits at reboot message for a few seconds and then
reboots.)

I am sure the issue is not about RPI's lack of ability to power itself
down.

Mayuresh.


Re: NetBSD 7.0_RC1 on Raspberry Pi : reboots on poweroff

2015-07-10 Thread Louis Guillaume

On 7/10/15 7:44 AM, Mayuresh wrote:

I find that when I run poweroff on pi on NetBSD 7.0_RC1, it goes to
Press any key to reboot prompt instead of powering itself off.

And after some time it reboots. I have to pull the power chord exactly in
those moments when it is still at above prompt, else I run the risk of
corrupting the sd card. (Already happened once, with the device going to
file system checks.)

Now, when I use the device in headless manner, I have difficulty deciding
exact time of pulling the chord to safely poweroff the device.

Is there any way out of this?

Mayuresh.




# poweroff -p

- or if you're not in single-user -

# shutdown -p now

Should do the trick.

Louis