[BusyBox] System doesn't halt/reboot
Jean Wolter
jean.wolter at inf.tu-dresden.de
Mon Oct 14 06:06:03 UTC 2002
Hi,
"John Hall" <john.hall at optionexist.co.uk> writes:
> I'm using busybox 0.60.4 on a Strongarm running Linux
> 2.4.18-rmk7. My problem is that busybox init hangs during halt.
> [...]
> Has anyone come across a similar problem?
On x86 the kernel panics if someone tells init to halt the
system. Init makes a system shutdown (shutdown_system()) and executes
init_reboot(RB_HALT_SYSTEM);
At this point the kernel panics. It executes:
printk(KERN_EMERG "System halted.\n");
machine_halt();
do_exit(0);
break;
machine_halt() is an empty function on x86 so it immediatly
returns. The kernel calls do_exit, do_exit detects that for some
reasons init is trying to kill itself and panics.
The halt command from sysv init is doing the halt operation by
itself. Maybe the busybox halt should do the same?
if (do_reboot) {
init_reboot(BMAGIC_REBOOT);
} else {
/*
* Turn on hard reboot, CTRL-ALT-DEL will reboot now
*/
init_reboot(BMAGIC_HARD);
/*
* Stop init; it is insensitive to the signals sent
* by the kernel.
*/
kill(1, SIGTSTP);
/*
* Halt or poweroff.
*/
if (do_poweroff)
init_reboot(BMAGIC_POWEROFF);
/*
* Fallthrough if failed.
*/
init_reboot(BMAGIC_HALT);
}
regards,
Jean
More information about the busybox
mailing list