Skip to content

TFTP server setup

November 15, 2012

While working with any embedded development kit, Using TFTP to transfer files between Host PC and target device is a good solution.

Read more about tftp on this link

Basically, In this method we will create a TFTP server on Host PC which will be a kind of the directory in Host PC. The files in that directory will be available to all who supports TFTP and can do file transfers also.

One of the key usage of this TFTP server is while developing kernel images we should not flash the kernel images all the time on embedded dev kit’s flash memory. because it will reduce the flash memory’s life. for more information you can refer to this wiki link.

So, that was some briefing about TFTP and now let us see the steps to set up that server.

I am using Ubuntu 12.04.

First Install following packages:

$sudo apt-get install xinetd tftpd tftp
Now create file /etc/xinetd.d/tftp

$gedit /etc/xinetd.d/tftp

Write following in the file tftp

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

Now let us create tftpboot directory where all the files of tftp server will be stored

$sudo mkdir /tftpboot

$sudo chmod -R 777 /tftpboot

$sudo chown -R nobody /tftpboot

Now, Restart the xinet tftpd so that our tftp server gets ready to work.

$sudo /etc/init.d/xinetd stop

$sudo /etc/init.d/xinetd start

And That’s it. TFTP server is ready now.

Enjoy.

Thanks.

Advertisements

From → Linux

2 Comments
  1. Krishna Solanki permalink

    nice Article.. 😛

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: