[U-Boot] [OT]Need help getting Linux past init

Graeme Russ graeme.russ at gmail.com
Sat Mar 27 12:34:46 CET 2010


Peter Tyser wrote:
>> So it looks like the kernel has no problem locating /bin/sh in the JFFS2
>> partition but then the lights go out. I've also tried /bin/init - same result.
>>
> 
> What if you make an init app or script that just creates a file on the
> JFFS2 fs?  Then you could verify it was created by rebooting the board
> and inspecting the filesystem from U-Boot.  That would tell you that the

Brilliant idea!

After trying to figure out why networking stopped (note to self - don't
accidentally disable PCI Interrupts) I got NFS Root working as well and
created /bin/test_init as:

#!/bin/sh
/bin/echo hello > /tmp/test_hello

and set the kernel command line init=/bin/test_init and lo and behold it
created /tmp/test_hello exactly as expected (well, the kernel then crashed
'cause init died - lol)

I then created a jffs2 image from the NFS Root and got the same result

Very happy :)

> code is executing as expected at least.  You could dump debug output to
> this file for later use too.  If that works, it'd be interesting to know
> if a statically linked hello world app printed anything out.  If not,
> you could narrow the problem down to a serial/console issue.

I think this is where I am at. I think everything really is working except
for the serial console after control is passed to init

> 
> A JTAG/XDP debugger could help too.  Maybe dumping the printk buffer in
> Linux would show some kernel messages that never made it to your serial
> port.

I think I can debug it using NFS Root

Graeme


More information about the U-Boot mailing list