Chinaunix首页 | 论坛 | 博客
  • 博客访问: 399643
  • 博文数量: 83
  • 博客积分: 2011
  • 博客等级: 大尉
  • 技术积分: 741
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-04 22:51
文章分类

全部博文(83)

文章存档

2009年(83)

我的朋友

分类: LINUX

2009-06-23 11:05:43

制作arm交叉编译环境

1. 下载文件

 

linux-2.6.24.tar.bz2

binutils-2.16.1.tar.bz2

gcc-3.3.6.tar.bz2

gcc-4.1.0.tar.bz2

gdb-6.5.tar.bz2

glibc-2.3.2.tar.bz2

glibc-linuxthreads-2.3.2.tar.bz2

linux-libc-headers-2.6.12.0.tar.bz2

放在/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-3.2.3-glibc-2.2.5.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.3.2.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.2.3-glibc-2.3.2-tls.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.2.5.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.3.2.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.3.6-glibc-2.3.2-tls.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.2.5.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.2.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.2-tls.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.5.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.5-tls.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.6.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-3.4.5-glibc-2.3.6-tls.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.2.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.2-tls.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.5.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.5-tls.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.6.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-4.0.2-glibc-2.3.6-tls.dat` sh all.sh --notest

#eval `cat arm9tdmi.dat gcc-4.1.0-glibc-2.3.2.dat` sh all.sh --notest

eval `cat arm9tdmi.dat gcc-4.1.0-glibc-2.3.2-tls.dat` sh all.sh –notest        //选择的版本

 

echo Done.

 

4. gedit gcc-4.1.0-glibc-2.3.2-tls.dat

 

BINUTILS_DIR=binutils-2.16.1

GCC_CORE_DIR=gcc-3.3.6

GCC_DIR=gcc-4.1.0

GLIBC_DIR=glibc-2.3.2

LINUX_DIR=linux-2.6.24    //改为你的内核代码

LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.12.0

GLIBCTHREADS_FILENAME=glibc-linuxthreads-2.3.2

GDB_DIR=gdb-6.5

GLIBC_EXTRA_CONFIG="$GLIBC_EXTRA_CONFIG --with-tls --with-__thread  --enable-kernel=2.4.18"

 

5. 运行 ./ demo-arm9tdmi.sh

ok!

阅读(1293) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~