新聞中心

EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計應(yīng)用 > linux基礎(chǔ)復(fù)習(xí)(5)建立linux開發(fā)環(huán)境

linux基礎(chǔ)復(fù)習(xí)(5)建立linux開發(fā)環(huán)境

作者: 時間:2016-10-08 來源:網(wǎng)絡(luò) 收藏

可見,對應(yīng)不同類型的Flash ,Jflash 程序使用不同的選項參數(shù),因為我們使用的是64M 三星Nand Flash,因此使用“/t=5”。

執(zhí)行以下命令開始燒寫vivi,如圖所示。

#./Jflash-s3c2440 vivi /t=5

注意:如果您在當(dāng)前目錄下執(zhí)行該命令,請先copy 一份vivi 二進(jìn)制文件到該目錄。

1.2.2

minicom

minicom 是Linux 上最常用的終端仿真程序,它類似于Windows 下的“超級終端”的程序,一般完全安裝大部分發(fā)行版的Linux 時都會包含它,下面介紹它的使用方法。

使用minicom 之前先設(shè)置一下,如下圖所示:

#minicom -s ;加“-s” 選項設(shè)置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”設(shè)置minicom

選擇菜單中的“Serial port setup”,按回車,進(jìn)入如下圖所示界面。此時按“A”以設(shè)置“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>

設(shè)置“Serial Device”

按“E”鍵進(jìn)入設(shè)置“bps/par/Bits”(波特率)界面,如下圖所示。再按“I”以設(shè)置波特率

為115200。設(shè)置波特率

然后按回車退回到上一級菜單,按“F”鍵設(shè)置“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>

設(shè)置“HardwarHardware Flow Control ”

設(shè)置完畢,按回車鍵返回到串口設(shè)置主菜單,選擇“Save setup as dfl”,按回車鍵保存剛才

的設(shè)置.再選擇“Exit”退出設(shè)置模式。剛才的設(shè)置被保存到“/etc/minirc.dfl”。

設(shè)置完畢,如果此時打開板子的電源開關(guān),就會看到vivi 的啟動信息,當(dāng)Linux 啟動以后,

minicom 就相當(dāng)于虛擬終端,你就能通過它來操作目標(biāo)板了。

要退出minicom,同時按下“Ctrl+A”鍵,松開后緊接著再按下“Q”鍵,在跳出的窗口中,

選擇Yes退出minicminicom

2 配置和編譯 BIOS(vivi)

首先,進(jìn)入vivi 源代碼目錄:

#cd /opt/FriendlyARM/QQ2440/vivi

再執(zhí)行“make”開始編譯:

#make

如果編譯過程順利,將會在當(dāng)前目錄下生成vivi 二進(jìn)制映象文件。

說明:該編譯過程為默認(rèn)設(shè)置,如果你想改變vivi 的某些配置,可以執(zhí)行“make menuconfig”

來定制vivi。

配置和編譯內(nèi)核(kernel)

QQ2440 所用的內(nèi)核源代碼位于/opt/FriendlyARM/QQ2440/linux-2.6.13 目錄。該目錄下有三

個config_開頭的文件:

config_cs8900_n35

config_cs8900_s35

config_cs8900_tft640480

您可以選擇適合自己LCD 型號的配置文件,復(fù)制一個名為.config 的文件

#cp

config_cs8900_tft640480

.config

注意:config

之前有個”

。”

然后執(zhí)行make menuconfig

#make

menuconfig

注意:該步驟一定要執(zhí)行。

如果您對內(nèi)核的配置不熟悉,先不用作任何修改,保存退出即可。

最后執(zhí)行make zImage 開始編譯內(nèi)核。

#make

zImage

編譯完畢,將在arch/arm/boot

目錄下生成zImage 文件,即linux 內(nèi)核文件映象。

制作 YAFFS 文件系統(tǒng)映象

使用mkyaffsimg 程序可以把一個目錄做成一個yaffs 映象文件,然后使用USB 下載到板子

中。

4.1

基本文件系統(tǒng)映象

為了制作板子所需要的基本系統(tǒng)映象文件,可以按照這樣的步驟執(zhí)行操作:

#cd /opt/FriendlyARM/QQ2440

#mkyaffsimage

root_default

root_default.img

將在/opt/FriendlyARM/QQ2440 目錄下生成root_default.img,在BIOS 模式下



關(guān)鍵詞:

評論


相關(guān)推薦

技術(shù)專區(qū)

關(guān)閉