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

Lance Jump lancej29 at gmail.com
Mon Oct 17 07:07:23 PDT 2011


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

> On Sun, Oct 16, 2011 at 5:00 PM, Lance Jump <lancej29 at gmail.com> wrote:
> >> I may have found something.  I put debug printf calls in the ash.c
> source
> >> to see if it was getting that far and what was happening if it did. It
> does
> >> get to ash and it appears to crash after the first call call to setjmp.
> I
> >> removed that call and it got far enough to give me the "~ #" prompt.
> But as
> >> soon as I entered a command, it went back to the "Please press Enter
> ..."
> >> message.  I followed it a bit further and found that it was crashing at
> >> another setjmp.  So, I searched for "Busybox setjmp" and found lots of
> >> references to setjmp being broken in ARM uClib.  Most were older, but
> few
> >> were more recent. A few made references to floating point configuration.
>
> Nice debugging work! :)
>
> > Okay, that was it. I found that UCLIBC_HAS_FP was set in the config file
> of
> > uClibc. I set the CLFS_FLOAT to "soft" and CLFS_FPU to empty, but these
> did
> > not appear to get used. The uClibc configuration comes from the copy of
> > clfs/config.arm.little, which has UCLIBC_HAS_FPU=y set. I didn't see
> > anything in book about needing to change that.
> >
> > Anyway, I changed it in the uClibc build process with a conditional sed:
> >
> > if [ "${CLFS_FLOAT}" == "soft" ]; then
> >    sed -i s/"UCLIBC_HAS_FPU=y"/"# UCLIBC_HAS_FPU is not set"/g .config
> > fi
> >
> > I rebuilt everything and found that the startup script now runs. I have
> some
> > DHCP startup problems, but that is completely unrelated.  Anyway, I can
> now
> > log in.
> >
> > How do you want to handle this issue?  Is it a failure on my part to
> > properly read the directions or should there have been a note about
> making
> > menuconfig in uClibc? Some other alternatives include having additional
> > template config files (w/o FPU), incorporating something like my sed
> lines
> > (above) or maybe having the default config.arm.little have FPU turned
> off.
>
> This is a shortcoming of the book.  Doesn't look like you deviated
> from the book at all.
>
> If you're interested, can you create a patch for this sed line?  It
> should probably go just after the ABI change in section 6.11 in the
> ARM book.  The syntax in the XML that's needed in order to use some of
> the "more special" characters for sed lines should be evident to you
> from looking at the existing example for changing the ABI, but if not,
> let me know.
>

Okay, I can do that.  To be clear, the patch will add the instruction about
floating point and the sed line I have included here.  As a separate item
(maybe still on my plate) we should fix the creation of /dev/null and
/dev/console.  We have three choices: leave it where it is, but change the
location ${CLFS}-final; move it to before the clone to ${CLFS}-final; or
delete it altogether.  In my testing, I found it was needed.


> Because of the number of configurations possible for ARM (ABI,
> floating point, big/little endian, etc) having different config files
> for each is a pain.  Changing small things in the uClibc config file
> is best done with sed lines after using a default config for those who
> want to use the default config.  If you're really up for a challenge,
> it'd be nice to only have one config file for each architecture for
> uClibc (currently there's big and little endian for ARM and MIPS but
> I'm not sure we really need that).
>

I'm no longer expert on sed, so writing sed scripts to massage the config
file will be a little difficult for me -- but not insurmountable.  For now,
maybe we should just leave them as-is. (I used to write sed scripts to
massage PCB files in DC/CAD and I got to be quite good at it.  Sadly, that
part of my brain atrophied.)


> Nice detective work!
>

Thank you and thanks for your support with this issue.


> -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/20111017/b73a95f9/attachment-0001.htm>


More information about the Clfs-support mailing list