Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread Matti Nykyri
> On Dec 1, 2014, at 23:03, Fernando Rodriguez 
>  wrote:
> 
>> On Monday, December 01, 2014 7:34:35 PM meino.cra...@gmx.de wrote:
>> Dale  [14-12-01 19:16]:
>>> meino.cra...@gmx.de wrote:
 Hi,
 
 another >sigh< from an Arietta adventure...
 
 I sintalled Gentoo on an Arietta G25
 (http://www.acmesystems.it/arietta).
 
 For this I used Robert Nelsons Kernel for armv5tel platforms,
 which boots fine (using at91bootstrap, no U-Boot). 
 
 But: Shutdown (as recommmended by acmesystems "shutdown -h -H now")
 REBOOTS the system instead of powering it down.
 
 The hardware is not to blame: Using the original Debian rootfs
 and the kernel 3.16.1 (Robert Nelsons kernel is 3.17.3.) the
 powerdown works fine.
 
 Firstly I blamed the kernel...but when using the 3.16.1 kernel
 and the Gentoo rootfs the problem remains.
 
 Then I copied the Gentoo shutdown to the Debian rootfs, boot that
 and tries to shutdown the Debian Linux with it.
 shutdown cries "no /dev/initctl" adn shutdowns the system only for
 rebooting it.
 
 Ok...seems to be the shutdown executable.
 
 I copied the Debian shutdown to Gentoo and tries that:
 The systems reboots.
 
 Slowly but surely I begin to think, that I dont understand anything at
> all of
 It would be relly good news, 
 that...
 
 "man shutdown" on the Debian image informs me, that the manpages
 were not installed (embedded system...). Shutdown --version gives
 a short help of the usual options...but nothing more.
 
 What is the difference here? 
 Isn't it, that all shutdown applications only send some instructions
 to the kernel and the kernel is the main actor in bringing the system
 down?
 
 Is there any shutdown guru ;) out there, who is able to shed some
 light into this problem ? :)
 
 Thank you very much in advance for any torch send into my direction!
 Best regards,
 Meino
>>> 
>>> Just shooting in the dark here, try -h and -H but not at the same time? 
>>> Maybe having both is clashing in some weird way???
>>> 
>>> Dale
>>> 
>>> :-)  :-)
>> 
>> Hi Dale,
>> 
>> The "Trouble shooting FAQ"*)  by acmesystems explicitely say "shutdown -h
>> -H now" (and it works with the Debian rootfs)...but I will try "the
>> other shutdowns" and will see, what happens,
>> 
>> Best regards,
>> Meino
>> 
>> 
>> 
>> *) http://www.acmesystems.it/qa
> 
> Looking at the code for sysvinit, all shutdown  does is set some environment 
> variables and switch runlevel. The actual shutdown is done by halt and it's 
> done through the reboot system call with RB_POWER_OFF.
> 
> So, since you said the Gentoo system doesn't work even with Debian's kernel 
> and the shutdown, then it must be that either Debian has a different halt, or 
> more likely your Gentoo system calls halt with different options. So check 
> your 
> inittab on Gentoo and make sure it calls halt in the same way.

Hi meino

The thing is as Fernando pointed out:

Kernel powers off the hardware and a system call is used to instruct kernel to 
do so.


Test your system. Perform a system call to shutdown the board. As you perform 
this system call the arietta will instantly eighter boot or shutdown. See 
system call man page to see the list of available system calls. This way you 
can make sure the system works as expected...

When you have found the right system call, then you need to make init call that 
system call as the last command in run level 0.

-- 
-Matti


Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread Rich Freeman
On Mon, Dec 1, 2014 at 2:51 PM,   wrote:
> Jc García  [14-12-01 20:36]:
>>
>> I've not seen you using the -P flag.
>>
>
> That's why the manufacturer of the Arietta G25 - Acmesystems said
> to use shutdown -h -H now for that purpose:
> http://www.acmesystems.it/qa
> Second question below the title "Arietta G25 just on top of the
> page...
>
>

Have you just tried using -P to make sure that it doesn't work?  The
instructions also say to use Debian, not Gentoo.  Since most of the
shutdown behavior is in userspace and using components that vary
significantly between distros, I wouldn't blindly follow the
instructions written for one distro and expect it to just work with a
different distro.

Maybe Debian has some bug that makes -P not work, but -H does work.
Maybe OpenRC doesn't have that bug.

