NMT:cross: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
export CTARGET=mipsel-linux-uclibc | export CTARGET=mipsel-linux-uclibc | ||
| Line 8: | Line 7: | ||
cd build | cd build | ||
../binutils-2.17/configure \ | ../binutils-2.17/configure \ | ||
--target=$CTARGET \ | |||
--prefix=/usr/local/$ARCH/ \ | |||
--with-sysroot=/usr/local/$ARCH/$CTARGET \ | |||
--disable-werror | |||
make | make | ||
make install | make install | ||
| Line 39: | Line 38: | ||
../gcc-4.0.4/configure \ | ../gcc-4.0.4/configure \ | ||
--target=$CTARGET \ | |||
--prefix=/usr/local/mips \ | |||
--with-sysroot=/usr/local/mips/$CTARGET \ | |||
--enable-languages=c \ | |||
--disable-shared \ | |||
--disable-checking \ | |||
--disable-werror \ | |||
--disable-__cxa_atexit \ | --disable-__cxa_atexit \ | ||
--enable-target-optspace \ | --enable-target-optspace \ | ||
Revision as of 06:42, 9 November 2007
export CTARGET=mipsel-linux-uclibc
export ARCH=mips
rm -rf build
mkdir build
cd build
../binutils-2.17/configure \
--target=$CTARGET \
--prefix=/usr/local/$ARCH/ \
--with-sysroot=/usr/local/$ARCH/$CTARGET \
--disable-werror
make
make install
# It installs things we don't want (and will fail later)
rm -rf /usr/local/$ARCH/{info,lib,man,share}
export PATH=/usr/local/$ARCH/bin:$PATH
cd ../linux-2.6.15.7
yes "" | make ARCH=$ARCH oldconfig prepare
#With 2.6.x, this will probably end in an error because you don't have a gcc
#cross-compiler yet, but you can ignore that. Just copy over the headers:
mkdir -p /usr/local/$ARCH/$CTARGET/usr/include/
rsync -arv include/linux include/asm-generic /usr/local/$ARCH/$CTARGET/usr/include/
rsync -arv include/asm-$ARCH/ /usr/local/$ARCH/$CTARGET/usr/include/asm
cd ../uClibc-0.9.28.3/
rsync -arvL include/ /usr/local/$ARCH/$CTARGET/sys-include
cd ../build/
rm -rf *
../gcc-4.0.4/configure \
--target=$CTARGET \
--prefix=/usr/local/mips \
--with-sysroot=/usr/local/mips/$CTARGET \
--enable-languages=c \
--disable-shared \
--disable-checking \
--disable-werror \
--disable-__cxa_atexit \
--enable-target-optspace \
--disable-nls \
--enable-multilib \
--with-float=soft \
--enable-sjlj-exceptions \
--disable-threads
make
make install
rm -rf /usr/local/$ARCH/$CTARGET/sys-include
cd ../uClibc-0.9.28.3/
make menuconfig
#Target Architecture: mips
#Target Architecture Features and Options:
# Target Process Architecture: MIPS I
# Target Process Endianness: Little Endian
# Target CPU has a memory management unit (MMU): YES
# Enable floating point number support: YES
# Target CPU has a floating point unit: NO
# (/usr/local/mips/mipsel-linux-uclibc/usr) Linux kernel header location
#
#Library Installation Options
# (/usr/local/mips/mipsel-linux-uclibc) uClibc runtime library directory
# (/usr/local/mips/mipsel-linux-uclibc/usr) uClibc development environment
#
make CROSS=mipsel-linux-uclibc-
make install
rm -rf *
../gcc-4.0.4/configure \
--target=$CTARGET \
--prefix=/usr/local/mips \
--with-sysroot=/usr/local/mips/$CTARGET \
--enable-languages=c \
--enable-shared \
--disable-checking \
--disable-werror \
--disable-__cxa_atexit \
--enable-target-optspace \
--disable-nls \
--enable-multilib \
--with-float=soft \
--enable-sjlj-exceptions \
--enable-threads=posix
make
make install
# it SHOULD be --enable-languages=c,c++ but that fails for me everytime.