[Clfs-support] Mini2440 W.I.P.

Ron McDowell rcm at fuzzwad.org
Thu Jul 19 10:38:36 PDT 2012


On 7/16/12 7:03 PM, code monkey wrote:
> I haven't built the embedded version of CLFS.   I saw a lot of work
> done to it about a year ago so hopefully it is in good shape.
>
> I did build the 'regular CLFS' for ARM.   I got it to work but it
> takes a very long time to build:
>
> http://lists.cross-lfs.org/pipermail/clfs-support-cross-lfs.org/2011-August/001246.html
>
> Good luck.
> _______________________________________________
> Clfs-support mailing list
> Clfs-support at lists.cross-lfs.org
> http://lists.cross-lfs.org/listinfo.cgi/clfs-support-cross-lfs.org


All works fine up thru Ch 6.8 of CLFS-EMBEDDED-GIT-0.0.1-20110514,
but then in Ch 6.9-6.10 I had to make the following changes...

#
# binutils-2.21 no longer available, used 2.21.1, which changed several 
lines.
# also added AR and AS declarations
# and --host
tar xof Archives/binutils-2.21.1.tar || exit 1
cd binutils-2.21.1/ || exit 1
mkdir -v ../binutils-build || exit 1
cd ../binutils-build || exit 1
AR=ar AS=as ../binutils-2.21.1/configure --prefix=${CLFS}/cross-tools \
   --host=${CLFS_HOST} --target=${CLFS_TARGET} --with-sysroot=${CLFS} \
   --with-lib-path=${CLFS}/tools/lib --disable-nls --enable-shared \
   --disable-multilib || exit 1
make configure-host || exit 1
make || exit 1
make install || exit 1
cp -v ../binutils-2.21.1/include/libiberty.h ${CLFS}/usr/include || exit 1
cd .. || exit 1
rm -rf binutils-2.21.1/ || exit 1
rm -rf binutils-build/ || exit 1
#
# ch 6.10
#
tar xof Archives/gcc-4.6.0.tar || exit 1
cd gcc-4.6.0/ || exit 1
#
#next 6 lines brought forward from CLFS-1.2.0
patch -Np1 -i ../Archives/gcc-4.6.0-branch_update-1.patch || exit 1
patch -Np1 -i ../Archives/gcc-4.6.0-specs-1.patch || exit 1
echo -en '#undef STANDARD_INCLUDE_DIR\n#define STANDARD_INCLUDE_DIR 
"/tools/include/"\n\n' >> gcc/config/rs6000/sysv4.h || exit 1
echo -en '\n#undef STANDARD_STARTFILE_PREFIX_1\n#define 
STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"\n' >> 
gcc/config/rs6000/sysv4.h || exit 1
echo -en '\n#undef STANDARD_STARTFILE_PREFIX_2\n#define 
STANDARD_STARTFILE_PREFIX_2 ""\n' >> gcc/config/rs6000/sysv4.h || exit 1
touch ${CLFS}/tools/include/limits.h || exit 1
#
# following patch had to be applied by hand...the patch looks fine but 
won't 'patch'...
# patch -Np1 -i ../Local/gcc-4.6.0-uclibc-arm-softfloat.patch || exit 1
#
# a combo of the above echos and hints from codemonkey's msg 001246, Aug 
2011
# gave rise to the following 8 lines.
# currently a shotgun approach, see what hits if anything...
# [it does compile thru this way, but several of these probably aren't 
needed]
echo -en '\n#undef STANDARD_INCLUDE_DIR\n#define STANDARD_INCLUDE_DIR 
"/tools/include/"\n' >> gcc/config/arm/linux-eabi.h || exit 1
echo -en "\n#undef STARTFILE_PREFIX_SPEC\n#define STARTFILE_PREFIX_SPEC 
\"/tools/lib/\"\n" >> gcc/config/arm/linux-eabi.h || exit 1
echo -en "\n#undef STANDARD_STARTFILE_PREFIX_1\n#define 
STANDARD_STARTFILE_PREFIX_1 \"/tools/lib/\"\n" >> 
gcc/config/arm/linux-eabi.h || exit 1
echo -en "\n#undef STANDARD_STARTFILE_PREFIX_2\n#define 
STANDARD_STARTFILE_PREFIX_2 \"/tools/lib/\"\n" >> 
gcc/config/arm/linux-eabi.h || exit 1
echo -en '\n#undef STANDARD_INCLUDE_DIR\n#define STANDARD_INCLUDE_DIR 
"/tools/include/"\n\n' >> gcc/config/arm/linux-eabi.h || exit 1
echo -en "\n#undef STARTFILE_PREFIX_SPEC\n#define STARTFILE_PREFIX_SPEC 
\"/tools/lib/\"\n" >> gcc/config/arm/linux-elf.h || exit 1
echo -en "\n#undef STANDARD_STARTFILE_PREFIX_1\n#define 
STANDARD_STARTFILE_PREFIX_1 \"/tools/lib/\"\n" >> 
gcc/config/arm/linux-elf.h || exit 1
echo -en "\n#undef STANDARD_STARTFILE_PREFIX_2\n#define 
STANDARD_STARTFILE_PREFIX_2 \"/tools/lib/\"\n" >> 
gcc/config/arm/linux-elf.h || exit 1