--
Rich



Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread Fernando Rodriguez
On Monday, December 01, 2014 7:34:35 PM meino.cra...@gmx.de wrote:
> Dale  [14-12-01 19:16]:
> > meino.cra...@gmx.de wrote:
> > > Hi,
> > >
> > > another >sigh< from an Arietta adventure...
> > >
> > > I sintalled Gentoo on an Arietta G25
> > > (http://www.acmesystems.it/arietta).
> > >
> > > For this I used Robert Nelsons Kernel for armv5tel platforms,
> > > which boots fine (using at91bootstrap, no U-Boot). 
> > >
> > > But: Shutdown (as recommmended by acmesystems "shutdown -h -H now")
> > > REBOOTS the system instead of powering it down.
> > >
> > > The hardware is not to blame: Using the original Debian rootfs
> > > and the kernel 3.16.1 (Robert Nelsons kernel is 3.17.3.) the
> > > powerdown works fine.
> > >
> > > Firstly I blamed the kernel...but when using the 3.16.1 kernel
> > > and the Gentoo rootfs the problem remains.
> > >
> > > Then I copied the Gentoo shutdown to the Debian rootfs, boot that
> > > and tries to shutdown the Debian Linux with it.
> > > shutdown cries "no /dev/initctl" adn shutdowns the system only for
> > > rebooting it.
> > >
> > > Ok...seems to be the shutdown executable.
> > >
> > > I copied the Debian shutdown to Gentoo and tries that:
> > > The systems reboots.
> > >
> > > Slowly but surely I begin to think, that I dont understand anything at 
all of
> > > It would be relly good news, 
> > > that...
> > >
> > > "man shutdown" on the Debian image informs me, that the manpages
> > > were not installed (embedded system...). Shutdown --version gives
> > > a short help of the usual options...but nothing more.
> > >
> > > What is the difference here? 
> > > Isn't it, that all shutdown applications only send some instructions
> > > to the kernel and the kernel is the main actor in bringing the system
> > > down?
> > >
> > > Is there any shutdown guru ;) out there, who is able to shed some
> > > light into this problem ? :)
> > >
> > > Thank you very much in advance for any torch send into my direction!
> > > Best regards,
> > > Meino
> > >
> > 
> > Just shooting in the dark here, try -h and -H but not at the same time? 
> > Maybe having both is clashing in some weird way???
> > 
> > Dale
> > 
> > :-)  :-) 
> > 
> 
> Hi Dale,
> 
> The "Trouble shooting FAQ"*)  by acmesystems explicitely say "shutdown -h
> -H now" (and it works with the Debian rootfs)...but I will try "the
> other shutdowns" and will see, what happens,
> 
> Best regards,
> Meino
> 
> 
> 
> *) http://www.acmesystems.it/qa
> 

Also AFAICT the -H option just set an env variable INIT_HALT and it looks like 
OpenRC ignores it so look at your init scripts on Debian and see what it does 
when it is set.

-- 
Fernando Rodriguez
frodriguez.develo...@outlook.com
PGP Key: http://keys.gnupg.net/pks/lookup?op=get&search=0xF6CE157FF9525C1C

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread Fernando Rodriguez
On Monday, December 01, 2014 7:34:35 PM meino.cra...@gmx.de wrote:
> Dale  [14-12-01 19:16]:
> > meino.cra...@gmx.de wrote:
> > > Hi,
> > >
> > > another >sigh< from an Arietta adventure...
> > >
> > > I sintalled Gentoo on an Arietta G25
> > > (http://www.acmesystems.it/arietta).
> > >
> > > For this I used Robert Nelsons Kernel for armv5tel platforms,
> > > which boots fine (using at91bootstrap, no U-Boot). 
> > >
> > > But: Shutdown (as recommmended by acmesystems "shutdown -h -H now")
> > > REBOOTS the system instead of powering it down.
> > >
> > > The hardware is not to blame: Using the original Debian rootfs
> > > and the kernel 3.16.1 (Robert Nelsons kernel is 3.17.3.) the
> > > powerdown works fine.
> > >
> > > Firstly I blamed the kernel...but when using the 3.16.1 kernel
> > > and the Gentoo rootfs the problem remains.
> > >
> > > Then I copied the Gentoo shutdown to the Debian rootfs, boot that
> > > and tries to shutdown the Debian Linux with it.
> > > shutdown cries "no /dev/initctl" adn shutdowns the system only for
> > > rebooting it.
> > >
> > > Ok...seems to be the shutdown executable.
> > >
> > > I copied the Debian shutdown to Gentoo and tries that:
> > > The systems reboots.
> > >
> > > Slowly but surely I begin to think, that I dont understand anything at 
all of
> > > It would be relly good news, 
> > > that...
> > >
> > > "man shutdown" on the Debian image informs me, that the manpages
> > > were not installed (embedded system...). Shutdown --version gives
> > > a short help of the usual options...but nothing more.
> > >
> > > What is the difference here? 
> > > Isn't it, that all shutdown applications only send some instructions
> > > to the kernel and the kernel is the main actor in bringing the system
> > > down?
> > >
> > > Is there any shutdown guru ;) out there, who is able to shed some
> > > light into this problem ? :)
> > >
> > > Thank you very much in advance for any torch send into my direction!
> > > Best regards,
> > > Meino
> > >
> > 
> > Just shooting in the dark here, try -h and -H but not at the same time? 
> > Maybe having both is clashing in some weird way???
> > 
> > Dale
> > 
> > :-)  :-) 
> > 
> 
> Hi Dale,
> 
> The "Trouble shooting FAQ"*)  by acmesystems explicitely say "shutdown -h
> -H now" (and it works with the Debian rootfs)...but I will try "the
> other shutdowns" and will see, what happens,
> 
> Best regards,
> Meino
> 
> 
> 
> *) http://www.acmesystems.it/qa
> 

