Discussion:
[BusyBox] poweroff without init not possible?
Alfred Zastow
2003-09-21 15:59:18 UTC
Permalink
Hi List,

for an embedded system (vdr) I don't need a real init.

I built a testing environiment in which '/bin/init' is only a shell
script, which loads some drivers and starts the main application.

busybox 1.00-pre3 was configured without init, but with poweroff, halt
and reboot. But the last three commands doesn't work without init.

Does someone has a solution?


BTW. This topic was discussed 2 month ago, but a posted patch is outdated.



best regards
Alfred
Kianusch Sayah Karadji
2003-09-22 16:33:00 UTC
Permalink
Post by Alfred Zastow
for an embedded system (vdr) I don't need a real init.
I built a testing environiment in which '/bin/init' is only a shell
script, which loads some drivers and starts the main application.
busybox 1.00-pre3 was configured without init, but with poweroff, halt
and reboot. But the last three commands doesn't work without init.
Does someone has a solution?
Kompile ACPI in your embedded kernel and use ACPI to reboot/halt/poweroff
... but you need to umount the filesystems and stop the processes
yourself.

And depending on your Hardware ACPI might not work at all.
Kianusch Sayah Karadji
2003-09-23 05:19:16 UTC
Permalink
Post by Kianusch Sayah Karadji
Post by Alfred Zastow
Does someone has a solution?
Kompile ACPI in your embedded kernel and use ACPI to reboot/halt/poweroff
... but you need to umount the filesystems and stop the processes
yourself.
And depending on your Hardware ACPI might not work at all.
Thanks, but I have an ACPI enabled system.
Switching off using 'poweroff' isn't a problem when I compile busybox
with init and when I use this init. But I only want to start a simple
script. :-(
So just use follwing "script"

#! /bin/sh
echo 5 > /proc/sys/acpi/sleep

to poweroff the system.

Again this only takes care of powering down the system. This does not
unmount any filesystems or shutdown any processes in a save way - so using
this command inproperly may corrupt your system.

AND ... I have not tested this command myself, but according to the ACPI
specifications and Linux documentations this should work - and make sure
to use a recent ACPI implementation on Linux (kernel 2.4.22 would be a
good choise, because 2.4.22 has a pretty recent ACPI Stack)

Gr??e
Kianusch
Kianusch Sayah Karadji
2003-09-23 06:27:24 UTC
Permalink
Post by Kianusch Sayah Karadji
Post by Alfred Zastow
Does someone has a solution?
Kompile ACPI in your embedded kernel and use ACPI to reboot/halt/poweroff
... but you need to umount the filesystems and stop the processes
yourself.
And depending on your Hardware ACPI might not work at all.
Thanks, but I have an ACPI enabled system.
Switching off using 'poweroff' isn't a problem when I compile busybox
with init and when I use this init. But I only want to start a simple
script. :-(
So just use follwing "script"

#! /bin/sh
echo 5 > /proc/sys/acpi/sleep

to poweroff the system.

Again this only takes care of powering down the system. This does not
unmount any filesystems or shutdown any processes in a save way - so using
this command inproperly may corrupt your system.

AND ... I have not tested this command myself, but according to the ACPI
specifications and Linux documentations this should work - and make sure
to use a recent ACPI implementation on Linux (kernel 2.4.22 would be a
good choise, because 2.4.22 has a pretty recent ACPI Stack)

Gr??e
Kianusch

Alfred Zastow
2003-09-21 17:01:03 UTC
Permalink
Hi List,

for an embedded system (vdr) I don't need a real init.

I built a testing environiment in which '/bin/init' is only a shell
script, which loads some drivers and starts the main application.

busybox 1.00-pre3 was configured without init, but with poweroff, halt
and reboot. But the last three commands doesn't work without init.

Does someone has a solution?


BTW. This topic was discussed 2 month ago, but a posted patch is outdated.



best regards
Alfred
Kianusch Sayah Karadji
2003-09-22 17:41:11 UTC
Permalink
Post by Alfred Zastow
for an embedded system (vdr) I don't need a real init.
I built a testing environiment in which '/bin/init' is only a shell
script, which loads some drivers and starts the main application.
busybox 1.00-pre3 was configured without init, but with poweroff, halt
and reboot. But the last three commands doesn't work without init.
Does someone has a solution?
Kompile ACPI in your embedded kernel and use ACPI to reboot/halt/poweroff
... but you need to umount the filesystems and stop the processes
yourself.

And depending on your Hardware ACPI might not work at all.
Loading...