(一)u-boot-nand.bin的下載

編譯、鏈接好u-boot-nand.bin首先想到是如何下載到OK6410上,有3種方法:html

(1)dnw方法spa

(2)tftp方法.net

(3)sd卡方法htm

3種方法各有優勢和缺點,下面逐一介紹:ip

1、dnw方法內存

燒寫的過程:
① usb線和串口通訊線鏈接pc機和目標板;flash

② 此時目標板是空的,須要設置sd卡啓動,事先作好的sd卡啓動的uboot,這樣目標板的uboot就起來了;it

③ 在PC端經過dnw軟件操做目標板的uboot,輸入命令 # dnw 50008000 ;編譯

     這句話意思是啓動目標板的usb鏈接並設置目標板接收USB數據的內存起始地址爲0x50008000ftp

④ PC端dnw軟件:安裝好驅動,再發送u-boot.bin文件到目標板;

    這裏發送文件是指發到目標板的內存中,起始地址是0x50008000,注意,此時寫到SDRAM中,並無寫到目標板的nand flash

⑤ 把目標板SDRAM中的u-boot.bin文件寫到rand flash;

⑥ 這裏目標板的nand flash裏已經燒寫好u-boot.bin了,關掉目標板,再設置rand啓動就能夠了。

代碼過程以下:

// SD卡啓動

SMDK6410 # dnw 50008000

OTG cable Connected!

Now, wating for DNW to transmit data

// 選擇發送的u-boot-nand.bin

Down Done!! Down Address: 0x50008000, Download Filesize:0x30000

Checksum is being calculated.

Checksum O.K.

SMDK6410 # nand erase 0 100000

SMDK6410 # nand write.uboot 50008000 0 100000 //write(.uboot是參數不能改,且只在sd-boot中實現)

// nand 啓動

2、tftp方法

須要下載tftp32應用程序,下載連接爲http://tftpd32.jounin.net/tftpd32_download.html

將文件放入Current Directory目錄中,插好網線,確保在一個網段

命令以下:

tftp 50008000 u-boot-nand.bin

nand erase.chip

nand write.uboot 50008000 0 0

復位,nand啓動。

 3、sd卡方法

暫且不講。

相關文章
相關標籤/搜索