[U-Boot] [PATCH] make mxsldr behave like sb_loader.exe

Hi,
I have made a patch to mxsldr to be able to boot non-u-boot bootstreams (linux and barebox) as well as u-boot bootstreams.
I added an option to send one last BLTS command after uploading the firmware. This is tested with bootstreams that work with sb_loader.exe in windows as well.
Jacob Kjaergaard (1): add option to send a last interrupt transfer.
mxsldr.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)

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:
participants (1)
-
Jacob Kjaergaard