[U-Boot] problems with tftp

I'm tring to get a 53MB file using tftp protocol. I use U-Boot 1.1.4 that was preinstalled on OMAP3EVM board. PC side is a linux box (ubuntu 9.04) where is installed atftpd 0.7 that runs with the following command line (not using inetd):
/usr/sbin/atftpd --daemon --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /opt/OMAP35x_SDK_0.9.7
where /opt/OMAP35x_SDK_0.9.7 is the directory where are placed all files (obviously all permission are correctly set)
On U-Boot I run the following command: tftpboot 0x81600000 bin/<file>.jffs2 (network is correctly set)
I tried with 2 files: rootfs.jffs2 (about 17MB) and myroot.jffs2 (about 53MB)
trying rootfs.jffs2 all works, it is correctly transfered.
instead myroot.jffs2 doesn't work. atftd log report the following line: Jan 27 09:24:33 lab7 atftpd[5910]: Serving bin/myroot.jffs2 to 192.168.1.203:2082 Jan 27 09:24:33 lab7 atftpd[5910]: Requested file to big, increase BLKSIZE
How can I increase BLKSIZE, and where? Is a client or server parameter?
thanks

Dear Massimiliano Cialdi,
In message 1264582292.6870.15.camel@lab7.powersoft.it you wrote:
I use U-Boot 1.1.4 that was preinstalled on OMAP3EVM board. PC side is a linux box (ubuntu 9.04) where is installed atftpd 0.7 that runs with the following command line (not using inetd):
/usr/sbin/atftpd --daemon --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /opt/OMAP35x_SDK_0.9.7
...
I tried with 2 files: rootfs.jffs2 (about 17MB) and myroot.jffs2 (about 53MB)
trying rootfs.jffs2 all works, it is correctly transfered.
This is normal. TFTP uses a block size of 512 bytes by default, and a 16 bit counter for the packet numbers, and IIRC the respective RFC does not define a wrap-around of the packet numbers.
Some TFTP servers even use a _signed_ 16 bit counter, which limits you to 32767 packets of 512 bytes = ~ 16 MB file size. Seems your server uses an unsigned counter, resulting in 65536 x 512 = ~ 32 MB maximum file size.
instead myroot.jffs2 doesn't work. atftd log report the following line: Jan 27 09:24:33 lab7 atftpd[5910]: Serving bin/myroot.jffs2 to 192.168.1.203:2082 Jan 27 09:24:33 lab7 atftpd[5910]: Requested file to big, increase BLKSIZE
How can I increase BLKSIZE, and where? Is a client or server parameter?
In this case it is a server parameter. Read the manual - some TFTP servers support a "--blocksize" option, but eventually you may have to rebuild the TFTP server from the sources with adapted configuration.
Alternatively you can consider switching to NFS download, which usually is much faster, too.
Best regards,
Wolfgang Denk

Jan 27 09:24:33 lab7 atftpd[5910]: Requested file to big, increase BLKSIZE
In this case it is a server parameter.
I actually think in _this_ case it is a client one. By reading atftpd manual page it says blksize is supported by default, but it's the client that must specify it, or the default 512 applies.
Current u-boot supports it through CONFIG_TFTP_BLOCKSIZE as well as IP fragments. I use 4k blocksize like this (include/configs/nhk8815.h):
#define CONFIG_IP_DEFRAG /* Allows faster download, TFTP and NFS */ #define CONFIG_TFTP_BLOCKSIZE 4096 #define CONFIG_NFS_READ_SIZE 4096
/alessandro
participants (3)
-
Alessandro Rubini
-
Massimiliano Cialdi
-
Wolfgang Denk