How to setup tftp server on ubuntu and load images at uboot

Following is the procedure which will guide you for setting up the Linux PC as a tftp server and download the uboot, dts and ramdisk or filesystem using tftpboot at uboot console and then boot the target board.

You will need to make sure following setup:

  • Ubuntu Linux PC in LAN
  • Target board Uboot has Ethernet enabled.
  • You can ping ubuntu PC IP from the uboot console.

On Ubuntu Linux

  sudo apt-get install tftpd-hpa 
 sudo apt-get install tftp 
 sudo service tftpd-hpa start 

Above steps will install tftp server, create directory /var/lib/tftpboot and start the tftp server, which you can check using below command,

$ ps -ax | grep tftp
 8356 ?        Ss     0:00 /usr/sbin/in.tftpd --listen --user tftp --address :69 --secure /var/lib/tftpboot

One we have setup, tftpserver now we will need to copy images which we want to flash on the target.

$ sudo cp -r    /var/lib/tftpboot


 $ setenv ipaddr  
 $ setenv netmask  
 $ etenv serverip  
 $ setenv dnsip  
 $ setenv gatewayip  
 $ saveenv 
 setenv kernel_addr "check for address" 
 setenv dtb_addr "check for addres" 
 setenv filesystemimage_addr "check for address" 
 tftpboot ${kernel_addr}  
 tftpboot ${dtb_addr}  
 tftpboot ${filesystemimage_addr}  
 bootm ${kernel_addr} 
Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags: ,

Leave a Reply / Ask Question