Elements |
Binutils: binutils-2.13.90.0.20
C compiler: gcc-3.2.2
Libc: glibc-2.3.2 + glibc-linuxthreads-2.3.2
Binutils |
That is the first element to build. Download the sources and compile them as below:
./configure --target=arm-linux --prefix=/usr/local/arm
make
makeinstall
ld for Xscale will be named: /usr/local/arm/bin/arm-linux-ld
C compiler |
That is the second element to build. Download the sources.
It is no possible to configure and build gcc in the extracted gcc directory.
Create another directory (like gcc) and configure and compile as below:
PREFIX=/usr/local/arm/
PATH=$PREFIX/bin:$PATH
../gcc-3.2.2/configure --target=arm-linux --prefix=$PREFIX \
--with-as=$PREFIX/bin/arm-linux-as \
--with-ld=$PREFIX/bin/arm-linux-ld \
--disable-shared \
--nfp \
--disable-threads --enable-languages=c
make
make install
gcc for Xscale will be named: /usr/local/arm/bin/arm-linux-gcc
Libc for Xscale |
A configured Xscale kernel is needed before doing this step.
That is the last step but that is the most complex to do, but it is not needed to build
a Linux kernel.
Download glibc-2.3.2 and the corresponding linuxthreads (glibc-linuxthreads-2.3.2).
Extract glibc and in the glibc-2.3.2 extract the linuxthreads.
Patch the linuxthreads:
linuxthreads/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h
- ENTRY(name)
+ ENTRY(name);
Copy the missing include files:
cp /home/arm/lib/gcc-lib/xscale-elf/3.2.2/include/*.h /usr/local/arm/include
Configure and build libc (The kernel sources are in /home/loox/linux):
PATH=$PATH:/usr/local/arm/bin
../glibc-2.3.2/configure \
--prefix=/usr/local/arm \
--with-headers=/home/loox/linux/include \
--with-binutils=/usr/local/arm \
--enable-kernel=2.4.19 \
--build=i686-pc-linux-gnu \
--host=arm-linux \
--with-cpu=xscale \
--without-fp \
--enable-add-ons="linuxthreads"
make
make install
Check the /usr/local/arm/lib/libc.so if it is not a dynamicly library remove it.
The libc.so is /usr/local/arm/lib/libc-2.3.2.so put a symbolic link if you need it.
|