1.VMware下ubuntu12.04开发环境搭建
3、源列表更新
建议使用网易源,比较稳定速度也比较快,更新源的方法如下:
root@ubuntu:/# cd /etc/apt/
备份之前的源列表文件,并创建新的源列表文件 sources.list
root@ubuntu:/# vi sources.list
在打开的文件中输入以下列表:
deb http://mirrors.163.com/ubuntu/ precise main restricted
deb-src http://mirrors.163.com/ubuntu/ precise main restricted
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
deb http://mirrors.163.com/ubuntu/ precise universe
deb-src http://mirrors.163.com/ubuntu/ precise universe
deb http://mirrors.163.com/ubuntu/ precise-updates universe
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
deb http://mirrors.163.com/ubuntu/ precise multiverse
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ precise-security main restricted
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted
deb http://mirrors.163.com/ubuntu/ precise-security universe
deb-src http://mirrors.163.com/ubuntu/ precise-security universe
deb http://mirrors.163.com/ubuntu/ precise-security multiverse
deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse
deb http://extras.ubuntu.com/ubuntu precise main
deb-src http://extras.ubuntu.com/ubuntu precise main
保存之后退出,用如下命令更新源列表:
root@ubuntu:/# sudo apt-get update
3、更新成功之后就可以进行软件的安装了,以下安装一些常用必备的软件:
root@ubuntu:/# apt-get install build-essential
root@ubuntu:/# apt-get install libncurses5-dev
root@ubuntu:/# apt-get install bison
root@ubuntu:/# apt-get install flex
root@ubuntu:/# apt-get install gettext
root@ubuntu:/# apt-get install texinfo
root@ubuntu:/# apt-get install subversion
(注意:更改sourse.list后需要重启)
2.安装gcc4.3.2
解压gcc4.3.2,并安装到路径/usr/local/arm/4.3.2/lib/arm-none-linux-gnueabi3.bootstrap编译
1、vi ~/.bashrc 修改环境变量 在其最后一行加上export PATH=usr/local/arm/4.3.2/bin:$PATH source ~/.bashrc使其生效 2.进去工作页面 3.修改makefile ifndef ERASE_FCTERASE_FCT=rm -f
endif
ifndef CROSS_COMPILE
CROSS_COMPILE=arm-linux-
endif
TOOLCHAIN=gcc
BOOTSTRAP_PATH=../../.. 然后make就可以
4.uboot编译
make clean
make at91sam9260ek-config make 就可以编译5.内核编译
make uImage ubuntu@ubuntu:~/work9260/linux-2.6-1/linux-2.6.30/arch/arm/boot$会在以上目录生成所需要的uImage文件 如果遇到的问题:/bin/sh :1:lzop:not found 解决方式:sudo apt-get install lzop