Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3309767
  • 博文数量: 754
  • 博客积分: 10132
  • 博客等级: 上将
  • 技术积分: 7780
  • 用 户 组: 普通用户
  • 注册时间: 2008-01-14 23:36
文章分类

全部博文(754)

文章存档

2012年(3)

2011年(39)

2010年(66)

2009年(167)

2008年(479)

我的朋友

分类: LINUX

2008-05-03 14:40:32

首先介绍一下要下载的资源和网址:

因为我是在windows下编译一套for arm 的tool chain,所以用到了cygwin这个东东.

cygwin 1.5.19  在 上有下载;

工具链binutils2.17 在 有下载;

GCC4.1.1 在 有下载;

GDB6.5 ,Insight等等工具在 上都有下载;

这些工具的介绍在 上.

一. 安装cygwin(关于cygwin的介绍在)

Cygwin 是windows系统下的一个类linux环境. 它包含如下部分:

  • A DLL (cygwin1.dll) which acts as a Linux API emulation layer providing substantial Linux API functionality.
  • A collection of tools which provide Linux look and feel.Include the tool chain for i86(IA32)
  •  Cygwin is not a way to run native linux apps on Windows. You have to rebuild your application from source if you want it to run on Windows.这就是为什么要采用源码安装的方法
  • Cygwin is not a way to magically make native Windows apps aware of UNIX ® functionality, like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.不能够完全替代linux

    下载的地址在 上可以找得到.

    安装过程完全是GUI,基本没有什么难度,唯一要注意的是选择用户主目录,选择一个你较为熟悉的目录,最好和其他将要安装的包在同一个目录下; 最后安装包的选择也要注意一下,如果是第一次安装这个东东的话最好是全部都选择,如果很熟悉开发组件和库之间的依赖关系的话,可以自由选择需要的组件和库.

    二.在cygwin上用源码安装binutils

    1.binutils的介绍(网上的介绍在)

    binutils 是一套binary utilities,主要包括:

    • ld - the GNU linker.
    • as - the GNU assembler.

    当然也会包含一些分析二进制文件实用工具:

    • addr2line - Converts addresses into filenames and line numbers.
    • ar - A utility for creating, modifying and extracting from archives.
    • c++filt - Filter to demangle encoded C++ symbols.
    • gprof - Displays profiling information.
    • nlmconv - Converts object code into an NLM.
    • nm - Lists symbols from object files.
    • objcopy - Copys and translates object files.
    • objdump - Displays information from object files.
    • ranlib - Generates an index to the contents of an archive.
    • readelf - Displays information from any ELF format object file.
    • size - Lists the section sizes of an object or archive file.
    • strings - Lists printable strings from files.
    • strip - Discards symbols.
    • windres - A compiler for Windows resource files.

    其中大多数工具使用BFD, the Binary File Descriptor library, 做一些低层的操作. 许多工具也直接使用 opcodes library 来汇编和反汇编机器指令.binutils已经移植到很多主流的Unix变种系统上,它们主要是用来给GNU system(GNU/Linux)提供编译和链接程序的工具.

    源代码下载的地址:

    2.在cygwin上安装的简单过程.

        首先将下载的源码安装包拷贝到一个临时目录(我假设是/tmp):

        $ cp 你下载的目录地址 /tmp

        $ cd /tmp

        在这里简单讲一下压缩包最主要的格式及解压缩的方法:

    1. tar : 用tar 命令就可以了                  $ tar -xvf  binutils-2.17.tar
    2. gz : 用tar命令带上z参数                  $ tar -zxvf binutils-2.17.tar.gz
    3. bz2 : 用tar命令带上j参数                $ tar -jxvf binutils-2.17.tar.bz2

        然后进入目录 /tmp/binutils-2.17

         $ cd /tmp/binutils-2.17

         配置要安装的目标系统和目标目录

          --target 指示你将要安装的这套工具作用的文件是在哪个平台下的

          --prefix 安装的目标目录

          $ ./configure --target=arm-elf  --prefix=/选择你要将可执行程序安装到什么目录下

          编译源程序:$ make

          安装程序:$ make install

    三.在cygwin上用源码安装GCC

    四.在cygwin上用源码安装GDB及Insight

    五.开发辅助工具source-navigator以及split的介绍与安装

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