Possible Bug, or Possibly don't know what I'm doing.
Denis Vlasenko
vda.linux at googlemail.com
Tue Feb 6 01:40:35 UTC 2007
On Monday 05 February 2007 19:25, Andy Kennedy wrote:
> Luciano Miguel Ferreira Rocha wrote:
> > On Wed, Jan 31, 2007 at 04:51:44PM -0600, Andy Kennedy wrote:
> >
> >> Anyone have ANY idea about this??? Anyone else have a buildroot/busybox
> >> setup that uses a serial console?
> >>
> > 3. boot scripts set serial speed:
> > for d in /dev/ttyS* /dev/ttyAM* /dev/ttyUSB*; do
> > [ -e "$d" ] && stty -F $d ospeed 57600
> > done
>
> Attempted this. Didn't help. To restate my problem (in case some kind
> developer decides to help me):
>
> When I have the kernel command line parameter "console=ttyS0,115200n8" I
> get nice neat output on the serial line up until the init runs. As soon
> as init runs, I get missing chars. So, I replace the BusyBox init with
> minit, compiled from source and using the uCLibC gcc that I let
> buildroot make for me. Same problem. For some reason, when the system
> initializes -- after the kernel has reported all of its output, my
> serial console goes splat. When I initialize the console using BusyBox
> (/sbin/getty -L ttyS0 115200 vt100) I get "X n", where X is {'i', 'g',
> 's', 'o', 'l', 'm'}, but I cannot find a pattern in it. One of these
> letters will appear each time I send enter.
>
> I have tried everything I can think of. There is no script setting any
> of the line speeds -- in fact, I have even attempted to remove the
> scripts and still get the same thing. Removing the
> console=ttyS0,115200n8 (or attempting any variant of it) has no affect,
> except without the console= I get no good output on the line. The only
> thing I haven't attempted yet is to replace the getty with an equivalent
> to see if that makes a difference. I have also tried 9600, 38400,
> 19200, with E8, O8, 2 stop bits, and 1 stop bit in just about every
> combination, but I still cannot get a serial console.
>
> Can anyone offer a suggestion as to how I might fix this -- or some
> other place to start?
Does booting with init=/bin/sh work? If yes, then try to run with
init=/a/shell/script, where script is:
#!/bin/sh
# ...stty, setserial, whatever else you want to experiment with...
getty -L ttyS0 115200
echo "Getty exited..."
# So that we can continue experimenting...
sh
or even
#!/bin/sh
# This is the "debug shell"
sh </dev/tty12 >/dev/tty12 2>&1 &
exec /sbin/init
then debug stuff using that shell on vt #12 (strace, kernel logs, etc)
Also, using console=ttyS0 is not very commot, so you may want to tap
much wider userbase by posting to lkml.
--
vda
More information about the busybox
mailing list