分类: LINUX
2011-08-06 22:26:05
u-boot是否可以在没有linux server的情况下通过网络load要更新的文件呢? 可以的。我们可以在windows下搭建tftp server,通过u-boot中的tftp来load要更新的文件!做法如下:
1. Unzip tftpd32.400.zip
进入tftpd32.400, 双击tftpd32.exe,
设置Current Directory,选择Browse,找到你要load的文件的目录,
设置 Server interfaces为你的windows的ip地址(10.5.2.249),
选择Show Dir可以查看tftp server输出的文件
2.重启u-boot
Board: STx7108-HDK [32-bit mode]
U-Boot 1.3.1 (Jul 1 2011 - 12:13:45) - stm24_0053
DRAM: 128 MiB
NOR: 128 MiB
NAND: Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
nand_read_bbt: Bad block at 0x0e780000
nand_read_bbt: Bad block at 0x231c0000
nand_read_bbt: Bad block at 0x25960000
nand_read_bbt: Bad block at 0x27000000
nand_read_bbt: Bad block at 0x27020000
1024 MiB
SPI: info: found ST N25Q128 (16MiB) device (page=256,erase=65536)
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
HDK7108>set ipaddr 10.5.3.67;set gatewayip 10.5.1.251;set netmask 255.255.252.0;set serverip 10.5.2.249
HDK7108> tftp 80000000 vmlinux.ub
Warning: MAC addresses don't match:
HW MAC address: FF:FF:FF:FF:FF:FF
"ethaddr" value: DE:ED:00:BE:EF:00
Using MAC Address DE:ED:00:BE:EF:00
STM-GMAC: IC+ IP1001 found
STM-GMAC: 100Mbs full duplex link detected
TFTP from server 10.5.2.249; our IP address is 10.5.3.67
Filename 'vmlinux.ub'.
Load address: 0x80000000
Loading: #################################################################
#################################################################
##################
done
Bytes transferred = 2172011 (21246b hex)
HDK7108> imi 80000000
## Checking Image at 80000000 ...
Image Name: linux-sh4-2.6.23.17_stm23_A27
Image Type: SuperH Linux Kernel Image (gzip compressed)
Data Size: 2171947 Bytes = 2.1 MiB
Load Address: 80800000
Entry Point: 80801000
Verifying Checksum ... OK
HDK7108>
插图不能粘贴,可以参看附件中的pdf using_tftp_server_under_windows_for_u-boot_load_files.pdf tftpd32.400.zip