this makes mxsldr behave like sb_loader.exe in windows making us able to boot the same bootstreams with mxsldr. --- mxsldr.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/mxsldr.c b/mxsldr.c index 1de5f49..cf6faa9 100644 --- a/mxsldr.c +++ b/mxsldr.c @@ -239,7 +239,8 @@ exit: void print_usage() { printf( - "Usage: mxsldr <bootstream>\n" + "Usage: mxsldr <bootstream> [last] \n" + " last: send an BLTS command at last to boot e.g. barebox or linux \n" " (e.g: u-boot.sb)\n"); } @@ -249,7 +250,7 @@ int main(int argc, char const *const argv[]) libusb_device_handle *h = NULL; /* Detect and exit. */ - if (argc != 2) { + if (argc < 2) { print_usage(); return 1; } @@ -283,6 +284,15 @@ int main(int argc, char const *const argv[]) if (ret) goto exit; + if (argc > 2) { + int trans = 0; + char buf[14] = { 4, 'B', 'L', 'T', 'S', 1 }; + ret = transfer(h, 4, buf, 14, &trans); + if (ret) { + fprintf(stderr, "Failed to transfer last cmd (%d)\n", ret); + } + } + exit: libusb_release_interface(h, 0); out: -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot