Chinaunix首页 | 论坛 | 博客
  • 博客访问: 532054
  • 博文数量: 75
  • 博客积分: 2374
  • 博客等级: 大尉
  • 技术积分: 933
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-18 14:27
文章分类

全部博文(75)

文章存档

2014年(1)

2013年(17)

2012年(10)

2011年(15)

2010年(23)

2009年(9)

我的朋友

分类: LINUX

2009-11-19 20:57:43

==================只是个人记录,未保证准确性============
用Ubuntu带的新立得安装了Scratchbox2.看了一堆官网的英文说明,似懂非懂。
里面推荐使用Sourcery的工具
“If you're targeting ARM you can get a good toolchain from CodeSourcery:
毕竟是新手,什么都不懂,先照着Professional的做法跟下去。(Scratchbox下的工具链不能在Scratchbox2下使用)
但下载的Sourcery G++ Lite 2009q3-67 for ARM GNU/Linux文件是.bin的文件,传说中的二进制文件?心里纳闷。看看资料,说这是一个EABI(Embedded Application Binary Interface).
 
EABI有什么好处呢?引用官网的话说
 

The new EABI:

  • Allows use of optimized hardfloat functions with the system's softfloat libraries
  • Uses a more efficient syscall convention
  • Will be more compatible with future tools

怎么用?怎么装?继续网上找,想不到结果没有想象中的复杂:

我下的Sourcery G++ 工具文件名是:arm-2009q3-67-arm-none-linux-gnueabi.bin

直接敲入:

~$ bash arm-2009q3-67-arm-none-linux-gnueabi.bin


接下来会出现一个视窗安装界面~
====================
之后,设定自己的开发板Target
 

$ sb2-init - /home//CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc


回车,显示:

Using /home//CodeSourcery/Sourcery_G++_Lite/bin/arm-none-linux-gnueabi-gcc to detect target architecture:
Finished writing sb2.config
Created directory /home//sb2_logs for log files
--2009-11-19 21:24:33-- http://ftp.funet.fi/pub/mirrors/ftp.gnu.org/pub/gnu/libtool/libtool-1.5.26.tar.gz
正在解析主机 ftp.funet.fi... 193.166.3.2
正在连接 ftp.funet.fi|193.166.3.2|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 2961939 (2.8M) [application/x-gzip]
保存到‘/home//.scratchbox2/libtool-1.5.26.tar.gz’

100%[===================================================================================>] 2,961,939 92.2K/s in 32s

2009-11-19 21:25:07 (90.2 KB/s) - `/home//.scratchbox2/libtool-1.5.26.tar.gz
' 已经保存 [2961939/2961939]

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.

If you meant to cross compile, use `--host'
.
See `config.log' for more details.


Running /usr/bin/sb2-build-libtool failed
You can run this manually later, otherwise your
sb2 environment is correctly setup and ready to use

发现出现最后3行,然后自己到/usr/bin/下手动运行sb2-build-libtool

:/usr/bin$ sb2 sb2-build-libtool

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.

回车,再显示一堆信息...

 

具体使用办法,未知,摸索中

===========

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