1. 程式人生 > >如何把核心、uboot、和根檔案系統下載到開發板中

如何把核心、uboot、和根檔案系統下載到開發板中

1、首先準備好所需要的檔案:u-boot、uImage、rootfs.img。

2、下載u-boot:

tftp   0x40000000   u-boot.bin

nand   erase  0    0x60000

nand    write   ox40000000   0     0x60000

現在已經把u-boot.bin燒寫到NAND FLASH了,把GEC210開發板的啟動方式開關打到NAND--BOOT一側,然後復位開發板,u-boot成功從NAND FLASH啟動了

3、設定環境變數:

setenv bootargs 'console=ttySAC0,115200 root=/dev/mtdblock4 rootfstype=yaffs rw'

setenv bootcmd tftp 40000000 uImage\; bootm\;

saveenv

4、擦除root分割槽:

nand erase 0xe00000 0xF200000

5、下載根檔案系統的yaffs映像到DRAN BANK1中

tftp 0x40000000 rootfs.img

6、將yaffs映像燒寫到nand flash的root分割槽中

nand write.yaffs 0x40000000 0xe00000 0x655200(這個資料根據下載rootfs.img這個檔案的大小而定)

7、下載核心映像

tftp 0x40000000 uImage

bootm 0x40000000

如果出現了

can't open /dev/tty2: No such file or directory

can't open /dev/tty3: No such file or directory

這些提示,大多數是rcS許可權不對,或者就是rootfs.img有錯

完成!!!!