2009年8月20日 星期四

How to setup tftp sever for u-boot

Install realted applications:

apt-get install putty #for connectting the EVB using the UART debug port

apt-get install tftp tftpd xinetd sysvconfig #sysvconfig for enabling xinetd when starting OS


Create one /etc/xinetd.d/tftp. Add the following content:


service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = -s /var/lib/tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}



Restarting xinetd and test the tftp:

sudo mkdir /var/lib/tftpboot
sudo cp -f ~/u-boot.bin /var/lib/tftpboot
sudo /etc/init.d/xinetd reload
sudo /etc/init.d/xinetd restart
sudo netstat -anp | grep xinetd
tftp 127.0.0.1
tftp>get u-boot.bin

The EVB uses the tftp client to get the u-boot.bin from the host computer:

SMDKC100>setenv serverip 192.168.0.180
SMDKC100>setenv ipaddr 192.168.0.181
SMDKC100>saveenv
SMDKC100>ping 192.168.0.180
SMDKC100>tftp 20008000 u-boot.bin
SMDKC100>nand erase 0 40000
SMDKC100>nand write 20008000 0 40000
SMDKC100>save
SMDKC100>re

reference:

http://www.openplug.org/plugwiki/index.php/Setting_up_Serial_Console_Under_Linux

http://wiki.jk2410.org/wiki/TFTP_Server_%E8%88%87_xinetd_%E7%9A%84%E5%AE%89%E8%A3%9D:_Debian/Ubuntu

沒有留言: