Howto Install and setup TFTPD in Ubuntu workstation

I was doing my own project using TMS320DM355 EVM with MontaVista realtime Linux is installed some months ago.  At that time, I search in Google many times but I didn’t get success to install TFTP. Finally, I found out one great tutorial about that. In my system, I use TFTP protocol to download Linux kernel, U-boot bootloader to DM355 EVM kit.

What is TFTP ?

Trivial File Transfer Protocol (TFTP) is a file transfer protocol, with the functionality of a very basic form of File Transfer Protocol (FTP); it was first defined in 1980.

Due to its simple design, TFTP can be implemented in a very small amount of memory — an important consideration at that time. It was therefore useful for booting computers such as routers which did not have any data storage devices. It is still used to transfer small amounts of data between hosts on a network, such as IP phone firmware or operating system images when a remote X Window System terminal or any other thin client boots from a network host or server. The initial stages of some network based installation systems (such as Solaris Jumpstart, Red Hat Kickstart and Windows NT’s Remote Installation Services) use TFTP to load a basic kernel that performs the actual installation.

TFTP is based in part on the earlier protocol EFTP, which was part of the PUP protocol suite. In the early days of work on the TCP/IP protocol suite, TFTP was often the first protocol implemented on a new host type, because it was so simple.

See here for more information

Howto install and setup

In my system, I use Ubuntu 8.04 as Workstation computer to communicate with DM355EVM. You can also use these steps with Ubuntu 8.10 or Ubuntu 9.04.

1. Install tftpd and related packages.

$ sudo apt-get install xinetd tftpd tftp

2. Create /etc/xinetd.d/tftp and put this entry:

service tftp
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot
disable         = no

3. Make /tftpboot directory

$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot

4. Start tftpd through xinetd

$ sudo /etc/init.d/xinetd start

5. Testing. Tranfering file hda.txt from (Client using tftp) to (Server Get an example file to transfer (eg. hda.txt)

$ touch /tftpboot/hda.txt
$ chmod 777 /tftpboot/hda.txt
$ ls -l /tftpboot/
total 0
-rwxrwxrwx  1 davids davids 0 2006-03-27 23:04 hda.txt
$ tftp
tftp> put hda.txt
Sent 722 bytes in 0.0 seconds
tftp> quit
$ ls -l /tftpboot/
total 4
-rwxrwxrwx  1 davids davids 707 2006-03-27 23:07 hda.txt

Now we will be able to download new kernel file to my EVM board. Note that you have to configure the bootargs parameters correctly, otherwise you can’t download to your EVM board. I will introduce how to setup in Ubuntu in another post.


{ 0 comments… add one }

Leave a Comment