busybox init() hangs on embedded Linux on custom FPGA board
Peter N. Andreasen
peterarbejde at gmail.com
Tue Oct 17 01:55:46 PDT 2006
>
> Peter N. Andreasen wrote:
> > > Hello list, this may be a newvbie question, bear with me:
> > > I have built a 2.4 Linux kernel for a PowerPC405 which is part of a
> > > custom Xilinx FPGA board. It is based on the ML300 board. A major
> > > difference which I think is giving me the problems is that it does not
> > > have a normal UART and thus a ttyS0 but a Xuartlite which becomes
> > > /dev/ttl0. It does not have a display.
> > > When I configure the kernel I set boot parameter console=ttl0 and I
> > > get all the messages to the serial console as expected. The system
> > > uses a ramdisk which has the busybox binary statically linked, and all
> > > the device files I could think of could be necessary. /dev/ttl0 is
> > > created as major 207, minor 187 char device.
> > > But as soon as the kernel launches my busybox I get problems. I get a
> > > start up message showing the version of Busybox (I use the latest
> > > stable version) and a "Bummer can not write to ttyS5" and then it
> > > stops. By inserting message() calls in init() I have traced the
> > > problem to parse_inittab where it opens my inittab file ok but when it
> > > tries to read the first line from the file it traps. The console still
> >
> > > echoes back what I type but nothing further is happening.
> > > Hope someone can give me an idea.
> >
> > Make sure you have a static /dev/ttyL0 entry, and add to the kernel line
> > CONSOLE=/dev/ttyl0 - this is in addition to the console=ttyl0,baudrate
> > entry....
> >
> > --Yan
>
>
Hello llist,
I thought I had a problem linking to the correct version of libc, and could
not find the LIBCDIR setting in the 1.2.1 version of Busybox.
So I have built version 1.0 of Busybox, and to make sure it uses the
uartlite device for console I put this in libb.h:
# define CURRENT_VC "/dev/ttl0"
# define VC_1 "/dev/ttl1"
# define VC_2 "/dev/ttl2"
# define VC_3 "/dev/ttl3"
# define VC_4 "/dev/ttl4"
# define VC_5 "/dev/ttl5"
# define SC_0 "/dev/ttl0"
# define SC_1 "/dev/ttl1"
# define SC_FORMAT "/dev/ttl%d"
# define VC_FORMAT "/dev/ttl%d"
now I got an assert() from the Xilinx Uartlite driver:
...
init started: Bu
<2>Xilinx OS Independent Code XAssert: xuartlite.c:194
Code may crash due to unhandled errors.
...
and the system stops.
The check made in the driver is for a 0 length string. If I change it to
ignore that, the console show this instead:
init started: Bu
init started: B
trying to run init_process
...
(the "trying to run init process" is a message I put in run_init_process in
init.c in the kernel)
Now my question is:
What exactly are the device nodes I have to make in /dev/ on the ramdisk on
target? I made a ttl, ttl0, and tty which have major 204/minor 187, and
ttl1, ttl2 minor 188 and 189.
Hope someone can help me on this
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/busybox/attachments/20061017/51be93d8/attachment-0001.htm
More information about the busybox
mailing list