Permalink
Browse files

Fix CROSSCOMPILE.sh doc

  • Loading branch information...
letoams committed Oct 26, 2010
1 parent 74e3811 commit aa4337b77617ecb309ef184a731c65e31fcbc97f
Showing with 9 additions and 8 deletions.
  1. +9 −8 CROSSCOMPILE.sh
View
@@ -18,7 +18,7 @@ export AS=$PREFIX/bin/arm-elf-as
export STRIP=$PREFIX/bin/arm-elf-strip
export LD_LIBRARY_PATH=$PREFIX/lib/gcc-lib/arm-elf/3.0/
export PATH=$PATH:$PREFIX/bin
export USERCOMPILE="-DCOMPILER_HAS_NO_PRINTF_LIKE -O3 -g ${PORTDEFINE} -I'$PREFIX'/arm-elf/inc -L'$PREFIX'/lib/gcc-lib -DGCC_LINT -DLEAK_DETECTIVE -Dlinux -D__linux__"
export USERCOMPILE="-Wl,-elf2flt -DCOMPILER_HAS_NO_PRINTF_LIKE -O3 -g ${PORTDEFINE} -I$PREFIX/arm-elf/inc -L$PREFIX/lib/gcc-lib -DGCC_LINT -DLEAK_DETECTIVE -Dlinux -D__linux__"
export WERROR=' '
#now you can run:
@@ -28,13 +28,14 @@ export WERROR=' '
# make install
#and the install will go into $DESTDIR/
# note: the arm_tools I had were so broken that some code failed to compile, this was ifdef'ed with BROKEN_COMPILER_HACK
# This relates to the PRINTF_LIKE(x) macro
# note: the arm_tools I had failed to compile PRINTF_LIKE(x), so the code
# for that was ifdef'ed with #ifndef COMPILER_HAS_NO_PRINTF_LIKE statements.
# Add -DCOMPILER_HAS_NO_PRINTF_LIKE to enable the workaround.
# EXECUTABLE FILE FORMAT
#
# Some uClibc/busybox combinations use different executable files formats from ELF. This is configured during Linux kernel
# build. To convert the ELF binaries to BLTF, use elf2flt. The following script would convert all the binaries:
# for binary in `find $DESTDIR -type f |xargs file |grep "ELF 32-bit LSB executable" |sed "s/:.*$//"` ; do mv $binary $binary.elf ; elf2flt -z -v $binary.elf -o $binary ; done
# Some uClibc/busybox combinations use different executable files formats from
# ELF. This is configured during Linux kernel build. One common format is
# the BLFT file format. Do not manually convert ELF binaries to BLTF using
# elf2flt as that will create invalid binaries. Instead add -Wl,-elf2flt to
# your flags (CFLAGS / LDFLAGS / USERCOMPILE)

0 comments on commit aa4337b

Please sign in to comment.