Introduction: Setting Up TFTP Server for PetaLinux

Trivial file transport protocol (TFTP) is a simple protocol for transferring files between a server and a client on a network. Due to its simplicity, TFTP is a protocol that can be supported on very small, low powered systems.

In this Instructable I will go over the few steps you need to take to set up a TFTP server on your Linux machine. This will allow you to utilize the TFTP boot functionality within PetaLinux, which allows your embedded target, such as a Zybo or Zedboard (though any Xilinx FPGA running MicroBlaze can also be used) to boot via TFTP. This boot method can be a significant time saver, as it allows you to make changes to kernel source code without needing to reflash the image on your target device every time.

Step 1: Download a TFTP Server Package

You may already have the required packages installed. To check, enter the following command in your terminal:

dpkg -s xinetd tftpd-hpa

The terminal will then output some information which will let you know if you already have the packages installed (see image above). If you do not have these packages installed enter the following command into your terminal to get them (though you will likely have xinetd already):

sudo apt-get install xinetd tftpd-hpa

If you are running a RedHat flavor distribution, the following command will be what you need:

yum -y install xinetd tftp-server

Step 2: Configure Your TFTP Server

Now that you have the packages downloaded, you'll need to check on the TFTP's configuration file. As xinetd is the 'super server' from which the TFTP server operates, the configuration file should be in the xinetd.d directory. If the file is missing, you'll need to create one. You can use whatever text editor you like, or just enter in the following command to do this with nano.

sudo nano /etc/xinetd.d/tftp

Make sure that the contents of the file match what is shown in the image above. If the tftp file already exists, just verify that the 'disable' parameter is set to no.

disable = no

Press 'Ctrl+x' to prompt exit, hit 'y' to save changes, then hit enter and nano should kick you back into the terminal.

Step 3: Configure TFTP Boot in PetaLinux

The last step here is to check that TFTP Boot is enabled in your PetaLinux project settings.

First, change directory to the root of your PetaLinux project. Then enter into the configuration menu (first image above) with the following command: (*make sure your terminal is at least at standard width, otherwise the menu will fail to launch)

petalinux-config

Use the arrow keys to highlight the 'Image Packaging Configuration' option and hit enter. Navigate down the next menu (second image above) and make sure the option 'Copy final images to tftpboot' is selected, indicated by [*].

Step 4: Stretch & Snack

Stand up and have a solid stretch! Grab a snack maybe (see image). This was a long one, and you earned a break.

Comments

About This Instructable

1,660views

14favorites

License:

More by NAEastland:Getting Started With PetaLinuxSetting Up TFTP Server for PetaLinuxHow to Make a 3D Printed Microcontroller Case
Add instructable to: