public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] TFTP times out?
@ 2005-11-10  3:10 Zhen Wang
  2005-11-10  3:18 ` Sam Song
  2005-11-10  7:59 ` Eckart Goehler
  0 siblings, 2 replies; 13+ messages in thread
From: Zhen Wang @ 2005-11-10  3:10 UTC (permalink / raw)
  To: u-boot

Hi wd,
   Yeah, I've read relevant topics in DULG and then revised my 
configuration header file as following:

#define CONFIG_ETHADDR			00:50:c2:1e:af:fb
#define CONFIG_NETMASK			255.255.255.0
#define CONFIG_IPADDR			192.168.123.100
#define CONFIG_SERVERIP			192.168.123.115
#define CONFIG_BOOTFILE			"zImage"
#define CONFIG_BOOTCOMMAND		"tftpboot\; go 0c480000"
#define CFG_LOAD_ADDR			0x0c480000

   I'm running Fedora Core 4 on my PC. I've got the tftp-server rpm 
installed, iptables turned off, tftp service enabled and xinetd 
restarted, zImage copied under the /tftpboot/ directory. But after 5 sec 
boot delay the TFTP seemed to time out like this:

TFTP from server 192.168.123.115; out IP is 192.168.123.100
Filename: 'zImage'
Load address: 0xc480000
Loading: T T # # T # T T (omitted)
Retry count exceeded; starting again

Then I interrupted the command and tried to ping my PC:

jx44b0>ping 192.168.123.115
host 192.168.123.115 is alive

I think the network condition is OK, but the TFTP always times out. I 
want to configure a longer timeout value for TFTP but don't know where. 
Waiting for your reply. Thanks a lot.

Best regards,
Zhen Wang

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [U-Boot-Users] TFTP times out?
@ 2005-11-10  9:23 André Berggren
  2005-11-10 13:40 ` Jerry Van Baren
  2005-11-11  6:18 ` Zhen Wang
  0 siblings, 2 replies; 13+ messages in thread
From: André Berggren @ 2005-11-10  9:23 UTC (permalink / raw)
  To: u-boot

Hi!

We have the same problem with one minor difference. U-boot get the first part of a file and then starts getting timeouts (TTTT).
We used a Etheral to sniff and found out that u-boot ack one datapackage but when the next datapackage araives u-boot doesn?t seem to hear it. Instead u-boot timesout listening and sends another ack on the previous datapackage. The tftp server then retransmits the last datapackage again witch u-boot doesn?t hear, u-boot times out and send another ack on the previous datapackage, and we are stuck in this loop.
We use a Moxa ED6008 switch where we attached the sniffer for the recording.

See appended ethereal capture-file. Mark one UDP-package and use Analyse->decode as and chose tftp to make it more readable.

//Andr?


-----Original Message-----
From: u-boot-users-admin@lists.sourceforge.net on behalf of Wolfgang Denk
Sent: Thu 11/10/2005 9:42 AM
To: Zhen Wang
Cc: Bharathi Subramanian; u-boot-users at lists.sourceforge.net
Subject: Re: Re : [U-Boot-Users] TFTP times out? 
 
In message <4372E4BF.8020401@gmail.com> you wrote:
>
>    In a word, I think I should revise the tftpboot relevant codes to 
> prolong the time before time out. But I don't the exact file(location).

No. This will NOT solve the problem.

Run a network sniffer to find  out  if  U-Boot  is  actually  sending
packets,  and  the  TFTP server fails to reply, or if U-Boot does not
send any packets at all.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
365 Days of drinking Lo-Cal beer.                       = 1 Lite-year


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


###########################################

This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tftp.cap
Type: application/octet-stream
Size: 5706 bytes
Desc: tftp.cap
Url : http://lists.denx.de/pipermail/u-boot/attachments/20051110/6587d0f7/attachment.obj 

^ permalink raw reply	[flat|nested] 13+ messages in thread
* [U-Boot-Users] TFTP times out?
@ 2005-11-11  8:49 Martin Krause
  2005-11-11  9:36 ` Wolfgang Denk
  0 siblings, 1 reply; 13+ messages in thread
From: Martin Krause @ 2005-11-11  8:49 UTC (permalink / raw)
  To: u-boot

Hie Zhen,

Zhen Wang wrote on Friday, November 11, 2005 7:18 AM: 
>    CFG_HZ is a configuration _SETTING_ in my board's configuration
> header file(I don't know its exact function till now). TIMEOUT and

CFG_HZ defines the number of timer ticks per second. The function
get_timer() returns the current vaule of the internal timer tick 
counter (with the variable name: 'timestamp'). The following code
snippet should delay for exat one second:

	...
	tmo = get_timer(0) + 1 * CFG_HZ;
	while (get_timer(0) < tmo);


> TIMEOUT_COUNT both are constants defined in net/tftp.c.
>    I've got a 2130KB(i.e. 4260 TFTP packages) uClinux zImage to
> download 
> over the twisted cable which connected my board with my PC directly.
>    The numbers in last column of above table indicate the last TFTP
> block id received from the TFTP server(PC) before giving up(i.e. retry
> count beyonds TIMEOUT_COUNT). Therefore 4260 indicates a complete
>    download. According to the table, TIMEOUT doesn't seem to be a
> critical part in 
> unsuccessful downloads. Though I can use a large TIMEOUT_COUNT to
> accomplish the download, it's a bad solution. Now my first suspicion
> is 
> that the timing without interrupts scheme implemented in
> cpu/s3c44b0/interrupts.c.

There actually seems to be a bug. CFG_HZ is set to 1000 on your board.
This means in one second the counter returned by get_timer() should
increase by 1000. But this doesn't correspond to the implementation
of udelay() on your board (from cpu/s3c44b0/interrupts.c):

void udelay (unsigned long usec)
{
	ulong tmo;

	tmo = usec / 1000;
	tmo *= CFG_HZ;
	tmo /= 8;

	tmo += get_timer (0);

	while (get_timer_masked () < tmo)
		/*NOP*/;
}

This assumes that the internal counter increases by 8 in one second.
Since CFG_HZ should be 1000 (according to Wolfgang Denk) I suggest
to fix the TIMER_LOAD_VAL on your board, so that one underrun
of timer TCNT01 accours every 1 ms.


Regards,
Martin

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

end of thread, other threads:[~2005-11-11  9:36 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-10  3:10 [U-Boot-Users] TFTP times out? Zhen Wang
2005-11-10  3:18 ` Sam Song
2005-11-10  4:19   ` Zhen Wang
2005-11-10  4:37     ` Bharathi Subramanian
2005-11-10  6:12       ` Zhen Wang
2005-11-10  8:42         ` Wolfgang Denk
2005-11-10  7:59 ` Eckart Goehler
  -- strict thread matches above, loose matches on Subject: below --
2005-11-10  9:23 André Berggren
2005-11-10 13:40 ` Jerry Van Baren
2005-11-10 15:12   ` NZG
2005-11-11  6:18 ` Zhen Wang
2005-11-11  8:49 Martin Krause
2005-11-11  9:36 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox