1. Install the server, client and daemon
#sudo apt-get install tftp-hpa tftpd-hpaxinetd
2. Server Configuration
First, build a tftpboot in the root directory, and change the attributes of any user readability:
#cd /
#sudo mkdir tftpboot
#sudo chmod 777 tftpboot
Then, go to the directory /etc/xinetd.d/, and in which the new file tftp, the designated content is added to the tftp file:
#cd /etc/xinetd.d/
#sudo vi tftp
Add the following to the file tftp
service tftp
{
disable = no 138
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot –c
per_source = 11
cps = 100 2
}
Finally, modify the configuration file / etc / default / tftpd-hpa, revised to
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure -l -c -s"
Note: The "TFTP_DIRECTORY" was changed to the New Path tftpboot directory.
3. Restart Service
#sudo /etc/init.d/xinetd reload
#sudo /etc/init.d/xinetd restart
#sudo /etc/init.d/tftpd-hpa restart
4. Test Server
Test, in the / tftpboot folder to create a new file
#touch abc
Enter another folder
#tftp 192.168.2.51 (192.168.2.51 native IP)
#tftp> get abc
If you can download instructions server has been installed successfully, the development board to use tftp to download files with the PC connected via a network cable.
tftp command usage is as follows
tftp your-ip-address
Enter TFTP operation:
connect: connect to the remote server tftp
mode: File Transfer Profile
put: Upload file
get: Download file
quit: Exit
verbose: Displays detailed processing information
tarce: Display package path
status: Displays the current status information
binary: the binary transfer mode
ascii: ascii transfer mode
rexmt: Set packet transmission timeout
timeout: set the timeout retransmission
help: help
? :help information
5.] uboot use tftp
(1) Copy connection with the host and the development board and the cable network port and uImage compiled kernel image file to the device tftpboot directory tree
. (2) into the stage uboot, modify environment variables and save:
setenv
ethaddr e6: 97: d9: 0c: f7: 7a provided MAC
setenv
serverip 192.168.2.51 set tftp server IP
setenv
ipaddr 192.168.2.85 set the local IP
setenv
image imx6qdl / zImage tftp server is provided to be downloaded to the local kernel image
setenv
fdt_file imx6qdl / imx6q-s3-sabresd.dtb disposed downloaded to the local device tree tftp server
setenv
nfs_rootfs / nfs_rootfs / imx6qdl-rootfs disposed NFS file system location
saveenv
(3) Select Network Boot menu in uboot
Restart development board, uboot after the start, quickly press any key to enter the uboot menu.
----------------------MainMenu-----------------------
0 -- exitto uboot shell
1 --select boot mode
Enter the number 1 into the startup type selection options
----------------------BOOTMODE Menu-----------------------
0 -- exitto upper menu
1 -- bootfrom net
2 -- bootfrom emmc
Input No. 1 is provided to start from the network boards, boards can then restart.
If you want to start from emmc after, the same way you can select boot from emmc.