On Tuesday 17 March 2009 18:27, Zachár Balázs wrote:
> Hi,
> 
> I have a pxa270 based board, and I would like to renew the system on it...
> I am using the emdebian's stable gnueabi cross-toolchain.
> I have already recompile the kernel (both latest stable (2.6.28.7) and 
> testing (2.6.29-rc8)) and it works (boot up) now...
> 
> I would like to use Busybox to init (and to many other :) )...
> 
> I made a new root-filesystem structure, and I compiled a Busybox with the 
> same cross-toolchain which I used to compile the new kernel...
> 
> But when I would like to boot up I get this error message:
> VFS: Mounted root (nfs filesystem) on device 0:11.
> Freeing init memory: 96K
> Warning: unable to open an initial console.
> Kernel panic - not syncing: Attempted to kill init!

Look carefully: it does not say it cannot find /sbin/init.
It says that it cannot open /dev/console,
and then it says that *init exited*.

> So I compile this code to static using the cross-toolchain:
> devel:/opt/rootfs# cat test_init.c
> #include <stdio.h>
> 
> int main()
> {
>   printf("Hello world!\n");

In order to exclude the possibility of stdio bug triggering,
use write(1, "Hello world!\n", 12) instead.

>   while(1);
>   return 0;
> }
> 
> And I copy it to my nfsroot/sbin/init
> 
> I make two dev file (because I have my console on ttyS1 (kernel param: 
> console=ttyS1,115200)):
> devel:~# ll /nfsroot/root/dev/console
> crw------- 1 root tty 5, 1 2009-03-17 18:30 /nfsroot/root/dev/console
> devel:~# ll /nfsroot/root/dev/ttyS1
> crw-rw---- 1 root dialout 4, 65 2009-02-20 11:10 /nfsroot/root/dev/ttyS1

Major/minor numbers look correct, but
why they are in /nfsroot/root/dev instead of /nfsroot/dev?

> Than I tried to boot up, but I got the same error like above:
> Kernel panic - not syncing: Attempted to kill init!

Do you still get "Warning: unable to open an initial console"
just above this line? If yes, this is definitely a problem
with /dev/console not being found.

This will also make all init's messages to not be visible.

However, it won't make init exit. This is a bit strange
that it exits.

> When I using the new kernel, with the old/orig rootfs (it is using busybox 
> too) content it boot up properly... But I would like to build a new system!
> 
> Any Idea, where should I try?

Another possibility is that your toolchain generates
broken (crashing) executables (wrong CPU flavor selected, etc).

If you have known working ("old") toolchain, build
minimal-static-init-for-testing using it,
but install it on new system. If it boots and you see
"Hello world" (after you fixed "Warning: unable to open
an initial console" problem), this confirms the theory
about broken toolchain. Then use objdump and readelf
to compare executables and find out what is wrong.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to