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

Andrew Bradford bradfa at gmail.com
Mon Oct 17 05:24:57 PDT 2011


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.

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).

Nice detective work!
-Andrew



More information about the Clfs-support mailing list