Gentoo Archives: gentoo-user

From: Matti Nykyri <matti.nykyri@×××.fi>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25
Date: Mon, 01 Dec 2014 22:08:41
Message-Id: AC4663A4-6E44-4A36-8444-A8BF36CF5E55@iki.fi
In Reply to: Re: [gentoo-user] Shutdown, Gentoo and the Arietta.G25 by Fernando Rodriguez
1 > On Dec 1, 2014, at 23:03, Fernando Rodriguez <frodriguez.developer@×××××××.com> wrote:
2 >
3 >> On Monday, December 01, 2014 7:34:35 PM meino.cramer@×××.de wrote:
4 >> Dale <rdalek1967@×××××.com> [14-12-01 19:16]:
5 >>> meino.cramer@×××.de wrote:
6 >>>> Hi,
7 >>>>
8 >>>> another >sigh< from an Arietta adventure...
9 >>>>
10 >>>> I sintalled Gentoo on an Arietta G25
11 >>>> (http://www.acmesystems.it/arietta).
12 >>>>
13 >>>> For this I used Robert Nelsons Kernel for armv5tel platforms,
14 >>>> which boots fine (using at91bootstrap, no U-Boot).
15 >>>>
16 >>>> But: Shutdown (as recommmended by acmesystems "shutdown -h -H now")
17 >>>> REBOOTS the system instead of powering it down.
18 >>>>
19 >>>> The hardware is not to blame: Using the original Debian rootfs
20 >>>> and the kernel 3.16.1 (Robert Nelsons kernel is 3.17.3.) the
21 >>>> powerdown works fine.
22 >>>>
23 >>>> Firstly I blamed the kernel...but when using the 3.16.1 kernel
24 >>>> and the Gentoo rootfs the problem remains.
25 >>>>
26 >>>> Then I copied the Gentoo shutdown to the Debian rootfs, boot that
27 >>>> and tries to shutdown the Debian Linux with it.
28 >>>> shutdown cries "no /dev/initctl" adn shutdowns the system only for
29 >>>> rebooting it.
30 >>>>
31 >>>> Ok...seems to be the shutdown executable.
32 >>>>
33 >>>> I copied the Debian shutdown to Gentoo and tries that:
34 >>>> The systems reboots.
35 >>>>
36 >>>> Slowly but surely I begin to think, that I dont understand anything at
37 > all of
38 >>>> It would be relly good news,
39 >>>> that...
40 >>>>
41 >>>> "man shutdown" on the Debian image informs me, that the manpages
42 >>>> were not installed (embedded system...). Shutdown --version gives
43 >>>> a short help of the usual options...but nothing more.
44 >>>>
45 >>>> What is the difference here?
46 >>>> Isn't it, that all shutdown applications only send some instructions
47 >>>> to the kernel and the kernel is the main actor in bringing the system
48 >>>> down?
49 >>>>
50 >>>> Is there any shutdown guru ;) out there, who is able to shed some
51 >>>> light into this problem ? :)
52 >>>>
53 >>>> Thank you very much in advance for any torch send into my direction!
54 >>>> Best regards,
55 >>>> Meino
56 >>>
57 >>> Just shooting in the dark here, try -h and -H but not at the same time?
58 >>> Maybe having both is clashing in some weird way???
59 >>>
60 >>> Dale
61 >>>
62 >>> :-) :-)
63 >>
64 >> Hi Dale,
65 >>
66 >> The "Trouble shooting FAQ"*) by acmesystems explicitely say "shutdown -h
67 >> -H now" (and it works with the Debian rootfs)...but I will try "the
68 >> other shutdowns" and will see, what happens,
69 >>
70 >> Best regards,
71 >> Meino
72 >>
73 >>
74 >>
75 >> *) http://www.acmesystems.it/qa
76 >
77 > Looking at the code for sysvinit, all shutdown does is set some environment
78 > variables and switch runlevel. The actual shutdown is done by halt and it's
79 > done through the reboot system call with RB_POWER_OFF.
80 >
81 > So, since you said the Gentoo system doesn't work even with Debian's kernel
82 > and the shutdown, then it must be that either Debian has a different halt, or
83 > more likely your Gentoo system calls halt with different options. So check your
84 > inittab on Gentoo and make sure it calls halt in the same way.
85
86 Hi meino
87
88 The thing is as Fernando pointed out:
89
90 Kernel powers off the hardware and a system call is used to instruct kernel to do so.
91
92
93 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...
94
95 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.
96
97 --
98 -Matti