TFTP server for u-boot on Ubuntu


  • Install the required packages.
          $ sudo apt-get install xinetd tftpd-hpa tftp
  • Create the /etc/xinetd.d/tftp file with the following content.
         service tftp
         {
         protocol        = udp
         socket_type     = dgram
         wait            = yes
         user            = root
         server          = /usr/sbin/in.tftpd
         server_args     = -s /tftpboot -c
         disable         = no
         }

  • Create /tftpboot directory.
       $ sudo mkdir /tftpboot
       $ sudo chmod -R 777 /tftpboot
       $ sudo chown -R nobody /tftpboot
    
  • Modify the /etc/default/tftpd-hpa file as below.
       # /etc/default/tftpd-hpa
    
       TFTP_USERNAME="nobody"
       TFTP_DIRECTORY="/tftpboot"
       TFTP_ADDRESS="0.0.0.0:69"
       TFTP_OPTIONS="--secure"
    
  • Start tftp with xinetd
    $ sudo /etc/init.d/xinetd start
    
  • Configure your server's IP address with the serverip environment variable in your u-boot configuration.

Comments

Popular posts from this blog

How to Use container_of in Linux Kernel Development

Notification Chains in Linux Kernel

Build and Flash OpenWrt for Raspberry Pi