Looking at the code for sysvinit, all shutdown  does is set some environment 
variables and switch runlevel. The actual shutdown is done by halt and it's 
done through the reboot system call with RB_POWER_OFF.

So, since you said the Gentoo system doesn't work even with Debian's kernel 
and the shutdown, then it must be that either Debian has a different halt, or 
more likely your Gentoo system calls halt with different options. So check your 
inittab on Gentoo and make sure it calls halt in the same way.

-- 
Fernando Rodriguez
frodriguez.develo...@outlook.com
PGP Key: http://keys.gnupg.net/pks/lookup?op=get&search=0xF6CE157FF9525C1C

signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread meino . cramer
Jc García  [14-12-01 20:36]:
> 2014-12-01 12:40 GMT-06:00  :
> > Rich Freeman  [14-12-01 19:16]:
> >> On Mon, Dec 1, 2014 at 12:46 PM,   wrote:
> >> > What is the difference here?
> >> > Isn't it, that all shutdown applications only send some instructions
> >> > to the kernel and the kernel is the main actor in bringing the system
> >> > down?
> >> >
> >>
> >> About the only thing the kernel might have a role in is turning off
> >> the power.  Almost all of the shutdown logic is in userspace and it
> >> isn't surprising that copying scripts between distros is going to
> >> cause issues since the whole service management component varies
> >> GREATLY across distros.  Maybe if you're using systemd you could copy
> >> between distros since that is more standardized, but even then there
> >> can be differences.
> >>
> >> In a traditional sysvinit system usually shutting down is accomplished
> >> by changing runlevels, which immediately starts/stops anything in
> >> inittab (generally only gettys) and calls a script which does all the
> >> actual work.
> >>
> >> If the issue is that userspace shuts down fine but the system reboots
> >> instead of powering off that could be a couple of things which
> >> shouldn't be too hard to track down.  An obvious question is whether
> >> the hardware even supports being powered off in the first place - this
> >> isn't an ATX motherboard.  Powering off a system can sometimes be
> >> remarkably tricky depending on how standardized the platform is.  I
> >> was reading an article on it a few years ago and I think linux
> >> actually implements several different mechanisms that get tried in
> >> series, with the final fallback being a halt without powering off.
> >>
> >> --
> >> Rich
> >>
> >
> > Hi Rich,
> >
> > AH! :) Thanks for the informations!
> >
> > From what you say, it is a kernel problem, since the kernel
> > is the one who switches off the lights...
> >
> > But even if I use the same kernel as used for the Debian system
> > it does not work...
> >
> > May be shutdown says "power off the system" and the kernel understands
> > "reboot the system"?
> > I mean: In principle the kernel would be able to poweroff the system
> > but there are some communications difficulties with the guys from
> > userland? ;)
> >
> > Best regards,
> > Meino
> >
> >
> >
> I've always turned off across linux distros (BSD is other story) with:
> 
> # shutdown -hP now
> 
> the help says :
>  -h:  halt after shutdown.
>  -P:  halt action is to turn off power.
>  -H:  halt action is to just halt.
> 
> I've not seen you using the -P flag.
> 

