Set up tftp server
From ESS-WIKI
Commands and Configuration
sudo apt-get install xinetd tftpd tftp
vim /etc/xinetd.d/tftp (* tftp是檔案)
service tftp
{
protocol = udp
port = 69
socket_type = dgram
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /tftpboot
disable = no
}
sudo mkdir /tftpboot
sudo chmod -R 777 /tftpboot
sudo chown -R nobody /tftpboot
sudo service xinetd restart
Verification Method
# below at 172.22.31.153
adv@adv-desktop3:/tftpboot$
adv@adv-desktop3:/tftpboot$ wget https://www.nxp.com/lgfiles/sdk/lsdk2012/firmware_ls1046ardb_uboot_qspiboot.img
--2021-08-20 16:59:59-- https://www.nxp.com/lgfiles/sdk/lsdk2012/firmware_ls1046ardb_uboot_qspiboot.img
Resolving www.nxp.com (www.nxp.com)... 104.116.5.240
Connecting to www.nxp.com (www.nxp.com)|104.116.5.240|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 52531420 (50M) [text/plain]
Saving to: ‘firmware_ls1046ardb_uboot_qspiboot.img’
firmware_ls1046ardb_uboot_qspibo 100%[========================================================>] 50.10M 2.43MB/s in 21s
2021-08-20 17:00:20 (2.43 MB/s) - ‘firmware_ls1046ardb_uboot_qspiboot.img’ saved [52531420/52531420]
adv@adv-desktop3:/tftpboot$ ls
firmware_ls1046ardb_uboot_qspiboot.img tftptest.txt
adv@adv-desktop3:/tftpboot$
# below at 172.22.31.142
adv@risc8:~/William$ tftp 172.22.31.153
tftp> get firmware_ls1046ardb_uboot_qspiboot.img
Received 52766307 bytes in 38.7 seconds
tftp> ls
?Invalid command
tftp> quit
adv@risc8:~/William$ ls
firmware_ls1046ardb_uboot_qspiboot.img flexbuild_lsdk2012 flexbuild_lsdk2012.tgz tftptest.txt
adv@risc8:~/William$