[U-Boot] u-boot tftp problem

Nikolay Dimitrov picmaster at mail.bg
Fri Feb 20 16:50:41 CET 2015


Hi PF4Public,

On 02/20/2015 04:43 PM, PF4Public wrote:
>  >When working with large TFTP packets (probably 4096 bytes, as set in
> your board config file), U-Boot TFTP code sends wrong acknowledges for
> the TFTP packets.
>
> But what is clear from traffic dumps is that a packet size never exceeds
> 516 when downloading from Linux machine's tftpd. Am I missing something
> here?

Hmm. Please check your boards' initial TFTP request packet, and
especially the "option blksize" field. My understanding is that it
should be the same as the size of all incoming TFTP data blocks, and
when they're not equal sized, U-Boot TFTP code has issues to reassemble
the fragments. That's why I recommended to use the default max TFTP
blocksize which is 1468 bytes and fits nicely in a single ethernet
frame.

This is based on my own observations some time ago when debugged
somewhat similar issues with U-Boot running on ARM, and trying to boot
from OpenBSD TFTP server.

>  >Reduce your TFTP blksize, by commenting CONFIG_TFTPBLOCKSIZE in your
> board config. The default value is 1468, which should work fine.
>
> I have tried reducing tftpblocksize with editenv command of U-Boot, that
> ensured reduced blocksizes, which was clearly visible in tcpdump, but
> sadly it didn't change a thing.
> Btw I cannot find CONFIG_TFTPBLOCKSIZE in the whole source tree of
> U-Boot: "grep -r CONFIG_TFTPBLOCKSIZE ." and "grep -r TFTPBLOCKSIZE ."
> gave no output.

Sorry for the confusion, it's CONFIG_TFTP_BLOCKSIZE.

Regards,
Nikolay


More information about the U-Boot mailing list