configure prefix=${
PREFIX} target=${
TARGET} \
withsysroot=${
SYSROOT}
[arm@localhost binutils2.16]#
make
[arm@localhost binutils2.16]#
su root
[root@localhost binutils2.16]#
make install
[root@localhost binutils2.16]#
exit
[arm@localhost binutils2.16]#
1.5 准备内核头文件
1.5.1 使用当前平台的gcc编译内核头文件
[arm@localhost tchain3.4.4]#cd ${KERNEL}
[arm@localhost kernel]#tar xvfz linux2.6.14.1.tar.gz
[arm@localhost kernel]#cd linux2.6.14.1
[arm@localhost linux2.6.14.1]#make ARCH=arm menuconfig
[arm@localhost linux2.6.14.1]#make
1.5.2 复制内核头文件
[arm@localhost kernel]#su root
[root@localhost kernel]#mkdir p${SYSROOT}/usr/include
[root@localhost kernel]#cp -a include/linux ${SYSROOT}/usr/include/linux
[root@localhost kernel]#cp -a include/asmi386${SYSROOT}/usr/include/asm
[root@localhost kernel]#cp –a include/asmgeneric${SYSROOT}/usr/include/asmgeneric [root@localhost kernel]#exit
[arm@localhost kernel]#
1.6 译编glibc头文件
[arm@localhost kernel]#cd ${SRC}
[arm@localhost chain3.4.4]#tar xvfz glibc2.3.5.tar.gz
[arm@localhost chain3.4.4]#patch -d glibc2.3.5-p1< ioperm.c.diff
[arm@localhost glibc2.3.5]#cd glibc2.3.5
[arm@localhost glibc2.3.5]#tar xvfz ../glibclinuxthreads2.3.5.tar.gz
[arm@localhost chain3.4.4]#cd ..
[arm@localhost chain3.4.4]#mkdir BUILD/glibc2.3.5headers
[arm@localhost chain3.4.4]#cd BUILD/glibc2.3.5headers
[arm@localhost glibc2.3.5headers]#../../glibc2.3.5/configure prefix=/usr host=${ TARGET} \enableaddons=linuxthreads –withheaders=${SYSROOT}/usr/include
[arm@localhost glibc2.3.5headers]#su root
[root@localhost glibc2.3.5headers]#make crosscompiling=yes install_root=${SYSROOT} installheaders
[root@localhost glibc2.3.5headers]#touch ${SYSROOT}/usr/include/gnu/stubs.h
[root@localhost glibc2.3.5headers]#touch ${SYSROOT}/usr/include/bits/stdio_lim.h [root@localhost glibc2.3.5headers]#exit
[arm@localhost glibc2.3.5headers]#