Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:development:setup-tftp-server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:development:setup-tftp-server [2022/07/05 23:44]
hyphop [Setup TFTP on a Target Device]
products:sbc:common:development:setup-tftp-server [2022/07/08 05:53] (current)
frank
Line 12: Line 12:
 Install TFTP packages: Install TFTP packages:
  
-```sh+```shell
 $ sudo apt-get install openbsd-inetd tftpd tftp $ sudo apt-get install openbsd-inetd tftpd tftp
 ``` ```
  
-  * Configuration+Configuration:
  
 As root, enable the TFTP server by editing ''/etc/inetd.conf''. Locate the line that looks similar to: As root, enable the TFTP server by editing ''/etc/inetd.conf''. Locate the line that looks similar to:
Line 32: Line 32:
 Create and modify permissions on the TFTP root directory: Create and modify permissions on the TFTP root directory:
  
-```bash+```shell
 $ sudo mkdir /srv/tftp $ sudo mkdir /srv/tftp
 $ sudo chown -R $(whoami) /srv/tftp $ sudo chown -R $(whoami) /srv/tftp
Line 39: Line 39:
 Restart the TFTP Service: Restart the TFTP Service:
  
-```sh+```shell
 $ sudo /etc/init.d/xinetd restart $ sudo /etc/init.d/xinetd restart
 ``` ```
Line 47: Line 47:
 Install additional TFTP packages: Install additional TFTP packages:
  
-```sh+```shell
 $ sudo apt-get install tftp-hpa tftpd-hpa $ sudo apt-get install tftp-hpa tftpd-hpa
 ``` ```
  
-  * Configuration+Configuration:
  
 As root, edit ''/etc/default/tftpd-hpa'', and locate the line that looks similar to: As root, edit ''/etc/default/tftpd-hpa'', and locate the line that looks similar to:
  
-```sh+```shell
 TFTP_DIRECTORY="/usr/lib/tftpboot" TFTP_DIRECTORY="/usr/lib/tftpboot"
 ``` ```
  
-Change the dir to `/srv/tftp`.+Change the dir to ''/srv/tftp''.
  
-```bash+```shell
 TFTP_DIRECTORY="/srv/tftp" TFTP_DIRECTORY="/srv/tftp"
 ``` ```
 Create and modify permissions on the TFTP root directory: Create and modify permissions on the TFTP root directory:
  
-```sh+```shell
 $ sudo mkdir /srv/tftp $ sudo mkdir /srv/tftp
 $ sudo chown -R $(whoami) /srv/tftp $ sudo chown -R $(whoami) /srv/tftp
Line 73: Line 73:
 Restart the TFTP Service: Restart the TFTP Service:
  
-```sh+```shell
 $ sudo service tftpd-hpa restart $ sudo service tftpd-hpa restart
 ``` ```
Line 148: Line 148:
 Make sure you have copied the testing file to the TFTF root path: Make sure you have copied the testing file to the TFTF root path:
  
-```sh+```shell
 $ ls /srv/tftp/u-boot.bin $ ls /srv/tftp/u-boot.bin
 /srv/tftp/u-boot.bin /srv/tftp/u-boot.bin
Line 174: Line 174:
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
-  * Check your LAN cable connection, if the terminal print-out looks like: +  * Check your LAN cable connection, if the terminal print-out looks like: ```
-```+
 kvim3# tftp 1080000 u-boot.bin kvim3# tftp 1080000 u-boot.bin
 dwmac.ff3f0000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! dwmac.ff3f0000 Waiting for PHY auto negotiation to complete......... TIMEOUT !
Line 182: Line 181:
 ``` ```
  
-  * Check your server IP or filename address, if the print-out looks like: +  * Check your server IP or filename address, if the print-out looks like: ```
-```+
 kvim3#tftp 1080000 u-boot.bin kvim3#tftp 1080000 u-boot.bin
 Speed: 1000, full duplex Speed: 1000, full duplex
Last modified: 2022/07/05 23:44 by hyphop