mkdir -v ../gcc-build || exit 1
cd ../gcc-build || exit 1
AR=ar LDFLAGS="-Wl,-rpath,${CLFS}/cross-tools/lib" ../gcc-4.6.0/configure \
   --prefix=${CLFS}/cross-tools --build=${CLFS_HOST} --host=${CLFS_HOST} \
   --target=${CLFS_TARGET} --with-sysroot=${CLFS} 
--with-local-prefix=${CLFS}/tools \
   --disable-nls --disable-shared --with-mpfr=${CLFS}/cross-tools \
   --with-gmp=${CLFS}/cross-tools --with-mpc=${CLFS}/cross-tools 
--without-headers \
   --with-newlib --disable-decimal-float --disable-libgomp 
--disable-libmudflap \
   --disable-libssp --disable-threads --enable-languages=c 
--disable-multilib \
   --with-abi=${CLFS_ABI} --with-arch=${CLFS_ARM_ARCH} 
--with-mode=${CLFS_ARM_MODE} \
   --with-float=${CLFS_FLOAT} --with-fpu=${CLFS_FPU} || exit 1
make all-gcc all-target-libgcc || exit 1
make install-gcc install-target-libgcccd .. || exit 1
rm -rf gcc-4.6.0/ || exit 1
rm -rf gcc-build || exit 1

...and then in Ch 6.11 the build fails with...

+ tar xof Archives/uClibc-0.9.31.tar
+ cd uClibc-0.9.31/
+ patch -Np1 -i ../Archives/uClibc-0.9.31-configs-2.patch
patching file clfs/config.arm.big
patching file clfs/config.arm.little
patching file clfs/config.i386.littlepatching file clfs/config.mips.big
patching file clfs/config.mips.littlepatching file clfs/config.x86_64.little
+ cp -v clfs/config.arm.little .config
`clfs/config.arm.little' -> `.config'
+ '[' aapcs == aapcs ']'
+ 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:38: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?]: 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
   Enable full C99 math library support (DO_C99_MATH) [Y/n/?] y
   Enable XSI math extensions to the ISO C standard (bessel) 
(DO_XSI_MATH) [N/y/?] n
   Enable C99 Floating-point environment (UCLIBC_HAS_FENV) [Y/n/?] y
Linux kernel header location (KERNEL_HEADERS) [${CLFS}/usr/include] 
${CLFS}/usr/include
#
# configuration written to ./.config
#
+ make
   MKDIR include/bits
   GEN include/bits/sysnum.h
   GEN include/bits/uClibc_config.h
   LN include/pthread.h
   LN include/semaphore.h
   LN include/bits/pthreadtypes.h
...
   LN include/sys/ucontext.h
   LN include/sys/user.h
   AS lib/crt1.o
   AS lib/Scrt1.o
   AS lib/crti.o
   AS lib/crtn.o
/tmp/cchgc7oK.s: Assembler messages:
/tmp/cchgc7oK.s: Error: .size expression for _init does not evaluate to 
a constant
/tmp/cchgc7oK.s: Error: .size expression for _fini does not evaluate to 
a constant
make: *** [lib/crtn.o] Error 1
+ exit 1

Any clues gratefully accepted.

My build box is Ubuntu 10.04-LTS with current updates.


-- 
Ron McDowell
San Antonio TX




More information about the Clfs-support mailing list