From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH] 1/5: cmd_boot
Date: Mon, 31 Mar 2003 16:47:32 +0200 [thread overview]
Message-ID: <20030331144737.38C11C587C@atlas.denx.de> (raw)
In-Reply-To: Your message of "Mon, 31 Mar 2003 16:16:07 +0200." <20030331141607.GI7702@pengutronix.de>
In message <20030331141607.GI7702@pengutronix.de> you wrote:
>
> Wolfgang, the code has been in that file for ages. The only thing I did
> is to move it to the right location, which is _before_ the printf() in
> load_serial_bin(), not _after_ the function returned. Please explain why
> moving code changes the binary size.
You patch does not delete code, but it adds code, increasing the
size:
--- 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);
...
Let's wait a day if anybody speaks up who has the same problem like
you. if not, I will ignore this.
Best regards,
Wolfgang Denk
--
Software Engineering: Embedded and Realtime Systems, Embedded Linux
Phone: (+49)-8142-4596-87 Fax: (+49)-8142-4596-88 Email: wd@denx.de
If it happens once, it's a bug.
If it happens twice, it's a feature.
If it happens more than twice, it's a design philosophy.
next prev parent reply other threads:[~2003-03-31 14:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030331144737.38C11C587C@atlas.denx.de \
--to=wd@denx.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox