linux基础复习(5)建立linux开发环境
可见,对应不同类型的Flash ,Jflash 程序使用不同的选项参数,因为我们使用的是64M 三星Nand Flash,因此使用“/t=5”。
执行以下命令开始烧写vivi,如图所示。
#./Jflash-s3c2440 vivi /t=5
注意:如果您在当前目录下执行该命令,请先copy 一份vivi 二进制文件到该目录。
1.2.2
minicom
minicom 是Linux 上最常用的终端仿真程序,它类似于Windows 下的“超级终端”的程序,一般完全安装大部分发行版的Linux 时都会包含它,下面介绍它的使用方法。
使用minicom 之前先设置一下,如下图所示:
#minicom -s ;加“-s” 选项设置minicom
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new windownCTRL+Mouse wheel to zoom in/out';} onclick=if(!this.resized) {return true;} else {window.open(this.src);} alt= src=http://blogimg.chinaunix.net/blog/upfile2/080412131120.jpg onload=if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new windownCTRL+Mouse wheel to zoom in/out';} border=0>
运行“minicminicom -s”设置minicom
选择菜单中的“Serial port setup”,按回车,进入如下图所示界面。此时按“A”以设置“Serial
Device”(如果您使用串口1,则输入/dev/ttyS0,如果您使用串口2,则输入/dev/ttyS1)。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new windownCTRL+Mouse wheel to zoom in/out';} onclick=if(!this.resized) {return true;} else {window.open(this.src);} alt= src=http://blogimg.chinaunix.net/blog/upfile2/080412131208.jpg onload=if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new windownCTRL+Mouse wheel to zoom in/out';} border=0>
设置“Serial Device”
按“E”键进入设置“bps/par/Bits”(波特率)界面,如下图所示。再按“I”以设置波特率
为115200。设置波特率
然后按回车退回到上一级菜单,按“F”键设置“Hardware Flow Control”为“NO”,其他
选项使用缺省值,如下图所示。
screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.style.cursor='hand'; this.alt='Click here to open new windownCTRL+Mouse wheel to zoom in/out';} onclick=if(!this.resized) {return true;} else {window.open(this.src);} alt= src=http://blogimg.chinaunix.net/blog/upfile2/080412131325.jpg onload=if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt='Click here to open new windownCTRL+Mouse wheel to zoom in/out';} border=0>
设置“HardwarHardware Flow Control ”
设置完毕,按回车键返回到串口设置主菜单,选择“Save setup as dfl”,按回车键保存刚才
的设置.再选择“Exit”退出设置模式。刚才的设置被保存到“/etc/minirc.dfl”。
设置完毕,如果此时打开板子的电源开关,就会看到vivi 的启动信息,当Linux 启动以后,
minicom 就相当于虚拟终端,你就能通过它来操作目标板了。
要退出minicom,同时按下“Ctrl+A”键,松开后紧接着再按下“Q”键,在跳出的窗口中,
选择Yes退出minicminicom
2 配置和编译 BIOS(vivi)
首先,进入vivi 源代码目录:
#cd /opt/FriendlyARM/QQ2440/vivi
再执行“make”开始编译:
#make
如果编译过程顺利,将会在当前目录下生成vivi 二进制映象文件。
说明:该编译过程为默认设置,如果你想改变vivi 的某些配置,可以执行“make menuconfig”
来定制vivi。
配置和编译内核(kernel)
QQ2440 所用的内核源代码位于/opt/FriendlyARM/QQ2440/linux-2.6.13 目录。该目录下有三
个config_开头的文件:
config_cs8900_n35
config_cs8900_s35
config_cs8900_tft640480
您可以选择适合自己LCD 型号的配置文件,复制一个名为.config 的文件
#cp
config_cs8900_tft640480
.config
注意:config
之前有个”
。”
然后执行make menuconfig
#make
menuconfig
注意:该步骤一定要执行。
如果您对内核的配置不熟悉,先不用作任何修改,保存退出即可。
最后执行make zImage 开始编译内核。
#make
zImage
编译完毕,将在arch/arm/boot
目录下生成zImage 文件,即linux 内核文件映象。
制作 YAFFS 文件系统映象
使用mkyaffsimg 程序可以把一个目录做成一个yaffs 映象文件,然后使用USB 下载到板子
中。
4.1
基本文件系统映象
为了制作板子所需要的基本系统映象文件,可以按照这样的步骤执行操作:
#cd /opt/FriendlyARM/QQ2440
#mkyaffsimage
root_default
root_default.img
将在/opt/FriendlyARM/QQ2440 目录下生成root_default.img,在BIOS 模式下
评论