命令:
loadb - load binary file over serial line (kermit mode)
loadx - load binary file over serial line (xmodem mode)
loady - load binary file over serial line (ymodem mode)
[u-boot@MINI2440]# loadb ## Ready for binary (kermit) download to 0x30008000 at 115200 bps...
(Back at MAGI-Linux) ---------------------------------------------------- C-Kermit 8.0.211, 10 Apr 2004,for Linux Copyright (C) 1985, 2004, Trustees of Columbia University in the City of New York. Type ?or HELP for help. (/home/tekkaman/桌面/) C-Kermit>send/home/tekkaman/development/share/zImage.img
C-kermit就开始传送,并且显示一个传送界面,并动态显示传送进度。
C-Kermit 8.0.211, 10 Apr 2004, MAGI-Linux
Current Directory:/home/tekkaman/��~L�~]� Communication Device:/dev/ttyUSB0 Communication Speed: 115200 Parity:none RTT/Timeout: 01 / 02 SENDING:/home/tekkaman/development/share/zImage.img => zImage.img File Type: BINARY File Size: 2277540 Percent Done: 19 /-
...10...20...30...40...50...60...70...80...90..100 Estimated TimeLeft: 00:03:35 Transfer Rate, CPS: 8536 Window Slots: 1 of 1 Packet Type: D Packet Count: 557 Packet Length: 1000 ErrorCount: 0 Last Error: Last Message:
X to cancel file, Z to cancel group,<CR> to resend last packet, E to sendError packet, ^C to quit immediately, ^L to refresh screen.
传送完毕后,输入c ,回到U-boot的串口界面。
[u-boot@MINI2440]# loadb ## Ready for binary (kermit) download to 0x30008000 at 115200 bps...
(Back at MAGI-Linux) ---------------------------------------------------- C-Kermit 8.0.211, 10 Apr 2004,for Linux Copyright (C) 1985, 2004, Trustees of Columbia University in the City of New York. Type ?or HELP for help. (/home/tekkaman/桌面/) C-Kermit>send/home/tekkaman/development/share/zImage.img (/home/tekkaman/桌面/) C-Kermit>c Connecting to /dev/ttyUSB0, speed 115200 Escape character: Ctrl-\(ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ---------------------------------------------------- ## Total Size = 0x0022c0a4 = 2277540 Bytes ## Start Addr = 0x30008000
[u-boot@MINI2440]# ping 192.168.1.100 dm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 08:08:11:18:12:27 operating at 100M full duplex mode Using dm9000 device host 192.168.1.100 is alive
如果出现:
[u-boot@MINI2440]# ping 192.168.1.100 dm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 08:08:11:18:12:27 operating at 100M full duplex mode Using dm9000 device ping failed; host 192.168.1.100 is not alive
如果网络畅通,下面就可以使用下面的命令从tftp目录或者nfs目录下载文件到SDRAM了。 命令: dhcp - boot image via network using DHCP/TFTP protocol rarpboot- boot image via network using RARP/TFTP protocol nfs - boot image via network using NFS protocol tftpboot- boot image via network using TFTP protocol bootp - boot image via network using BOOTP/TFTP protocol 这几个命令的格式都是:<指令> [目的SDRAM地址] [[主机IP:]文件名]
[u-boot@MINI2440]# nfs 0x30008000 192.168.1.100:/home/tekkaman/development/share/u-boot.bin dm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 08:08:11:18:12:27 operating at 100M full duplex mode Using dm9000 device File transfer via NFS from server 192.168.1.100; our IP address is 192.168.1.101 Filename '/home/tekkaman/development/share/u-boot.bin'. Load address: 0x30008000 Loading:################################################### done Bytes transferred = 256220 (3e8dc hex) [u-boot@MINI2440]#tftp u-boot.bin dm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 08:08:11:18:12:27 operating at 100M full duplex mode Using dm9000 device TFTP from server 192.168.1.100; our IP address is 192.168.1.101 Filename 'u-boot.bin'. Load address: 0x30008000 Loading: T ################## done Bytes transferred = 256220 (3e8dc hex) [u-boot@MINI2440]#dhcp 192.168.1.100:u-boot.bin dm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 08:08:11:18:12:27 operating at 100M full duplex mode BOOTP broadcast 1 BOOTP broadcast 2 DHCP client bound to address 192.168.1.101 Using dm9000 device TFTP from server 192.168.1.100; our IP address is 192.168.1.101 Filename 'u-boot.bin'. Load address: 0x30008000 Loading:################## done Bytes transferred = 256220 (3e8dc hex) [u-boot@MINI2440]#bootp 192.168.1.100:u-boot.bin dm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 08:08:11:18:12:27 operating at 100M full duplex mode BOOTP broadcast 1 BOOTP broadcast 2 DHCP client bound to address 192.168.1.101 Using dm9000 device TFTP from server 192.168.1.100; our IP address is 192.168.1.101 Filename 'u-boot.bin'. Load address: 0x30008000 Loading:################## done Bytes transferred = 256220 (3e8dc hex) [u-boot@MINI2440]# rarpboot 192.168.1.100:u-boot.bin
NAND scrub: device 0 whole chip Warning: scrub option will erase all factory set bad There is no reliable way to recover them. Use this command only for testing purposes if you are sure of what you are
Really scrub this NAND flash?<y/N> Erasing at 0x2f4000008000000 -- 0% complete. NAND 128MiB 3,3V 8-bit: MTD Erase failure:-5
NAND 128MiB 3,3V 8-bit: MTD Erase failure:-5
NAND 128MiB 3,3V 8-bit: MTD Erase failure:-5 Erasing at 0x7ea000008000000 -- 0% complete. NAND 128MiB 3,3V 8-bit: MTD Erase failure:-5 Erasing at 0x7fe000008000000 -- 0% complete. OK [u-boot@MINI2440]# nand bad
[u-boot@MINI2440]#tftp 192.168.1.100:zImage.img dm9000 i/o: 0x20000300, id: 0x90000a46 DM9000: running in 16 bit mode MAC: 08:08:11:18:12:27 operating at 100M full duplex mode Using dm9000 device TFTP from server 192.168.1.100; our IP address is 192.168.1.101 Filename 'zImage.img'. Load address: 0x30008000 Loading: T ################################################################# ################################################################# ########################## done Bytes transferred = 2277540 (22c0a4 hex) [u-boot@MINI2440]#nand erase 0x100000 300000