From mboxrd@z Thu Jan 1 00:00:00 1970 From: Steve Rae Date: Wed, 1 Oct 2014 13:38:57 -0700 Subject: [U-Boot] [PATCH 1/3] usb: gadget: fastboot: add max-download-size variable In-Reply-To: <1412103942-28331-2-git-send-email-eric.nelson@boundarydevices.com> References: <1412103942-28331-1-git-send-email-eric.nelson@boundarydevices.com> <1412103942-28331-2-git-send-email-eric.nelson@boundarydevices.com> Message-ID: <542C6661.5090101@broadcom.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 14-09-30 12:05 PM, Eric Nelson wrote: > 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 > --- > drivers/usb/gadget/f_fastboot.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c > index 38c0965..f970f89 100644 > --- a/drivers/usb/gadget/f_fastboot.c > +++ b/drivers/usb/gadget/f_fastboot.c > @@ -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); > (the host version of fastboot that I'm using requires this change!) Tested-by: Steve Rae