summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-04-04 17:53:59 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-04-04 17:53:59 +0000
commitc5a3c8c670d2c505eaa608cc9cdedd932df3720a (patch)
treecd8f1e5f2b9479096542a29360037e814288cb83
parent4f98d45c3e0e0a5f471ac36751353f5217368ab7 (diff)
downloadrockbox-c5a3c8c670d2c505eaa608cc9cdedd932df3720a.tar.gz
rockbox-c5a3c8c670d2c505eaa608cc9cdedd932df3720a.zip
Jz4740 USB tool:
* Add a slight delay, so that the pre-boot code gets time to execute * Remove an unneeded check git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20616 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--utils/jz4740_tools/jz4740_usbtool.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/utils/jz4740_tools/jz4740_usbtool.c b/utils/jz4740_tools/jz4740_usbtool.c
index 049d6bb118..5f391b155e 100644
--- a/utils/jz4740_tools/jz4740_usbtool.c
+++ b/utils/jz4740_tools/jz4740_usbtool.c
@@ -518,6 +518,7 @@ int send_rockbox(usb_dev_handle *dh, const char* filename)
518 upload_data(dh, 0x080000000, jz_xloader, LEN_jz_xloader); 518 upload_data(dh, 0x080000000, jz_xloader, LEN_jz_xloader);
519 } 519 }
520 boot(dh, 0x080000000, false); 520 boot(dh, 0x080000000, false);
521 _SLEEP(1);
521 522
522 fsize = read_file(filename, &buffer); 523 fsize = read_file(filename, &buffer);
523 upload_data(dh, 0x080004000, buffer, fsize); 524 upload_data(dh, 0x080004000, buffer, fsize);
@@ -676,12 +677,9 @@ int jzconnect(int address, unsigned char* buf, int len, int func)
676 } 677 }
677 } 678 }
678 679
679 if (dev == NULL) 680 fprintf(stderr, "[ERR] Device not found.\n");
680 { 681 fprintf(stderr, "[ERR] Ensure your device is in USB boot mode and run usbtool again.\n");
681 fprintf(stderr, "[ERR] Device not found.\n"); 682 return -4;
682 fprintf(stderr, "[ERR] Ensure your device is in USB boot mode and run usbtool again.\n");
683 return -4;
684 }
685 683
686found: 684found:
687 if ( (dh = usb_open(dev)) == NULL) 685 if ( (dh = usb_open(dev)) == NULL)