public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] 1/5: cmd_boot
@ 2003-03-31  9:28 Robert Schwebel
  2003-03-31 10:12 ` Wolfgang Denk
  0 siblings, 1 reply; 27+ messages in thread
From: Robert Schwebel @ 2003-03-31  9:28 UTC (permalink / raw)
  To: u-boot

Hi, 

here are some last minute patches, I hope Wolfgang has time to check
them in before the release. 

-----

cmd_boot: 

- fix whitespace for bdinfo command
- fix garbage characters output
- add ctrl-c support for kermit download

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Braunschweiger Str. 79,  31134 Hildesheim, Germany
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
    Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
-------------- next part --------------
diff -x CVS -x ptx-patches -urN u-boot/common/cmd_boot.c u-boot-ptx/common/cmd_boot.c
--- u-boot/common/cmd_boot.c	2003-03-31 08:34:19.000000000 +0200
+++ u-boot-ptx/common/cmd_boot.c	2003-03-31 08:39:33.000000000 +0200
@@ -163,10 +163,10 @@
 		printf ("%c%02X", i ? ':' : ' ', bd->bi_enetaddr[i]);
 	}
 	printf ("\n"
-		"ip_addr       = ");
+		"ip_addr     = ");
 	print_IPaddr (bd->bi_ip_addr);
 	printf ("\n"
-		"baudrate      = %d bps\n", bd->bi_baudrate);
+		"baudrate    = %d bps\n", bd->bi_baudrate);
 
 	return 0;
 }
@@ -575,6 +575,7 @@
 #define XON_CHAR        17
 #define XOFF_CHAR       19
 #define START_CHAR      0x01
+#define ETX_CHAR	0x03
 #define END_CHAR        0x0D
 #define SPACE           0x20
 #define K_ESCAPE        0x23
@@ -687,11 +688,24 @@
 
 static ulong load_serial_bin (ulong offset)
 {
-	int size;
+	int size, i;
 	char buf[32];
 
 	set_kerm_bin_mode ((ulong *) offset);
 	size = k_recv ();
+
+	/*
+	 * Gather any trailing characters (for instance, the ^D which
+	 * is sent by 'cu' after sending a file), and give the
+	 * box some time (100 * 1 ms)
+	 */
+	for (i=0; i<100; ++i) {
+		if (serial_tstc()) {
+			(void) serial_getc();
+		}
+		udelay(1000);
+	}
+
 	flush_cache (offset, size);
 
 	printf("## Total Size      = 0x%08x = %d Bytes\n", size, size);
@@ -996,10 +1011,16 @@
 
 		/* get a packet */
 		/* wait for the starting character */
-		while (serial_getc () != START_CHAR);
+		do {
+			new_char = serial_getc();
+			if (new_char == ETX_CHAR) return 0;
+
+		} while (new_char != START_CHAR);
+
 		/* get length of packet */
 		sum = 0;
 		new_char = serial_getc ();
+
 		if ((new_char & 0xE0) == 0)
 			goto packet_error;
 		sum += new_char & 0xff;

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [U-Boot-Users] [PATCH] 1/5: cmd_boot
@ 2003-03-31 12:13 Chris Elston
  2003-03-31 12:34 ` Wolfgang Denk
  0 siblings, 1 reply; 27+ messages in thread
From: Chris Elston @ 2003-03-31 12:13 UTC (permalink / raw)
  To: u-boot

Is there any reason we can't have an '#ifdef MINICOM'?

Chris.

> -----Original Message-----
> From: Robert Schwebel [mailto:robert at schwebel.de]
> Sent: 31 March 2003 12:45
> To: U-Boot Mailing List
> Subject: Re: [U-Boot-Users] [PATCH] 1/5: cmd_boot
> 
> 
> On Mon, Mar 31, 2003 at 01:38:00PM +0200, Wolfgang Denk wrote:
> > I recommend to kermit directly, and there will  be  no  
> problem.  The
> > patch  adds  code size in a critical area (there are some 
> boards with
> > memory limitations) and does not fix any real  problem  
> (instead,  it
> > implements a workaround for other broken software).
> 
> Come on, minicom is by large the most used terminal program on Linux,
> and I suppose u-boot should work with it. Don't tell me that I'm the
> only one using it - nearly EVERYONE who works with serial hardware
> (terminal servers, serve consoles, embedded boards) does it 
> with minicom
> today, and u-boot is the only firmware I've seen problems 
> with so far. 
> 
> Robert 
> -- 
>  Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
>  Pengutronix - Linux Solutions for Science and Industry
>    Braunschweiger Str. 79,  31134 Hildesheim, Germany
>    Handelsregister:  Amtsgericht Hildesheim, HRA 2686
>     Phone: +49-5121-28619-0 |  Fax: +49-5121-28619-4
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: ValueWeb: 
> Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
> No other company gives more support or power for your dedicated server
> http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 
> ______________________________________________________________
> __________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ______________________________________________________________
> __________
> 

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

