Convert USB fastboot code to use shared protocol
v2 cover Convert USB fastboot code to use shared protocol
This builds on the fastboot UDP support and migrates the USB fastboot code to the shared code.
It's currently untested, other than passing in Travis:
https://travis-ci.org/akiernan/u-boot/builds/380023917
Changes in v2:
- remove redundant version.h
- use new fastboot_get_bytes_remaining() function
Alex Kiernan (2):
usb: fastboot: Convert USB f_fastboot to shared fastboot
fastboot: Update fastboot documentation
doc/README.android-fastboot | 80 ++++++---- drivers/fastboot/Makefile | 4 +- drivers/usb/gadget/f_fastboot.c | 318 +++++----------------------------------- 3 files changed, 92 insertions(+), 310 deletions(-)
Signature · 1 line
2.7.4
RFC PATCH v2 1/2 usb: fastboot: Convert USB f_fastboot to shared fastboot
Convert USB fastboot code to use shared fastboot protocol.
---
Changes in v2:
- remove redundant version.h
- use new fastboot_get_bytes_remaining() function
drivers/fastboot/Makefile | 4 +- drivers/usb/gadget/f_fastboot.c | 318 +++++----------------------------------- 2 files changed, 37 insertions(+), 285 deletions(-)
drivers/fastboot/Makefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0+ obj-y += fb_common.o -obj-$(CONFIG_UDP_FUNCTION_FASTBOOT) += fb_getvar.o -obj-$(CONFIG_UDP_FUNCTION_FASTBOOT) += fb_command.o +obj-y += fb_getvar.o +obj-y += fb_command.o obj-$(CONFIG_FASTBOOT_FLASH_MMC) += fb_mmc.o obj-$(CONFIG_FASTBOOT_FLASH_NAND) += fb_nand.o
drivers/usb/gadget/f_fastboot.c +35 -283
393 lines not on this page · raw message
Signature · 1 line
2.7.4
RFC PATCH v2 1/2 usb: fastboot: Convert USB f_fastboot to shared fastboot
Quoted 5 lines · Alex Kiernan
Convert USB fastboot code to use shared fastboot protocol.
Signed-off-by Alex Kiernan <[email protected]>---
Quoted 8 lines
Changes in v2:
- remove redundantversion.h
- use newfastboot_get_bytes_remaining()functiondrivers/fastboot/Makefile | 4 +- drivers/usb/gadget/f_fastboot.c | 318 +++++----------------------------------- 2 files changed, 37 insertions(+), 285 deletions(-)
Hi Alex,
Unfortunately this patch breaks regular fastboot (over USB). At least on TI BeagleBoard X15. I tested your patch series using
https://github.com/akiernan/u-boot.git, on branch us-fastboot-udp-v6 (hope it contains v2 of this patch). I'm unable to do "fastboot flash" or "fastboot oem format" commands after this patch. Below some debug output that can help you debug this issue.
On host side I see:
FAILED (remote: unrecognized command)
On device side next messages appear:
** Unrecognized filesystem type **
buffer overflowstatus: -104 ep 'ep1in-bulk' trans: 0 command es not recognized.
I'd appreciate if you can fix it in next series. Please add me to Cc:
so that I can test it on my boards and verify if it's work.
Also, as I understand, your github branch contains patches from different patch series. If you can split them into corresponding branches there, I can test your patch series separately and provide tested tag.
Thanks.
RFC PATCH v2 1/2 usb: fastboot: Convert USB f_fastboot to shared fastboot
Hi Sam
Quoted 6 lines · Sam Protsenko
Quoted 5 lines · Alex Kiernan
Convert USB fastboot code to use shared fastboot protocol.
Signed-off-by Alex Kiernan <[email protected]>---
Quoted 6 lines
Quoted 6 lines
Changes in v2:
- remove redundantversion.h
- use newfastboot_get_bytes_remaining()functiondrivers/fastboot/Makefile | 4 +- drivers/usb/gadget/f_fastboot.c | 318
+++++-----------------------------------
Quoted 11 lines
Quoted 2 lines
2 files changed, 37 insertions(+), 285 deletions(-)Hi Alex,
Unfortunately this patch breaks regular fastboot (over USB). At least on TI BeagleBoard X15. I tested your patch series using
https://github.com/akiernan/u-boot.git, on branch us-fastboot-udp-v6 (hope it contains v2 of this patch). I'm unable to do "fastboot flash" or "fastboot oem format" commands after this patch. Below some debug output that can help you debug this issue.
Do you remember if you did the 'oem format' after the 'flash' command? If so, likely it's got out of sync and the 'oem format' was an innocent victim after the 'flash' failed...
There's definitely a change in the data transfer which looks like it should be fine, but I can imagine I've not got quite right.
Quoted 10 lines
On host side I see:
FAILED (remote: unrecognized command)
On device side next messages appear:
** Unrecognized filesystem type **
buffer overflowstatus: -104 ep 'ep1in-bulk' trans: 0 command es not recognized.
Quoted 7 lines
I'd appreciate if you can fix it in next series. Please add me to Cc:
so that I can test it on my boards and verify if it's work.Also, as I understand, your github branch contains patches from different patch series. If you can split them into corresponding branches there, I can test your patch series separately and provide tested tag.
I've split off the last two patches, so there's just this series which adds UDP fastboot in that branch now and has only simple refactorings in the USB path. If you're able to test just that to see if it works?
Signature · 1 line
Alex Kiernan
RFC PATCH v2 1/2 usb: fastboot: Convert USB f_fastboot to shared fastboot
Quoted 30 lines · Alex Kiernan
Hi Sam
Quoted 6 lines · Sam Protsenko
Quoted 5 lines · Alex Kiernan
Convert USB fastboot code to use shared fastboot protocol.
Signed-off-by Alex Kiernan <[email protected]>---
Quoted 6 lines
Quoted 6 lines
Changes in v2:
- remove redundantversion.h
- use newfastboot_get_bytes_remaining()functiondrivers/fastboot/Makefile | 4 +- drivers/usb/gadget/f_fastboot.c | 318+++++-----------------------------------
Quoted 11 lines
Quoted 2 lines
2 files changed, 37 insertions(+), 285 deletions(-)Hi Alex,
Unfortunately this patch breaks regular fastboot (over USB). At least on TI BeagleBoard X15. I tested your patch series using
https://github.com/akiernan/u-boot.git, on branch us-fastboot-udp-v6 (hope it contains v2 of this patch). I'm unable to do "fastboot flash" or "fastboot oem format" commands after this patch. Below some debug output that can help you debug this issue.
Quoted 2 lines
Do you remember if you did the 'oem format' after the 'flash' command? If so, likely it's got out of sync and the 'oem format' was an innocent
victim
Quoted 3 lines
after the 'flash' failed...
There's definitely a change in the data transfer which looks like it
should
Quoted 1 line
be fine, but I can imagine I've not got quite right.
I can see what I've done wrong... the transition into the USB download phase will never actually execute as I've put it inside an impossible conditional :(
I've pushed us-fastboot-udp-v6 which is everything apart from the USB migration, the USB migration (including this fix) is on us-fastboot-usb-v3
Signature · 1 line
Alex Kiernan