0. Building requirements linux-2.4.21.tar.gz diff-2.4.21-rmk1-pxa1-intc3.gz gcc-2.96 or above in i386 tarballs from open source community Linux 2GB free disk space 1. Directory tree build.sh: building script patch/: all patches needed by binutils, glibc, gcc source/: all tarballs: binutils-2.14.90, glibc-2.3.2, gcc-3.3.2, linux-2.4.21 2. How to build toolchain? % cp linux-2.4.21.tar.gz ./source % cp diff-2.4.21-rmk1-pxa1-intc3.gz ./patch % ./build.sh 2>&1 | tee sh.log Select 2(arm-linux) when asked 'select a target'. Then press Enter three times, wait for about 30 minutes in P4/3GHz,512MB Ram. 3. How to adjust the building script 1) % vi build.sh define DEFAULT_PREFIX as you will, arm-linux/ will be placed into $DEFAULT_PREFIX. 2) input path when running build.sh. Press Enter, the path in [] will be used. a) install path: where will arm-linux/ be placed? b) tarball path: where are tarballs located? c) patches path: where are patches located? 4. How to debug? If error, you may read sh.log to see where error occurs? Make sure you have permissions to the installed directory. Make sure the name of tarballs must be consistent with the variables in build.sh, e.g: if you use binutils-2.14.90.tar.gz, the $BINUTILSDISTO must be binutils-2.14.90. 5. Results By default, the toolchain will be placed in /usr/local/arm-linux. All tarballs will be unpacked into current directory. build-binutils, build-gcc-core, build-gcc, build-glibc and linux-2.4.21 will be created in current directory. 6. How to use toolchain? You can use new toolchain by the following ways: % export PATH=/usr/local/arm-linux/bin:$PATH You can use 'arm-linux-gcc -v' to make sure you are using correct toolchain.