This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: redboot load file broken in cvs


On Wed, 2002-07-17 at 20:17, Tim Drury wrote:
> 
> I just updated my cvs a couple days ago in preparation to create
> the eb40a patch and it would appear redboot can no longer load
> files via ymodem.  The file appears to load until the very end when 
> minicom reports:
> 
> Retry 0: NAK on sector
> Retry 0: Got 20 for sector ACK
> Retry 0: NAK on sector
> Retry 0: Got 41 for sector ACK 
> 
> I then have to wait for several minutes.  Sometimes the file completes
> but often a timeout occurs and the transfer aborts.
> 
> This did not happen in my previous cvs image from about a month 
> ago.  I noticed that xyzModem.c changed a little and load.c changed
> a great deal.  Before I dig in and plant debug statements here and
> there, does anyone have any idea of where exactly to look?

Can you see if this helps?

Index: redboot/current/src/load.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/redboot/current/src/load.c,v
retrieving revision 1.25
diff -u -5 -p -r1.25 load.c
--- redboot/current/src/load.c	1 Jul 2002 20:55:28 -0000	1.25
+++ redboot/current/src/load.c	18 Jul 2002 12:57:36 -0000
@@ -739,13 +739,15 @@ do_load(int argc, char *argv[])
                 end = load_elf_image(redboot_getc, base);
             } else if ((type[0] == 'S') &&
                        ((type[1] >= '0') && (type[1] <= '9'))) {
 		end = load_srec_image(redboot_getc, base);
             } else {
+                redboot_getc_terminate(true);
                 diag_printf("Unrecognized image type: 0x%lx\n", *(unsigned long *)type);
             }
         }
     }
 
+    redboot_getc_terminate(false);
     redboot_getc_close();  // Clean up
     return;
 }


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]