Cross Compilation

上一篇 / 下一篇  2007-08-16 15:33:33 / 个人分类:嵌入式LINUX技术

+A8po2yR F0ZG c'ZC3c0# ********************************************************51Testing软件测试网 o`x:W YJu!p
# Practice is the best mentor to knowledge learners.
#Xh&{mnD4e0# ********************************************************

dU.Fo]+m"['b)C)}0

5nbRfd.Kan0# I am lucky to be able to have access to the prebuilt cross compilation
$m]o(v@M0# toolchains for ARM920T platform.At the very beginning, it was mysterious 51Testing软件测试网.v.?,h:_%h4h
# for me to build, install and use the toolchains(yes, it indeed does).
#Q;_%D/Hr&K4D0# As time passes away, ......51Testing软件测试网5J S-u0?[/E,_

1V;CT/W4By{9^9R0### The LINUX kernel 2.6.17 and its descendant 2.6.20 use arm-linux-gcc-4.1.1-920t,
`0iy q${0AO'C%]'EE0### which comes from buildroot.51Testing软件测试网I'{2wr9jGhD
### Refer to http://buildroot.uclibc.org/buildroot.html for more info.

U wFhl} o[0{.`0 51Testing软件测试网#^v,hzA9UB.n

# 1. Get the tar balls via network.
Z!I.CMcPq0# set the environment variable http_proxy in LAN if necessary
5F.y4WQ3^$C9YjH0# The website is encrypted for company confidential purpose.51Testing软件测试网+rpf1S&fO t@t
$wget http://***.*****.com/files/tools/arm-linux-gcc-4.1.1-920t.tar.bz251Testing软件测试网y'M!b%[Wus"LfP
$wget http://***.*****.com/files/tools/arm-elf-gcc-3.2.1-full.tar.bz251Testing软件测试网El h*ZDv G+[_

51Testing软件测试网9_0t/L6K"r

# 2. Install the toolchains.51Testing软件测试网1DL$N?,?8D
$tar jxf arm-linux-gcc-4.1.1-920t.tar.bz2
oS2G iC)w0$tar jxf arm-elf-gcc-3.2.1-full.tar.bz251Testing软件测试网3I0[/zhU4G o
$mv arm-linux-gcc-4.1.1-920t 4.1.1-920t
/D5P of"x0$mv 4.1.1-920t /usr/local/arm  //make sure you have a superuser authority51Testing软件测试网,P-H8b+T&C
$mv arm-elf-gcc-3.2.1-full 3.2.1-elf
vk&t_s0$mv 3.2.1-elf /usr/local/arm   //make sure you have a superuser authority51Testing软件测试网MW!zW5OQ(i_Qqg&`

MV _ Jw%VDW0# 3. Set the environment variable PATH or modify .bash_profile.
Gp5UUS m#fI"V3D0export PATH=/usr/local/arm/4.1.1-920t/bin:/usr/local/arm/3.2.1-elf/bin:$PATH51Testing软件测试网6N`HNU_.f

51Testing软件测试网 O/u'Y[:Z

# 4. Use the toolchains to cross compile the apps. to run on ARM.51Testing软件测试网f1u sZ8{.g!m*B\,a
$ arm-linux-gcc -o <target_file> <source_file>51Testing软件测试网M4S4e9Q)L+XS(oE
$ CC=arm-linux-gcc make
/X[ \0q@0......51Testing软件测试网Yo6T w(Md{ ]

inL~t4r~u0

TAG: 嵌入式LINUX技术

 

评分:0

我来说两句

日历

« 2024-05-04  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 22488
  • 日志数: 38
  • 文件数: 1
  • 书签数: 3
  • 建立时间: 2007-08-14
  • 更新时间: 2008-05-01

RSS订阅

Open Toolbar