[BusyBox] busybox init hanging
Stephen Cameron
steve.cameron at hp.com
Fri May 31 12:03:03 UTC 2002
Hi,
I'm playing around with a powerpc 440GP (ebony) board...
I've got a (cross-compiled) kernel where I've modified
init/main.c (put some printk's in)
[...]
printk("Trying /sbin/init\n");
execve("/sbin/init",argv_init,envp_init);
printk("/sbin/init did not work\n");
"Trying /sbin/init" is the last thing I see.
I'm using cross compiled busybox (statically linked) as init.
I tried putting some code in busybox init_main() like:
{
int x;
x = open('/logfile", O_RDWR | O_CREAT, 0777);
write(x, "hello\n", 6);
close(x);
}
Just to see if it would create /logfile on the NFS mounted
root filesystem. It didn't. Nothing comes out on the serial
port console. My root /dev directory looks like:
total 0
crw-r--r-- 1 root root 4, 46 May 31 10:26 console
crw-r--r-- 1 root root 5, 1 May 30 16:09 console_proper
crw-r--r-- 1 root root 1, 3 May 31 10:09 null
crw-r--r-- 1 root root 5, 0 May 31 10:10 tty
crw-r--r-- 1 root root 4, 0 May 31 10:10 tty0
crw-r--r-- 1 root root 4, 64 May 30 16:09 ttyS0
(I also tried with /dev/console like /dev/console)_proper above)
So, I can't seem to seem to figure a way to get _any_ output
out anywhere from busybox, which makes it tough to debug.
I do know it is doing something different than if /sbin/init
is not there (and none of the other few things it tries to execve()
are there). In that case a kernel panic complaining
it can't find init. So it must at least succeed to some degree
with the execve() call.
Any ideas what I could try?
Thanks,
-- steve
More information about the busybox
mailing list