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

Post Free Ads for Agri, Solar, Eco products

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

On TARGET Board

 $ 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 Bash / Shell Scripts Bluetooth driver Build Frameworks Commands and Packages Core Kernel C Programs Development Environment Setup Documents / Books Errors & Failures File Systems Framebuffer / Display Driver git Go Language Programs Hardware Platforms Home JAVA Programs Kernel & Device Drivers Kernel Booting and Porting Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL NDK / Middleware / HAL Network Driver OS Concepts PHP Procfs Filesystem Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Userspace Utilities Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags: ,

Leave a Reply