[Clfs-support] Cannot login on serial port (embedded ARM, busybox)

Lance Jump lancej29 at gmail.com
Fri Oct 14 15:40:07 PDT 2011


On Fri, Oct 14, 2011 at 4:14 PM, Andrew Bradford <bradfa at gmail.com> wrote:

> On Fri, Oct 14, 2011 at 3:44 PM, Lance Jump <lancej29 at gmail.com> wrote:
> > I started from a brand new Ubuntu 10.04LTS installation and have gotten
> to
> > the same point.  I am beginning to suspect that it has something to do
> with
> > my linux configuration since that is the one part that is not covered in
> > detail so I would be easy for me to mess up.  Can you send me the config
> > file from your working Beagle Board build?  Or any build based on the
> latest
> > ARM CLFS?
>
> I'm not sure if I have a super recent kernel config file, but one that
> should work for a BeagleBoard-xM is located:
> https://gist.github.com/869020
>
> A make oldconfig should work to fix up anything that changed between
> the rc release that's from and the 2.6.38.2 in the book.
>
> A complete stab in the dark, but do you have any framebuffers built
> into your kernel?  If so, maybe that's where the login goes?
> I'm also starting to think your kernel config might be the issue.  Any
> chance you can get a manufacturer supplied kernel config?
>

I don't think I have any frame buffers built in to the kernel.  Also, I
checked connected the VGA out to a monitor and nothing is coming out there.

The board I have is the OpenRD client. It is based on the Marvell Kirkwood,
which is the same processor used in the PlugComputer.  I have a config file
for an older kernel (2.6.18).  I am having some trouble finding anything for
the OpenRD for 2.6.38.

The reason I wanted a working config from the CLFS build is so that I can
check non-hardware related things like devpts and tmpfs settings.  I
compared the one you sent to mine and found numerous non-hardware related
differences.

I went through and changed my config file to match, except for those items
that were unique to the processor/platform.  Nothing really changed.

>
> > I found what I believe are two additional bugs, but I don't either are
> the
> > cause of the problem.  The first is in section 16.2 where has the
> > /dev/console and null nodes made in ${CLFS}.  I think they should be made
> in
> > ${CLFS}-final at that point.
>
> I think you might be right.  Can you either open a trac ticket or send
> a patch to -dev?
> Would it be worthwhile to create these nodes before ${CLFS}-final
> comes into play? (I think yes, if this is a problem)
>

I think since the ${CLFS}-final has already been created at that point and
there are other things being fixed up for it, that doing it in -final makes
the most sense.

I will try to get either the trac ticket or patch this weekend.  Does the
protocol require a trac ticket against which to submit the patch?

>
> Also, try booting without these nodes (once your booting works, maybe
> this is the issue?), see if it works for you.  On my BeagleBoard-xM I
> don't need them.  But then I heard rumblings on IRC that they are
> actually needed.  I'm not sure what to think.  Any input would be
> welcome.
>

Actually, I had originally tried booting without these nodes before I
discovered the problem.  There was really no difference -- it didn't work in
either case.

I have done some more experimenting and found some interesting things.
First, with only console and null in /dev I get repeated "Can't open
/dev/tty1: No such file or directory" (tty1..6) messages.  When I create
these nodes, the messages go away.

Then I get a "Please press Enter to activate this console." message probably
because I used askfirst in the inittab line for ttyS0. If I hit enter, the
message comes back about 30 seconds later.  This is because I don't have a
ttyS0 node. If add that node, I then get a login prompt. When I login, it
displays a message like it logged in and then returns to the "Please press
Enter..." prompt:

Please press Enter to activate this console.

DB88FXX81 login: root

Jan  2 06:34:22 login[597]: root login on 'ttyS0'

Please press Enter to activate this console.

I can replace the sysinit line in inittab with just about anything else (for
example "mount -a" or "/bin/busybox --help" and it appears to do exactly
what is expected. In fact, I used the "mount -a" to locate missing mount
points in /dev (/dev/pts and /dev/shm).

I can also use various commands other than getty for the other lines in
inittab and they do as expected. For example if I used "touch /tmp/test" it
creates or updates the file /tmp/test. I seem to be able to do most things,
but I just can seem to execute a script no matter how simple.  For example,
if I put the touch command in a script file and try to execute it, it does
nothing.

Another interesting things is that device detection for things like USB mice
and thumb drives and SD cards all appears to work except that none of it is
ever mounted.  The drives are identified from driver messages as sda, sda1,
sdb... but nothing ever appears in the /dev directory.  By the way, this is
also an indication that the kernel believes the serial port to be the
console.

Another experiment was to change the baud rate in the getty line of inittab
to 9600 (from 115200 used at boot). When I do that, I get the original
prompt at 115200, but then have to switch the terminal to 9600 to get the
login prompt. And the terminal remains at 9600.


> > The other is in the clfs-embedded-bootscripts Makfile.  The line:
> >
> >    install -d -m ${DIRMODE} ${EXTDIR}/rc.d/{init.d,start,stop}
> >
> > appears to actually make a directory named "{init.d,start,stop}" instead
> of
> > three directories.
>
> Yeah...  That's a problem.  The bootscripts referenced by the book are
> out of date.  That needs to be fixed.  For now, grab a copy from the
> bootscripts git repo and use that.  That has the fix for this.  Some
> systems will work fine with the curly bracket expansion, others won't.
>  Most recent commit was to fix this exact problem, must have been that
> a tarball wasn't created after that update.  Probably worth opening a
> trac ticket for this, building the tarball should really be automated
> like building of the books are using a post commit hook...
>
> http://git.cross-lfs.org/?p=bootscripts-embedded.git
>

I have created a "private patch" for this just to keep going.  I should
eventually get the most recent of everything, but I prefer to use
tested/mature code.


> -Andrew
> _______________________________________________
> Clfs-support mailing list
> Clfs-support at lists.cross-lfs.org
> http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clfs.org/pipermail/clfs-support-clfs.org/attachments/20111014/b76967ed/attachment-0001.htm>


More information about the Clfs-support mailing list