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

Lance Jump lancej29 at gmail.com
Mon Oct 10 07:40:44 PDT 2011


On Mon, Oct 10, 2011 at 8:03 AM, Andrew Bradford <bradfa at gmail.com> wrote:

> On Mon, Oct 10, 2011 at 1:25 AM, Lance Jump <lancej29 at gmail.com> wrote:
> >
> > I cannot login into the embedded system to work. I am using the serial
> port
> > for login. When the system boots, I get a login prompt to which I enter
> the
> > user (root -- there is currently no password for root). The system
> reports:
> >
> > Jan 1 12:53:27 login[595]: root login on 'ttyS0'
> >
> > But then immediately returns to the login prompt.
>
> Is /dev/ttyS0 really the serial port you should be using?  Check your
> bootloader (most likely uboot) to see what arguments it is passing to
> the kernel regarding console settings.  A first guess is that the
> BusyBox init is outputting its output to where ever the kernel was
> told to but then when you log in, it's doing so on ttyS0.
>

/dev/ttyS0 is the USB/serial console.  It is my only console connection to
either u-boot or Linux and all of the output appears to go there.  It is
also the "console=" in the Linux command line.  When I execute something
(inittab) other than getty (e.g. ls) the output goes there.  When I do getty
in inittab, it does put out a message saying that root logged in on
/dev/ttyS0.  Is it still possible that this connection is actually not
/dev/ttyS0?  How would I check and/or correct?  If it is not /dev/ttyS0,
what might it be?

>
> > Here is the output near
> > the end of the boot and after I try to log inL
>
> Can you provide the entire boot output including uboot output data?
> http://pastebin.cross-lfs.org/
>
Done.

>
> > I have built the system using CLFS Embedded GIT-0.0.1-20110514. I am
> > building in a chroot environment of LFS live 6.3 inside a Ubuntu 10.04
> 32bit
> > x86 bit host. The embedded system is ARM (Marvell Kirkwood OpenRD
> Client).
>
> Any reason for building inside the chroot?  Building directly on
> Ubuntu 10.04 and following the directions in the embedded book should
> lead you to a properly built system.  I'm not at home now but I
> believe I've built CLFS successfully in Ubuntu 10.04 (but yes, that
> was inside a chroot on a Debian 6 system :)
>

I wanted to "lock down" a repeatable configuration with a specific
distribution.  As I recall, LFS-Live was actually recommended in one of the
CLFS books (maybe this one).  The chroot also allows me ensure that nothing
"gets outside" the environment and to very easily "snapshot" places in the
development or start over completely without having to worry about any
lasting side effects on my main system.


> > Using a /bin/mount command in place of the getty command, I have found
> that
> > fstab files have not mounted (including /proc, /sys, /dev/pts).  This is
> > supposed to be done by the startup script, but I don't think it is
> executing
> > since messages from it do not appear (including ones that I log to
> > /var/log).  If I replace the "::sysinit:/etc/rc.d/startup" with
> > "::sysinit:/bin/busybox mount -a" then the file systems are mounted (but
> I
> > still can't log in).
>
> Are your bootscripts all in the proper places?
> The "startup" script should be mounting most of the required filesystems.
> See https://gist.github.com/874183 for an example CLFS boot on a
> BeagleBoard-xM.  The only difference between that boot and yours
> should be the GCC flags (which I think you probably have correct if
> you're getting any kind of boot) and kernel configuration (and my boot
> uses slightly older versions of software since it was from March
> 2011).
>

The bootscripts appear to be in /etc/rc.d/init.d and related.  This agrees
with inittab. The startup script does have code in it to perform the mounts,
but it is looking like it never executes.  I have echo messages in it both
to the console and to a file in /var/log and I never see anything.

I will look at the BeagleBoard link and try to see if I can determine the
/dev/ttyS0 thing. Thanks for your quick response.


> -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/20111010/ff88ea7e/attachment-0001.htm>


More information about the Clfs-support mailing list