[Clfs-support] Fwd: Re: Mini2440 W.I.P.

Ron McDowell rcm at fuzzwad.org
Wed Jul 25 08:26:42 PDT 2012


On 7/25/12 6:58 AM, Andrew Bradford wrote:
> On Tue, 24 Jul 2012 22:12:03 -0500
> Ron McDowell<rcm at fuzzwad.org>  wrote:
>
>> Starting with an empty $CLFS, and with this env:
>>
>> [clfs at d430(Linux)]>  env
>> CLFS_HOST=i486-cross-linux-gnu
>> TERM=xterm-color
>> CLFS_TARGET=armv4t-unknown-linux-uclibceabi
>> CLFS_FPU=
>> CLFS_ARM_ARCH=armv4t
>> CLFS_ARM_MODE=arm
>> CLFS=/mnt/clfs
>> PATH=/mnt/clfs/cross-tools/bin:/bin:/usr/bin
>> PWD=/mnt/clfs/sources/Embed
>> CLFS_ARCH=arm
>> EDITOR=/usr/bin/vi
>> OTYP=Linux
>> PS1=\w\n[\u@\h(Linux)]>
>> HOME=/home/clfs
>> SHLVL=1
>> CLFS_ABI=aapcs-linux
>> CLFS_ENDIAN=little
>> CLFS_FLOAT=soft
>> HISTFILE=/home/clfs/.sh_history
>> _=/usr/bin/env
> Ok, that looks good.
>
> I strongly recommend you start by rebuilding binutils and gcc again
> now that you've changed your env.  Else I think you'll run into more
> troubles, even with what I say later.

I did.  $CLFS was empty to start with.

>> It still craps out in the first pass at gcc-4.6.1...
> I think you mean uClibc, right?

Oops, yeah.

>> + sed -i s/CONFIG_ARM_OABI/CONFIG_ARM_EABI/g .config
>> + make oldconfig
>>     MKDIR include/config
>>     HOSTCC-o extra/config/conf.o
>>     GEN extra/config/zconf.tab.c
>>     GEN extra/config/lex.zconf.c
>>     GEN extra/config/zconf.hash.c
>>     HOSTCC-o extra/config/zconf.tab.o
>>     HOSTCC extra/config/conf
>> ./.config:39:warning: override: reassigning to symbol CONFIG_ARM_EABI
>> *
>> * Restart config...
>> *
>> *
>> * Target Architecture Features and Options
>> *
>> Target ABI
>>     1. OABI (CONFIG_ARM_OABI) (NEW)
>>   >  2. EABI (CONFIG_ARM_EABI)
>> choice[1-2?]: Target Processor Type
>>   >  1. Generic Arm (CONFIG_GENERIC_ARM)
>>     2. Arm 610 (CONFIG_ARM610)
>>     3. Arm 710 (CONFIG_ARM710)
>>     4. Arm 7TDMI (CONFIG_ARM7TDMI)
>>     5. Arm 720T (CONFIG_ARM720T)
>>     6. Arm 920T (CONFIG_ARM920T)
>>     7. Arm 922T (CONFIG_ARM922T)
>>     8. Arm 926T (CONFIG_ARM926T)
>>     9. Arm 10T (CONFIG_ARM10T)
>>     10. Arm 1136JF-S (CONFIG_ARM1136JF_S)
>>     11. Arm 1176JZ-S (CONFIG_ARM1176JZ_S)
>>     12. Arm 1176JZF-S (CONFIG_ARM1176JZF_S)
>>     13. Arm Cortex-M3 (CONFIG_ARM_CORTEX_M3)
>>     14. Arm Cortex-M1 (CONFIG_ARM_CORTEX_M1)
>>     15. Intel StrongArm SA-110 (CONFIG_ARM_SA110)
>>     16. Intel StrongArm SA-1100 (CONFIG_ARM_SA1100)
>>     17. Intel Xscale (CONFIG_ARM_XSCALE)
>>     18. Intel Xscale With WMMX PXA27x (CONFIG_ARM_IWMMXT)
>> choice[1-18?]: 1
>> *
>> * Using ELF file format
>> *
>> Target Processor Endianness
>>     1. Big Endian (ARCH_WANTS_BIG_ENDIAN)
>>   >  2. Little Endian (ARCH_WANTS_LITTLE_ENDIAN)
>> choice[1-2?]: 2
>> Target CPU has a memory management unit (MMU) (ARCH_HAS_MMU) [Y/n/?] y
>>     Do you want to utilize the MMU? (ARCH_USE_MMU) [Y/n/?] y
>> Enable floating point number support (UCLIBC_HAS_FLOATS) [Y/n/?] y
>>     Target CPU has a floating point unit (FPU) (UCLIBC_HAS_FPU) [Y/n/?] y
> Make sure you have soft float ability in your kernel because of this
> answer.

Have tried y and n in there.

>>     Enable full C99 math library support (DO_C99_MATH) [N/y/?] n
>>     Enable XSI math extensions to the ISO C standard (bessel)
>> (DO_XSI_MATH) [N/y/?] n
>>     Enable C99 Floating-point environment (UCLIBC_HAS_FENV) [N/y/?] n
>> Linux kernel header location (KERNEL_HEADERS) [/usr/include] /usr/include
>> #
>> # configuration written to ./.config
>> #
>> + make
>>     MKDIR include/bits
>>     GEN include/bits/uClibc_config.h
>>     LN include/fpu_control.h
>>     LN include/dl-osinfo.h
>>     LN include/hp-timing.h
>>     LN include/bits/byteswap-common.h
>> ...
>>     LN include/sys/elf.h
>>     LN include/sys/io.h
>>     LN include/sys/procfs.h
>>     LN include/sys/ucontext.h
>>     LN include/sys/user.h
>>     MKDIR libm/arm
>>     GEN include/bits/sysnum.h
>> cc1: error: unrecognized command line option "-mlittle-endian"
>> cc1: error: unrecognized command line option "-mlittle-endian"
>> ERROR: Could not generate syscalls.
>> Make sure that you have proper kernel headers.
>> Your .config in KERNEL_HEADERS="" was set to:
>> /usr/include/
>> make: *** [include/bits/sysnum.h] Error 1
>> + exit 1
> Sorry about that... It's my fault.  The uClibc-0.9.32 configs patch I
> made forgot 2 rather important things, the KERNEL_HEADERS directory and
> the CROSS_COMPILER_PREFIX.  Get a (slightly) better uClibc-0.9.32
> configs patch from [1].
>
> [1]:http://git.cross-lfs.org/?p=abradford/clfs-embedded.git;a=blob_plain;f=patches/uClibc-0.9.32-configs-3.patch;h=e4671aa7af78b76b1764168e6628513c922a7a22;hb=HEAD
>
> > From a quick look through that uClibc configs patch, though, I think
> there's still quite a bit that's left in states that aren't ideal.
> For example, multithreading and the multilib changes with the RUNTIME
> and DEVEL_PREFIX settings. I strongly suggest you use menuconfig to set
> up uClibc how you want and don't blindly trust my configs patch, yet, it
> still needs some work, or go back to 0.9.31.
>
> You may end up hitting [2] with 0.9.32.  I'm now looking into that.  It
> looks like building gcc with --disable-shared caused libgcc_eh.a to not
> be built, but uClibc wants it.

I did run into that.

> [2]: http://permalink.gmane.org/gmane.comp.gcc.cross-compiling/14074
>
> I think I'm headed down a rabbit hole with this one...
>
> I suggest, if you want to build uClibc, use 0.9.31 and apply the patch
> to get around the .size directive issue [3].  Use the configs patch
> from the current stable book.  GCC 4.6.1 should be fine, though, and
> avoid needing any patches other than the softfloat one.

I run into the libgcc_eh.a roadblock this way, too.

> [3]:http://git.uclibc.org/uClibc/commit/?id=3e68c52b941636714d2599ea8adda9520ec2de23
>
> uClibc 0.9.33 is out now, maybe they've fixed up some of these issues
> there or have some documentation on getting around this stuff.  I just
> haven't had time to really pay attention to everything clfs related.
> Sorry.  Maybe I'll find a day soon...
>
> -Andrew

Yay!!  Success!!!  At least this far... Using linux-2.6.38.2, 
binutils-2.22, and gcc-4.6.1... uClibc-0.9.33 built exactly as described 
in CLFS-EMBEDDED-GIT-0.0.1-20110514/arm/cross-tools/uclibc.html, using 
the existing uClibc-0.9.31-configs-2.patch.  Onward through the fog! :)

-- 
Ron McDowell
San Antonio TX




More information about the Clfs-support mailing list