> -----Original Message-----
> I have spent about 2 weeks trying to make a tool chain for my
> assabet box. I
> can't seem to make the glibc part and I get different errors
> depending on the
> phase of the moon (or so it seems). I the hope that I am
> doing the same
> stupid thing over and over I have included all of the
> particulars for the
> perusal of all who might be interested. I hope someone can
> tell me I'm doing
> something really stupid, and then I can fix it and get on
> with real life:
>
Unless you have some need to customize the tools, I'd recommend getting
pre-compiled binaries from one of the many places that have them. RPM's and
SRPM's are available from
ftp://ftp.netwinder.org/users/c/chagas/arm-linux-cross
If you do wish to build them manually, you can either use the SRPM's, or if
you'd prefer, here is a script that I used to use to build them. It needs
to be updating for new kernel versions, but other than that it should work.
Execute the following commands at a prompt on your system.
# Change the /home/jseger/arm_work shown below to a directory that you want
to do the build in
ARM_WORK_DIR=/home/jseger/arm_work
# Chane the /usr/local/arm-linux shown below to a directory that you want to
install the tools in
ARM_INSTALL_DIR=/usr/local/arm-linux
PATH=$ARM_INSTALL_DIR/bin:$PATH
mkdir -p $ARM_WORK_DIR/sources
mkdir -p $ARM_INSTALL_DIR
#Download all of the sources listed above into $ARM_WORK_DIR/sources
#If you would like this script to download them automatically, uncomment the
following line
#DOWNLOAD_SOURCES=YES
if [ "x$DOWNLOAD_SOURCES" = "xYES" ]; then
cd $ARM_WORK_DIR/sources
echo Downloading sources using lynx - This may take a while
lynx -dump ftp://aeneas.mit.edu/pub/gnu/binutils/binutils-2.10.tar.gz >
binutils-2.10.tar.gz
lynx -dump ftp://aeneas.mit.edu/pub/gnu/gcc/gcc-2.95.2.tar.gz >
gcc-2.95.2.tar.gz
lynx -dump ftp://ftp.netwinder.org/users/p/philb/gcc-2.95.2-diff-991022.gz >
gcc-2.95.2-diff-991022.gz
lynx -dump
ftp://ftp.netwinder.org/users/j/jseger/gcc-2.95.2-diff-991022-inhibit_libc.g
z > gcc-2.95.2-diff-991022-inhibit_libc.gz
lynx -dump ftp://aeneas.mit.edu/pub/gnu/glibc/glibc-2.1.3.tar.gz >
glibc-2.1.3.tar.gz
lynx -dump ftp://aeneas.mit.edu/pub/gnu/glibc/glibc-crypt-2.1.tar.gz >
glibc-crypt-2.1.tar.gz
lynx -dump
ftp://aeneas.mit.edu/pub/gnu/glibc/glibc-linuxthreads-2.1.3.tar.gz >
glibc-linuxthreads-2.1.3.tar.gz
lynx -dump
ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.0-test2.tar.gz >
linux-2.4.0-test2.tar.gz
lynx -dump
ftp://ftp.kernel.org/pub/linux/kernel/people/alan/2.4.0test/patch-2.4.0test2
-ac1.gz > patch-2.4.0test2-ac1.gz
lynx -dump
ftp://ftp.arm.linux.org.uk/pub/armlinux/source/kernel-patches/v2.4/patch-2.4
.0-test2-ac1-rmk2.gz > patch-2.4.0-test2-ac1-rmk2.gz
lynx -dump
ftp://ftp.netwinder.org/users/n/nico/diff-2.4.0-test2-ac1-rmk2-np3.gz >
diff-2.4.0-test2-ac1-rmk2-np3.gz
fi
cd $ARM_WORK_DIR
mkdir -p src build
tar -xzvf sources/binutils-2.10.tar.gz --directory=src
tar -xzvf sources/gcc-2.95.2.tar.gz --directory=src
tar -xzvf sources/linux-2.4.0-test2.tar.gz --directory=src
tar -xzvf sources/glibc-2.1.3.tar.gz --directory=src
tar -xzvf sources/glibc-crypt-2.1.tar.gz --directory=src/glibc-2.1.3
tar -xzvf sources/glibc-linuxthreads-2.1.3.tar.gz
--directory=src/glibc-2.1.3
gzip -dc sources/gcc-2.95.2-diff-991022.gz | patch -d src/gcc-2.95.2 -p0
#NOTE: This will produce two error messages: "Hunk #1 FAILED at 1." These
are safe to ignore
gzip -dc sources/gcc-2.95.2-diff-991022-inhibit_libc.gz | patch -d
src/gcc-2.95.2 -p0
gzip -dc sources/patch-2.4.0test2-ac1.gz | patch -p1 -d src/linux
gzip -dc sources/patch-2.4.0-test2-ac1-rmk2.gz | patch -p1 -d src/linux
gzip -dc sources/diff-2.4.0-test2-ac1-rmk2-np3.gz | patch -p1 -d src/linux
#mkdir -p $ARM_INSTALL_DIR/arm-linux/include
cd $ARM_WORK_DIR/src/linux
make assabet_config
make menuconfig
# Press ESC twice, then ENTER
make dep
#cp -dR include/asm-arm $ARM_INSTALL_DIR/arm-linux/include/asm
#cp -dR include/linux $ARM_INSTALL_DIR/arm-linux/include/linux
cd $ARM_WORK_DIR/build
mkdir -p binutils gcc glibc
cd $ARM_WORK_DIR/build/binutils
../../src/binutils-2.10/configure --target=arm-linux
--prefix=$ARM_INSTALL_DIR
make
make install
cd $ARM_WORK_DIR/build/gcc
../../src/gcc-2.95.2/configure --target=arm-linux --prefix=$ARM_INSTALL_DIR
--with-cpu=strongarm --disable-languages
--with-headers=$ARM_WORK_DIR/src/linux/include
make -i
make -i install
cd $ARM_WORK_DIR/build/glibc
CC=arm-linux-gcc ../../src/glibc-2.1.3/configure arm-linux --enable-add-ons
--prefix=$ARM_INSTALL_DIR/arm-linux
--with-headers=$ARM_WORK_DIR/src/linux/include
make
make install
cd $ARM_WORK_DIR/build/gcc
gzip -dc ../../sources/gcc-2.95.2-diff-991022-inhibit_libc.gz | patch -R -d
../../src/gcc-2.95.2 -p0
../../src/gcc-2.95.2/configure --target=arm-linux --prefix=$ARM_INSTALL_DIR
--with-cpu=strongarm --enable-languages=c++
--with-headers=../../src/linux/include
make -i
make -i install
Good luck,
Justin Seger
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++