PHYTEC
Page 13
host$ sudo apt-get install tftpd-hpa
After the installation of the packages, you have to configure the TFTP server.
TFTP Server Set-Up
Edit
:
/etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure"
Create a directory to store the TFTP files:
host$ sudo mkdir /tftpboot
host$ sudo chmod -R 777 /tftpboot
host$ sudo chown -R nobody /tftpboot
Configure a static IP address for the appropriate interface:
host$ ifconfig eth1
You will receive:
eth1 Link encap:Ethernet HWaddr 00:11:6b:98:e3:47
inet addr:192.168.3.10 Bcast:192.168.3.255 Mask:255.255.255.0
Restart the services to pick up the configuration changes:
host$ sudo service tftpd-hpa restart
Now connect the Ethernet port of the board to your host system, configure the board to network boot, and start it.
Usually, TFTP servers fetch files from the
directory. If you built your own images, please copy them from the BSP’s build directory to the
d
/tftpboot
/tftpboot
irectory.
We also need a network connection between the embedded board and the TFTP server. The server should be set to IP 192.168.3.10 and netmask
255.255.255.0.
After the installation of the TFTP server, an NFS server also needs to be installed. The NFS server is not restricted to a certain file system location, so all
we have to do on most distributions is modify the file
and export our root filesystem to the embedded network. In this example file, the whole
/etc/exports
work directory is exported and the ”lab network” address of the development host is 192.168.3.10. The IP addresses have to be adapted to local needs:
/home/<user>/<rootfspath> 192.168.3.10/255.255.255.0(rw,no_root_squash,sync,no_subtree_check)
<
> must be replaced with your home directory name. <
> can be set to a folder which contains a
image extracted with
.
user
rootfspath
rootfs tar.gz
sudo
Embedded Board Preparations
To find the Ethernet settings in the bootloader of the target, type:
u-boot=> printenv
With your development host set to IP 192.168.3.10 and netmask 255.255.255.0, the target should return: