TFTP is the simplest network protocol used to download remote files. It is based on UDP.
Use the RedHat Linux 9 3rd CD. The following are root logon operations:
(1) install TFTP-server
# Mount/mnt/cdrom
# Cd/mnt/cdrom/RedHat/RPMS
# Rpm-ivh tftp-*. i386.rpm
# Cd ~
# Umount/mnt/cdrom
(2) modifying files
# Vi/etc/xinetd. d/tftp
Service tftp
{
Socket_type = dgram
Protocol = udp
Wait = yes
User = root
Server =/usr/sbin/in. tftpd
Server_args =-s/home/liuby/tftpboot-c # modify Note:-s specifies the directory.-c indicates that files can be created.
Disable = no # modify
Per_source = 11
CPIs = 100 2
Flags = IPv4
}
(3) start the service
Create a TFTP Server
# Mkdir-m 777/home/liuby/tftpboot
# Service xinetd restart
(4) In the command line setup, select tftp in system services (or ntsysv), and the command line lokkit to disable firewall.
(5) Restart TFTP
# Service xinetd restart
(6) test
# Tftp 192.168.0.2
Tftp> get
Tftp> put
Tftp> q
(7) target board test (operations on the following target board)
Assume that zImage exists in the server/home/liuby/tftpboot, or the cross-compiled application helloworld. o, etc.
# Tftp 192.168.0.2
Tftp> get helloworld. o
Tftp> q
# Chmod + x helloworld. o
#./Helloworld. o
(8) download the hello. o file of server (59.64.155.12) on the mpc8349 Board
# Tftp-g 59.64.155.12-r hello. o
# Chmod + x hello. o
#./Hello. o
++ ++