That's why the manufacturer of the Arietta G25 - Acmesystems said
to use shutdown -h -H now for that purpose:
http://www.acmesystems.it/qa
Second question below the title "Arietta G25 just on top of the
page...




Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread Jc García
2014-12-01 12:40 GMT-06:00  :
> Rich Freeman  [14-12-01 19:16]:
>> On Mon, Dec 1, 2014 at 12:46 PM,   wrote:
>> > What is the difference here?
>> > Isn't it, that all shutdown applications only send some instructions
>> > to the kernel and the kernel is the main actor in bringing the system
>> > down?
>> >
>>
>> About the only thing the kernel might have a role in is turning off
>> the power.  Almost all of the shutdown logic is in userspace and it
>> isn't surprising that copying scripts between distros is going to
>> cause issues since the whole service management component varies
>> GREATLY across distros.  Maybe if you're using systemd you could copy
>> between distros since that is more standardized, but even then there
>> can be differences.
>>
>> In a traditional sysvinit system usually shutting down is accomplished
>> by changing runlevels, which immediately starts/stops anything in
>> inittab (generally only gettys) and calls a script which does all the
>> actual work.
>>
>> If the issue is that userspace shuts down fine but the system reboots
>> instead of powering off that could be a couple of things which
>> shouldn't be too hard to track down.  An obvious question is whether
>> the hardware even supports being powered off in the first place - this
>> isn't an ATX motherboard.  Powering off a system can sometimes be
>> remarkably tricky depending on how standardized the platform is.  I
>> was reading an article on it a few years ago and I think linux
>> actually implements several different mechanisms that get tried in
>> series, with the final fallback being a halt without powering off.
>>
>> --
>> Rich
>>
>
> Hi Rich,
>
> AH! :) Thanks for the informations!
>
> From what you say, it is a kernel problem, since the kernel
> is the one who switches off the lights...
>
> But even if I use the same kernel as used for the Debian system
> it does not work...
>
> May be shutdown says "power off the system" and the kernel understands
> "reboot the system"?
> I mean: In principle the kernel would be able to poweroff the system
> but there are some communications difficulties with the guys from
> userland? ;)
>
> Best regards,
> Meino
>
>
>
I've always turned off across linux distros (BSD is other story) with:

# shutdown -hP now

the help says :
 -h:  halt after shutdown.
 -P:  halt action is to turn off power.
 -H:  halt action is to just halt.

I've not seen you using the -P flag.



Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread meino . cramer
Rich Freeman  [14-12-01 19:16]:
> On Mon, Dec 1, 2014 at 12:46 PM,   wrote:
> > What is the difference here?
> > Isn't it, that all shutdown applications only send some instructions
> > to the kernel and the kernel is the main actor in bringing the system
> > down?
> >
> 
> About the only thing the kernel might have a role in is turning off
> the power.  Almost all of the shutdown logic is in userspace and it
> isn't surprising that copying scripts between distros is going to
> cause issues since the whole service management component varies
> GREATLY across distros.  Maybe if you're using systemd you could copy
> between distros since that is more standardized, but even then there
> can be differences.
> 
> In a traditional sysvinit system usually shutting down is accomplished
> by changing runlevels, which immediately starts/stops anything in
> inittab (generally only gettys) and calls a script which does all the
> actual work.
> 
> If the issue is that userspace shuts down fine but the system reboots
> instead of powering off that could be a couple of things which
> shouldn't be too hard to track down.  An obvious question is whether
> the hardware even supports being powered off in the first place - this
> isn't an ATX motherboard.  Powering off a system can sometimes be
> remarkably tricky depending on how standardized the platform is.  I
> was reading an article on it a few years ago and I think linux
> actually implements several different mechanisms that get tried in
> series, with the final fallback being a halt without powering off.
> 
> --
> Rich
> 

Hi Rich,

AH! :) Thanks for the informations! 

>From what you say, it is a kernel problem, since the kernel
is the one who switches off the lights...

But even if I use the same kernel as used for the Debian system
it does not work...

May be shutdown says "power off the system" and the kernel understands
"reboot the system"?
I mean: In principle the kernel would be able to poweroff the system
but there are some communications difficulties with the guys from
userland? ;)

Best regards,
Meino





Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread meino . cramer
Dale  [14-12-01 19:16]:
> meino.cra...@gmx.de wrote:
> > Hi,
> >
> > another >sigh< from an Arietta adventure...
> >
> > I sintalled Gentoo on an Arietta G25
> > (http://www.acmesystems.it/arietta).
> >
> > For this I used Robert Nelsons Kernel for armv5tel platforms,
> > which boots fine (using at91bootstrap, no U-Boot). 
> >
> > But: Shutdown (as recommmended by acmesystems "shutdown -h -H now")
> > REBOOTS the system instead of powering it down.
> >
> > The hardware is not to blame: Using the original Debian rootfs
> > and the kernel 3.16.1 (Robert Nelsons kernel is 3.17.3.) the
> > powerdown works fine.
> >
> > Firstly I blamed the kernel...but when using the 3.16.1 kernel
> > and the Gentoo rootfs the problem remains.
> >
> > Then I copied the Gentoo shutdown to the Debian rootfs, boot that
> > and tries to shutdown the Debian Linux with it.
> > shutdown cries "no /dev/initctl" adn shutdowns the system only for
> > rebooting it.
> >
> > Ok...seems to be the shutdown executable.
> >
> > I copied the Debian shutdown to Gentoo and tries that:
> > The systems reboots.
> >
> > Slowly but surely I begin to think, that I dont understand anything at all 
> > of
> > It would be relly good news, 
> > that...
> >
> > "man shutdown" on the Debian image informs me, that the manpages
> > were not installed (embedded system...). Shutdown --version gives
> > a short help of the usual options...but nothing more.
> >
> > What is the difference here? 
> > Isn't it, that all shutdown applications only send some instructions
> > to the kernel and the kernel is the main actor in bringing the system
> > down?
> >
> > Is there any shutdown guru ;) out there, who is able to shed some
> > light into this problem ? :)
> >
> > Thank you very much in advance for any torch send into my direction!
> > Best regards,
> > Meino
> >
> 
> Just shooting in the dark here, try -h and -H but not at the same time? 
> Maybe having both is clashing in some weird way???
> 
> Dale
> 
> :-)  :-) 
> 

Hi Dale,

The "Trouble shooting FAQ"*)  by acmesystems explicitely say "shutdown -h
-H now" (and it works with the Debian rootfs)...but I will try "the
other shutdowns" and will see, what happens,

Best regards,
Meino



*) http://www.acmesystems.it/qa



Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread Dale
meino.cra...@gmx.de wrote:
> Hi,
>
> another >sigh< from an Arietta adventure...
>
> I sintalled Gentoo on an Arietta G25
> (http://www.acmesystems.it/arietta).
>
> For this I used Robert Nelsons Kernel for armv5tel platforms,
> which boots fine (using at91bootstrap, no U-Boot). 
>
> But: Shutdown (as recommmended by acmesystems "shutdown -h -H now")
> REBOOTS the system instead of powering it down.
>
> The hardware is not to blame: Using the original Debian rootfs
> and the kernel 3.16.1 (Robert Nelsons kernel is 3.17.3.) the
> powerdown works fine.
>
> Firstly I blamed the kernel...but when using the 3.16.1 kernel
> and the Gentoo rootfs the problem remains.
>
> Then I copied the Gentoo shutdown to the Debian rootfs, boot that
> and tries to shutdown the Debian Linux with it.
> shutdown cries "no /dev/initctl" adn shutdowns the system only for
> rebooting it.
>
> Ok...seems to be the shutdown executable.
>
> I copied the Debian shutdown to Gentoo and tries that:
> The systems reboots.
>
> Slowly but surely I begin to think, that I dont understand anything at all of
> It would be relly good news, 
> that...
>
> "man shutdown" on the Debian image informs me, that the manpages
> were not installed (embedded system...). Shutdown --version gives
> a short help of the usual options...but nothing more.
>
> What is the difference here? 
> Isn't it, that all shutdown applications only send some instructions
> to the kernel and the kernel is the main actor in bringing the system
> down?
>
> Is there any shutdown guru ;) out there, who is able to shed some
> light into this problem ? :)
>
> Thank you very much in advance for any torch send into my direction!
> Best regards,
> Meino
>

Just shooting in the dark here, try -h and -H but not at the same time? 
Maybe having both is clashing in some weird way???

Dale

:-)  :-) 



Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25

2014-12-01 Thread Rich Freeman
On Mon, Dec 1, 2014 at 12:46 PM,   wrote:
> What is the difference here?
> Isn't it, that all shutdown applications only send some instructions
> to the kernel and the kernel is the main actor in bringing the system
> down?
>

About the only thing the kernel might have a role in is turning off
the power.  Almost all of the shutdown logic is in userspace and it
isn't surprising that copying scripts between distros is going to
cause issues since the whole service management component varies
GREATLY across distros.  Maybe if you're using systemd you could copy
between distros since that is more standardized, but even then there
can be differences.

In a traditional sysvinit system usually shutting down is accomplished
by changing runlevels, which immediately starts/stops anything in
inittab (generally only gettys) and calls a script which does all the
actual work.

If the issue is that userspace shuts down fine but the system reboots
instead of powering off that could be a couple of things which
shouldn't be too hard to track down.  An obvious question is whether
the hardware even supports being powered off in the first place - this
isn't an ATX motherboard.  Powering off a system can sometimes be
remarkably tricky depending on how standardized the platform is.  I
was reading an article on it a few years ago and I think linux
actually implements several different mechanisms that get tried in
series, with the final fallback being a halt without powering off.

--
Rich