TFTP Server

From BlueWiki

Jump to: navigation, search

TFTP server is used for transferring files onto embedded devices. For example, most boot loaders support loading a Linux kernel image via TFTP at boot. This is very useful during development.

1 Install a TFTP server

The following is tested on Ubuntu 9.04 and 10.04.

  • Install the package tftpd-hpa.
  • Configuration file /etc/default/tftpd-hpa:
RUN_DAEMON="yes"
OPTIONS="-c -l -s /tftpboot"
  • Configuration file for newer versions of tftpd-hpa (this example is from a Ubuntu 10.04.1 installation):
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-c -s"

The TFTP server’s root directory is /tftpboot/ in this example. Place files there that should be accessible via TFTP. Of course you are allowed to create subdirectories. If you have problems with downloading a file, try changing the permissions of the /tftpboot directory and/or files to 0777:

chmod 777 /tftpboot

2 Load a file with U-Boot

In U-Boot, to load the file "uImage" to address 0x1000000, type the command:

tftp 0x1000000 uImage

Note: This example is valid for Blackfin U-Boot bootloaders. (Load address may differ on other platforms.)

3 Load a file with Redboot

In Redboot, to load the file "zImage" to address 0x100000, type the command:

load -r -b 0x100000 zImage

Note: This example is valid for SBC-i.MX51.

Personal tools