]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
usb: gadget: fastboot: add max-download-size variable
authorEric Nelson <eric.nelson@boundarydevices.com>
Tue, 30 Sep 2014 19:05:40 +0000 (12:05 -0700)
committerMarek Vasut <marex@denx.de>
Mon, 6 Oct 2014 12:50:44 +0000 (14:50 +0200)
Current Android Fastboot seems to use 'max-download-size' instead
of 'downloadsize' variable to indicate the maximum size of sparse
segments.

See function get_target_sparse_limit() in file fastboot/fastboot.c
in the AOSP:
 https://android.googlesource.com/platform/system/core/+/master

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
drivers/usb/gadget/f_fastboot.c

index 9d15f6352e771723c50b6fac5e030c9eb5ae5c63..3e1c0a9faf29a1aeebb90e466614a7e3760ab619 100644 (file)
@@ -351,7 +351,8 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req)
                strncat(response, FASTBOOT_VERSION, chars_left);
        } else if (!strcmp_l1("bootloader-version", cmd)) {
                strncat(response, U_BOOT_VERSION, chars_left);
-       } else if (!strcmp_l1("downloadsize", cmd)) {
+       } else if (!strcmp_l1("downloadsize", cmd) ||
+               !strcmp_l1("max-download-size", cmd)) {
                char str_num[12];
 
                sprintf(str_num, "%08x", CONFIG_USB_FASTBOOT_BUF_SIZE);