public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] It's very strange about the TFTP load code!
@ 2005-06-18 15:04 twomol
  2005-06-18 15:22 ` Andrew Lunn
  2005-06-18 16:55 ` Gary Thomas
  0 siblings, 2 replies; 4+ messages in thread
From: twomol @ 2005-06-18 15:04 UTC (permalink / raw)
  To: ecos-discuss

All,hello!
         I'm using mx1ads with redboot downloaded from freescale.com. May be I am	supposed to consult freescale not here. But it's about the common tftp code.So if
any one could help ,I'll be very appreciate!
		I can't use tftp to load file from host:
-----------------------------------------------------
		RedBoot> load -r -b 0x50000 redboot.bin
		Using default protocol (TFTP)
		Can't load 'redboot.bin': illegal TFTP operation
-----------------------------------------------------------
		I checked the source , "There is no function set"  equal to "TFTP_EBADOP" defined in tftp_surppot.h. but I didn't find any function have code to set the feild 'err' of 'getc_info' with this value.
		I found that  the error messge is printed by the following code (in redboot_gec_init):

		res = (funcs->open)(info, &getc_info.err);    
   		 if (res < 0) {
        diag_printf("Can't load '%s': %s\n", info->filename, (funcs->error)(getc_info.err));
            return res;
         }
    
    I didn't found any code in the tftp_stream_open function set the  err with TFTP_EBADOP.
    I use multiice-gdb-server and insight to debug this code , from insight ,I found that sometims funcs->open's value isn't
 the address of  tftp_stream_open, and it's not a fixed value.  
     After return from  funcs->open, the getc_info.err become 4 (i.e.TFTP_EBADOP).
     My toolchain is the one downloaded from ecoscentirc.com
	 I can load file use xmodem and http protocol.
      Any ideas?
     Much Thanks!

            Regards
 				

        twomol
        twomol@bj1860.net
          2005-06-18

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

* Re: [ECOS] It's very strange about the TFTP load code!
  2005-06-18 15:04 [ECOS] It's very strange about the TFTP load code! twomol
@ 2005-06-18 15:22 ` Andrew Lunn
  2005-06-19  3:05   ` twomol
  2005-06-18 16:55 ` Gary Thomas
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2005-06-18 15:22 UTC (permalink / raw)
  To: twomol; +Cc: ecos-discuss

On Sat, Jun 18, 2005 at 11:05:41PM +0800, twomol wrote:
> All??hello??
>          I'm using mx1ads with redboot downloaded from freescale.com. May be I am	supposed to consult freescale not here. But it's about the common tftp code.So if
> any one could help ,I'll be very appreciate!
> 		I can't use tftp to load file from host:
> -----------------------------------------------------
> 		RedBoot> load -r -b 0x50000 redboot.bin
> 		Using default protocol (TFTP)
> 		Can't load 'redboot.bin': illegal TFTP operation
> -----------------------------------------------------------
> 		I checked the source , "There is no function set"  equal to "TFTP_EBADOP" defined in tftp_surppot.h. but I didn't find any function have code to set the feild 'err' of 'getc_info' with this value.
> 		I found that  the error messge is printed by the following code (in redboot_gec_init):
> 
> 		res = (funcs->open)(info, &getc_info.err);    
>    		 if (res < 0) {
>         diag_printf("Can't load '%s': %s\n", info->filename, (funcs->error)(getc_info.err));
>             return res;
>          }

Check you have the permissions of the file correctly set on the
server. You can test this by using tftp locally on the server and make
sure it works.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] It's very strange about the TFTP load code!
  2005-06-18 15:04 [ECOS] It's very strange about the TFTP load code! twomol
  2005-06-18 15:22 ` Andrew Lunn
@ 2005-06-18 16:55 ` Gary Thomas
  1 sibling, 0 replies; 4+ messages in thread
From: Gary Thomas @ 2005-06-18 16:55 UTC (permalink / raw)
  To: twomol; +Cc: eCos Discussion

On Sat, 2005-06-18 at 23:05 +0800, twomol wrote:
> All,hello!
>          I'm using mx1ads with redboot downloaded from freescale.com. May be I am	supposed to consult freescale not here. But it's about the common tftp code.So if
> any one could help ,I'll be very appreciate!
> 		I can't use tftp to load file from host:
> -----------------------------------------------------
> 		RedBoot> load -r -b 0x50000 redboot.bin
> 		Using default protocol (TFTP)
> 		Can't load 'redboot.bin': illegal TFTP operation
> -----------------------------------------------------------
> 		I checked the source , "There is no function set"  equal to "TFTP_EBADOP" defined in tftp_surppot.h. but I didn't find any function have code to set the feild 'err' of 'getc_info' with this value.
> 		I found that  the error messge is printed by the following code (in redboot_gec_init):
> 
> 		res = (funcs->open)(info, &getc_info.err);    
>    		 if (res < 0) {
>         diag_printf("Can't load '%s': %s\n", info->filename, (funcs->error)(getc_info.err));
>             return res;
>          }
>     
>     I didn't found any code in the tftp_stream_open function set the  err with TFTP_EBADOP.
>     I use multiice-gdb-server and insight to debug this code , from insight ,I found that sometims funcs->open's value isn't
>  the address of  tftp_stream_open, and it's not a fixed value.  
>      After return from  funcs->open, the getc_info.err become 4 (i.e.TFTP_EBADOP).
>      My toolchain is the one downloaded from ecoscentirc.com
> 	 I can load file use xmodem and http protocol.
>       Any ideas?
>      Much Thanks!

This sounds like a TFTP server problem.  It may be permissions
as Andrew suggested, or some TFTP servers insist that you use 
the entire path name, starting with a "/"  Check your TFTP
server setup.

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] It's very strange about the TFTP load code!
  2005-06-18 15:22 ` Andrew Lunn
@ 2005-06-19  3:05   ` twomol
  0 siblings, 0 replies; 4+ messages in thread
From: twomol @ 2005-06-19  3:05 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss, gary

My tftp server is CISCO tftp sever under Windows, I can access the 
server from othe PC runing Windows.
Under linux ,I build a tftp server , the redboot's load function works.
I don't know why.Ok, At least , I can load file under linux.
gary:
I recall that I download the redboot from i.Mx1's summary page:
http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=i.MX1&nodeId=018rH3ZrDR
But yesterday I found that there is no links of redboot anymore.
I can send it to you.But it's a litte big.
There are 2 packages, totally 20 M.
My emailserver's attachment limitation is about 2M. I can make the spilt 
archives, then post them to you.
Is that OK?
Andrew Lunn wrote:

>On Sat, Jun 18, 2005 at 11:05:41PM +0800, twomol wrote:
>  
>
>>All??hello??
>>         I'm using mx1ads with redboot downloaded from freescale.com. May be I am	supposed to consult freescale not here. But it's about the common tftp code.So if
>>any one could help ,I'll be very appreciate!
>>		I can't use tftp to load file from host:
>>-----------------------------------------------------
>>		RedBoot> load -r -b 0x50000 redboot.bin
>>		Using default protocol (TFTP)
>>		Can't load 'redboot.bin': illegal TFTP operation
>>-----------------------------------------------------------
>>		I checked the source , "There is no function set"  equal to "TFTP_EBADOP" defined in tftp_surppot.h. but I didn't find any function have code to set the feild 'err' of 'getc_info' with this value.
>>		I found that  the error messge is printed by the following code (in redboot_gec_init):
>>
>>		res = (funcs->open)(info, &getc_info.err);    
>>   		 if (res < 0) {
>>        diag_printf("Can't load '%s': %s\n", info->filename, (funcs->error)(getc_info.err));
>>            return res;
>>         }
>>    
>>
>
>Check you have the permissions of the file correctly set on the
>server. You can test this by using tftp locally on the server and make
>sure it works.
>
>        Andrew
>
>
>  
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2005-06-19  3:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-18 15:04 [ECOS] It's very strange about the TFTP load code! twomol
2005-06-18 15:22 ` Andrew Lunn
2005-06-19  3:05   ` twomol
2005-06-18 16:55 ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).