^ permalink raw reply	[flat|nested] 27+ messages in thread
* [U-Boot-Users] [PATCH] 1/5: cmd_boot
@ 2003-03-31 12:32 Chris Elston
  0 siblings, 0 replies; 27+ messages in thread
From: Chris Elston @ 2003-03-31 12:32 UTC (permalink / raw)
  To: u-boot

I don't use minicom myself, all our targets have ethernet as a minimum.  But
wouldn't including the patch with an '#ifdef MINICOM' be a reasonable
compromise?

Chris.

> -----Original Message-----
> From: Wolfgang Denk [mailto:wd at denx.de]
> Sent: 31 March 2003 13:35
> To: Chris Elston
> Cc: U-Boot Mailing List (E-mail)
> Subject: Re: [U-Boot-Users] [PATCH] 1/5: cmd_boot 
> 
> 
> In message 
> <A1DD009E87CDD2119E940008C7334DA402339AFF@exchange01> you wrote:
> > Is there any reason we can't have an '#ifdef MINICOM'?
> 
> Ar you just asking, or do you really experience any  minicom  related
> problems your own? [Why do you use it, then?]
> 
> 
> Best regards,
> 
> Wolfgang Denk
> 
> -- 
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
> It is impractical for  the  standard  to  attempt  to  constrain  the
> behavior  of code that does not obey the constraints of the standard.
>                                                           - Doug Gwyn
> 
> ______________________________________________________________
> __________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ______________________________________________________________
> __________
> 

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

^ permalink raw reply	[flat|nested] 27+ messages in thread
[parent not found: <000263AC.C22236@radstone.co.uk>]
[parent not found: <0002649B.C22236@schwebel.de>]
[parent not found: <000265CA.C22236@denx.de>]

end of thread, other threads:[~2003-03-31 18:20 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-31  9:28 [U-Boot-Users] [PATCH] 1/5: cmd_boot Robert Schwebel
2003-03-31 10:12 ` Wolfgang Denk
2003-03-31 10:33   ` Robert Schwebel
2003-03-31 10:55     ` Wolfgang Denk
2003-03-31 11:12       ` Robert Schwebel
2003-03-31 11:38         ` Wolfgang Denk
2003-03-31 11:45           ` Robert Schwebel
2003-03-31 12:31             ` Wolfgang Denk
2003-03-31 12:43               ` Robert Schwebel
2003-03-31 14:03                 ` Wolfgang Denk
2003-03-31 14:16                   ` Robert Schwebel
2003-03-31 14:47                     ` Wolfgang Denk
2003-03-31 15:03                       ` Robert Schwebel
2003-03-31 18:10                         ` Wolfgang Denk
2003-03-31 18:20                           ` Robert Schwebel
  -- strict thread matches above, loose matches on Subject: below --
2003-03-31 12:13 Chris Elston
2003-03-31 12:34 ` Wolfgang Denk
2003-03-31 12:32 Chris Elston
     [not found] <000263AC.C22236@radstone.co.uk>
2003-03-31 13:18 ` Jerry Van Baren
2003-03-31 13:41   ` Robert Schwebel
2003-03-31 14:39     ` Holger Schurig
2003-03-31 14:06   ` Wolfgang Denk
     [not found] <0002649B.C22236@schwebel.de>
2003-03-31 14:00 ` Jerry Van Baren
2003-03-31 15:17   ` Robert Schwebel
2003-03-31 15:57     ` Wolfgang Denk
     [not found] <000265CA.C22236@denx.de>
2003-03-31 15:21 ` Jerry Van Baren
2003-03-31 15:40   ` Wolfgang Denk

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