Speed up tftp flashing

We flash our builds over tftp with the ethernet directly connected to the development machine. So the gateway is also the tftp-server. Flashing is pretty fast and takes a couple of minutes maximum for a 200MB image.

Now when we try to flash over the internet from a remote server it literally takes a couple of hours. Flashing is incredibly slow. We tried to increase the tftpblocksize (default 512 bytes) by setting the tftpblocksize variable in u-boot but then flashing doesn’t work anymore. The tftp-server does support bigger blocksizes (tested with a different machine and the atftp client).

Is there a way to significantly speed up the tftp flashing process? Or is the added latency the reason for the really slow communication?

hi lgierth

have you done a speed test by downloading a file from remote tftp server? What is the difference between local and remote tftp server?

Yes, the speedtest was done with an atftp client set to the highest possible blocksize. Downloading a 200MB file took maybe 20-30 seconds (but i would have to retry that to be specific). Downloading from a local tftp server was that fast without setting the blocksize.

TFTP which is just using UDP underneath is not very well suited for bigger transfers over the potentially rather unreliable Internet. Therefore probably something like the following would work much better. Note that we at Toradex have not tested any of this so far.