Networking Configuration Procedures

U‑Boot allows user to download/retrieve a image via a TFTP server or NFS server. These networking supports are not mandatory but will significantly decrease image download time. This section will describe how to setup a TFTP server and /or a NFS server under CentOS.

NFS server also allows NFS-mount root file system (or NFS mount) on the targeting board. This is normally used during application development stage. The main idea here is to provide application/software developers a rapid turnaround during testing and development environment, because downloading the modified file system image to the target hardware is not necessary.

TFTP Server
Trivial File Transfer Protocol (TFTP) is a very simple file transfer protocol, with the functionality of a very basic form of FTP.

Installing TFTP File Server
Install the TFTPD server (3 packages are needed xinetd, tftp-server, and tftp) on the host machine if not already exists.

To install xinetd, tftp-server, and tftp in CentOS

$ yum install xinetd tftp-server tftp
Setting up configuration file for TFTP File Server
Create the /tftpboot directory and allow everyone has full control of TFTPBOOT direcotry

$ sudo mkdir /tftpboot
$ sudo chmod -R 777 /tftpboot
$ sudo chown -R nobody /tftpboot
Create /etc/xinetd.d/tftp (if not exists) and include the following

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

$ sudo /etc/init.d/xinetd start
Testing TFTP
Ensure tftpd service is up and running

$ netstat -l -u │ grep tftp
udp 0 0 *:tftp *:*
Create a foo file under /tftpboot directory and see if you can grab a file

$ tftp localhost
tftp> get foo
tftp> quit
$ ls -l foo
-rw-r–r– 1 wu wu 0 Oct 8 23:43 foo
NFS Server
Network File System (NFS) allows system to share files and folders on the network. This enables the user to access directories and/or files on a remote machine while appearing to be local files or directory. NFS support is particular interesting to manage multiple hardware design platform.

Setting up an NFS Server
In order to provide NFS service, two packages must be installed that are nfs-utils and portmap

To install nfs-utils and portmap in CentOS

$ yum install nfs-utils portmap
Setting up Configuration file for PetaLinux environment
The main configuration file you will need to edit to set up an NFS server: /etc/exports. This file contains a list of entries; each entry indicates a volume that is shared and how it is shared. Check the man pages (man exports) for a complete description of all the setup options for the file, although the description here will probably satisfy most people’s needs or refer to NFS-HOWTO

In here we want to share the $PETALINUX/hardware directory with read and write access to all the machines with IP addresses between and (Local Area Network). Any read or write operations from remote machine are treated as local user id 500 and local group id 500.

/home/user/petalinux/hardware \,sync,all_squash,anonuid=500,anongid=500))
Note: The above example uses IP range from and ( and export path “/home/user/petalinux/hardware”. Change as per appropriate. The text should be entered on a single line, without the continuation backslash (‘\’) characters.

To start the NFS and portmap services