文章来源 安诺电子
首先本人对Ubuntu也不是很了解,但第一眼看到其界面就觉得:嗯,这个系统不错。下面就如何在Ubuntu下安装Blackfin嵌入式开发环境作详细的介绍。
1、安装Ubuntu
如果对Ubuntu不是很了解的话,建议在Vmware虚拟机下安装Ubuntu,这样不仅不需要来回在Windows和Ubuntu之间来回切换,还可在Windows下完成高速下载。最重要的是,可以在Windows下方便Baidu或者Google出需要的知识。
我就是在Vmware下安装的Ubuntu。
//我的注释:ubuntu11.10 可以直接安装双系统,ubuntu下可以看见 xp硬盘中的内容。恩
A:建议的硬件配置:CPU2.0G以上,内存512MB以上,空闲磁盘空间4G以上。
B:下载Ubuntu的安装文件。下面是下载地址。
CD下载: http://releases.ubuntu.com/feisty/
DVD下载: http://cdimage.ubuntu.com/releases/7.04/release/
国内BT下载:
http://bt.ubuntu.org.cn/torrents.php
上海电信服务器:
http://mirror.rootguide.org/ubuntu-releases/7.04/
lupa:
http://mirror.lupaworld.com/ubuntu/releases/7.04/
other:
http://ftp.cse.yzu.edu.tw/ftp/Linux/Ubuntu/ubuntu-cd/feisty/
http://ubuntuarchive.is.co.za/ubuntu-releases/7.04/
http://mirrors.easynews.com/linux/ubuntu-releases/7.04/
http://ftp.sk.debian.org/ubuntu-releases/7.04/
http://ftp.ines.lug.ro/ubuntu-releases/7.04/
http://ftp.gts.lug.ro/ubuntu-releases/7.04/
http://ftp.ussg.iu.edu/linux/ubuntu-releases/7.04/
http://mirror.nttu.edu.tw/ubuntu-releases/7.04/
http://ubuntu.csie.nctu.edu.tw/ubuntu-releases/7.04/
我下载的是ubuntu-7.04-alternate-i386.iso,为文字安装界面。
C:安装Vmware。这个就不用介绍了,网上下载一个Vmware5.0以上的版本安装就可以了。
D:运行vmware workstation,新建一个虚拟机,选择typical,linux,ubuntu,其他都可采用默认选项。
E:建立虚拟机后,选择菜单中的VM - settings,点击cd-rom,use ISO image,打开刚才下载的镜像文件。
F:此时即可启动虚拟机,开始ubuntu的安装过程。
G:剩下来没什么难点,一路继续就可以完成安装了。如果是在有什么地方不确定的话,可Baidu一下“Ubuntu安装图解”
2、配置Ubuntu更新源。
A:为什么要配置更新源,由于Ubuntu安装后默认的更新源为光盘,但是很有可能我们需要的一些软件不包含在光盘中,所以需要配置更新源。
B:配置方法
应用程序-附件-终端
sudo gedit /etc/apt/sources.list
这里仅提供几个常用源和教育网源
用以下内容替换文件中的所有内容
#archive
deb http://archive.ubuntu.com/ubuntu/ feisty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ feisty main restricted universe multiverse
#cn99
deb http://ubuntu.cn99.com/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-security main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://ubuntu.cn99.com/ubuntu-cn/ feisty main restricted universe multiverse
#lupa
deb http://mirror.lupaworld.com/ubuntu/archive/ feisty main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ feisty-security main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ feisty-updates main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ feisty-backports main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/archive/ feisty-proposed main restricted universe multiverse
deb http://mirror.lupaworld.com/ubuntu/ubuntu-cn/ feisty main restricted universe multiverse
#中国科技大学
deb http://debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-backports restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb http://debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-proposed main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://debian.ustc.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
#北京交大
deb http://mirror.bjtu.edu.cn/ubuntu/ feisty main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/ubuntu/ feisty-updates main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/ubuntu/ feisty-security main restricted universe multiverse
deb http://mirror.bjtu.edu.cn/ubuntu/ feisty-backports main restricted universe multiverse
sudo apt-get update
sudo apt-get dist-upgrade
#上海交通大学
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-backports main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-proposed main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-security main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu/ feisty-updates main multiverse restricted universe
deb http://ftp.sjtu.edu.cn/ubuntu-cn/ feisty main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty-backports main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty-proposed main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty-security main multiverse restricted universe
deb-src http://ftp.sjtu.edu.cn/ubuntu/ feisty-updates main multiverse restricted universe
#清华大学
deb ftp://ftp3.tsinghua.edu.cn/mirror/ubuntu/ubuntu/ feisty main restricted universe multiverse
deb ftp://ftp3.tsinghua.edu.cn/mirror/ubuntu/ubuntu/ feisty-security main restricted universe multiverse
deb ftp://ftp3.tsinghua.edu.cn/mirror/ubuntu/ubuntu/ feisty-updates main restricted universe multiverse
#兰州大学
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty-backports main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty-proposed main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty-security main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu/ feisty-updates main multiverse restricted universe
deb ftp://mirror.lzu.edu.cn/ubuntu-cn/ feisty main multiverse restricted universe
#台湾大学
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-updates main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-backports main restricted universe multiverse
deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ feisty-security main restricted universe multiverse
只用选择一个源替换就行
3、安装GCC和工具链
A:到blackfin.uclinux.org上下载
blackfin-toolchain-elf-gcc-4.1-07r1-9.i386.rpm
blackfin-tooalchain-07r1-9.i386.rpm
B:安装alien
sudo apt-get install alien
C:安装gcc
C.1:在终端执行sudo alien -t blackfin-toolchain-elf-gcc-4.1-07r1-9.i386.rpm将rpm包转换为tgz包
C.2:解压缩生成的tgz包,右键->解压缩
D:安装toolcahin
D.1:在终端执行sudo alien -t blackfin-tooalchain-07r1-9.i386.rpm将rpm包转换为tgz包
D.2:解压缩生成的tgz包,右键->解压缩
E:将解压缩后的gcc和toolchain复制到/opt目录下
目录结构如下:opt/
uClinux/
gcc/
E:设置$PATH
E.1:在终端执行sudo gedit ~/.bashrc
E.2:在打开的文档最后加入 export PATH="$PATH:/opt/gcc/bin:/opt/uClinux/bfin-uclinux/bin:/opt/uClinux/bfin-linux-uclibc/bin"
A:到blackfin.uclinux.org上下载
u-boot-1.1.6
uclinux-dist-07r1-3
B:解压缩u-boot和uclinux-dist
A:到blackfin.uclinux.org上下载
u-boot-1.1.6
uclinux-dist-07r1-3
B:解压缩u-boot和uclinux-dist,得到u-boot-1.1.6和uClinux-dist两个文件夹
5、安装ncurses
A:sudo agt-get install libncurses5-dev
6、安装zlib
A:apt-get install zlib1g-dev
7、下载安装JDK1.5
方法1:
sudo apt-get install sun-java5-jdk
方法2:
A:到sun.com下载JDK1.5
或者从如下网址下载:ftp://202.38.73.222/pub2/Java/jdk-1_5_0_07-linux-i586.bin
ftp://210.45.212.113/pub/soft/java.sun/5.0.8/jdk-1_5_0_08-linux-i586.bin
B:安装JDK1.5,具体资料可到网上搜索
C:配置好$PATH
8、下载安装Eclipse
A:到www.eclipse.org上下载Eclipse3.1.2
B:双击安装,或直接压缩
至此,开发环境基本安装完成。