projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
patman: Suppress empty changelog entries
[oweals/u-boot.git]
/
tools
/
kwboot.c
diff --git
a/tools/kwboot.c
b/tools/kwboot.c
index 50ae2b4b77b1e3702b92f884979bc7808893e479..4be094c9c8d81ebca06170a386718527880a587e 100644
(file)
--- a/
tools/kwboot.c
+++ b/
tools/kwboot.c
@@
-286,6
+286,7
@@
kwboot_bootmsg(int tty, void *msg)
{
int rc;
char c;
{
int rc;
char c;
+ int count;
if (msg == NULL)
kwboot_printv("Please reboot the target into UART boot mode...");
if (msg == NULL)
kwboot_printv("Please reboot the target into UART boot mode...");
@@
-297,10
+298,12
@@
kwboot_bootmsg(int tty, void *msg)
if (rc)
break;
if (rc)
break;
- rc = kwboot_tty_send(tty, msg, 8);
- if (rc) {
- usleep(msg_req_delay * 1000);
- continue;
+ for (count = 0; count < 128; count++) {
+ rc = kwboot_tty_send(tty, msg, 8);
+ if (rc) {
+ usleep(msg_req_delay * 1000);
+ continue;
+ }
}
rc = kwboot_tty_recv(tty, &c, 1, msg_rsp_timeo);
}
rc = kwboot_tty_recv(tty, &c, 1, msg_rsp_timeo);
@@
-426,6
+429,9
@@
kwboot_xmodem(int tty, const void *_data, size_t size)
kwboot_printv("Sending boot image...\n");
kwboot_printv("Sending boot image...\n");
+ sleep(2); /* flush isn't effective without it */
+ tcflush(tty, TCIOFLUSH);
+
do {
struct kwboot_block block;
int n;
do {
struct kwboot_block block;
int n;