分类: LINUX
2009-06-23 11:05:43
制作arm交叉编译环境
1. 下载文件
linux-
binutils-
gcc-
gcc-
gdb-6.5.tar.bz2
glibc-
glibc-linuxthreads-
linux-libc-headers-
放在/home/zilong/corsstool/downloads
2. 解压crosstool
tar xzvf crosstool-0.43.tar.gz
3.
cd crosstool-0.43
gedit demo-arm9tdmi.sh
!/bin/sh
# This script has one line for each known working toolchain
# for this architecture. Uncomment the one you want.
# Generated by generate-demo.pl from buildlogs/all.dats.txt
set -ex
TARBALLS_DIR=/home/zilong/corsstool/downloads //软件处
RESULT_TOP=/home/zilong/crosstool/work //安装路径
export TARBALLS_DIR RESULT_TOP
GCC_LANGUAGES="c,c++"
export GCC_LANGUAGES
# Really, you should do the mkdir before running this,
# and chown /opt/crosstool to yourself so you don't need to run as root.
mkdir -p $RESULT_TOP
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
#eval `cat arm9tdmi.dat gcc-
eval `cat arm9tdmi.dat gcc-
echo Done.
4. gedit gcc-
BINUTILS_DIR=binutils-
GCC_CORE_DIR=gcc-
GCC_DIR=gcc-
GLIBC_DIR=glibc-
LINUX_DIR=linux-
LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-
GLIBCTHREADS_FILENAME=glibc-linuxthreads-
GDB_DIR=gdb-6.5
GLIBC_EXTRA_CONFIG="$GLIBC_EXTRA_CONFIG --with-tls --with-__thread --enable-kernel=
5. 运行 ./ demo-arm9tdmi.sh
ok!