All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] problems with tftp
@ 2010-01-27  8:51 Massimiliano Cialdi
  2010-01-27 12:27 ` Wolfgang Denk
  2010-01-27 12:36 ` Alessandro Rubini
  0 siblings, 2 replies; 3+ messages in thread
From: Massimiliano Cialdi @ 2010-01-27  8:51 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] problems with tftp
  2010-01-27  8:51 [U-Boot] problems with tftp Massimiliano Cialdi
@ 2010-01-27 12:27 ` Wolfgang Denk
  2010-01-27 12:36 ` Alessandro Rubini
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2010-01-27 12:27 UTC (permalink / raw)
  To: u-boot

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

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
2000 pounds of chinese soup                               = 1 Won Ton

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] problems with tftp
  2010-01-27  8:51 [U-Boot] problems with tftp Massimiliano Cialdi
  2010-01-27 12:27 ` Wolfgang Denk
@ 2010-01-27 12:36 ` Alessandro Rubini
  1 sibling, 0 replies; 3+ messages in thread
From: Alessandro Rubini @ 2010-01-27 12:36 UTC (permalink / raw)
  To: u-boot

>> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-01-27 12:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-27  8:51 [U-Boot] problems with tftp Massimiliano Cialdi
2010-01-27 12:27 ` Wolfgang Denk
2010-01-27 12:36 ` Alessandro Rubini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.