TFTP Setup

Below are the steps required to setup the TFTP server on the Host Machine.


Setting Up the TFTP server

  1. Install the following packages
    
        $ sudo apt-get install xinetd tftpd tftp
      
  2. Create /etc/xinetd.d/tftp and put this entry
    
        service tftp
        {
        protocol        = udp
        port            = 69
        socket_type     = dgram
        wait            = yes
        user            = nobody
        server          = /usr/sbin/in.tftpd
        server_args     = /tftpboot
        disable         = no
        }
      
  3. Create a folder /tftpboot  this should match whatever you gave in server_args in the U-Boot Settings. Usually it is tftpboot
    
        $ sudo mkdir /tftpboot/boot
        $ sudo chmod -R 777 /tftpboot
        $ sudo chown -R nobody /tftpboot
      
  4. Restart the xinetd service and the TFTP server should be up and running.
    
        $ sudo service xinetd restart
      


Testing the TFTP server

  1. Create a file named tftp_test with some content in /tftpboot path of the tftp server.
    
        $ ls / > /tftpboot/tftp_test
        $ sudo chmod -R 777 /tftpboot
      
  2. Obtain the ip address of the tftp server using ifconfig command. In this example we conside the ip address of the server to be 192.168.1.2.
  3. Now log in to some other machine and follow the steps below to laod the file created above (tftp_test).
    
        $ tftp 192.168.1.2
        tftp> get tftp_test
        Sent 159 bytes in 0.0 seconds
        tftp> quit
        $ ls tftp_test -lh
      
  4. If the file is present then the TFTP server should be working fine.


Copy the Kerner image file into /tftpboot

Copy the kernel image using the command below:

    $ cp $HOME/yocto/gateway/tmp/deploy/images/uImage-3.0.35-r32.11-cpu-3xx-20141022133149.bin  /tftpboot/boot/uImage
  
NOTE: The name of the generated kernel image file will be different in your build. Also, the name given to the file while copying into /tftpboot/boot/ should match that given in U-Boot settings.