RFC Add fastboot UDP support
Get series with b4
b4 am 20180425171910.26a944a5@jawaVersions newest first
- v1 RFC Latest0 of 5 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 5 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [U-Boot] [RFC PATCH v1 0/5] Add fastboot UDP support
Quoted 46 lines · On Wed, 25 Apr 2018 13:50:50 +0100 Alex Kiernan <[email protected]> wrote:
Quoted 4 lines · Alex Kiernan
Quoted 2 lines · Jocelyn Bohr
Thanks so much for porting this, Alex!
...
Quoted 29 lines
Quoted 10 lines
You can select both network and USB fastboot to be enabled with the
Kconfig, but at runtime you have to select to wait on either USB or network by running
"fastboot udp" or "fastboot usb <USB_controller>". When the Android bootloader
gets the command to reboot back to fastboot, it will read the "fastbootcmd" env
variable and run that as a command (common/android_bootloader.c:151).Thanks for that (especially the detail on
android_bootloaderwhich I'd not read through). The bit that concerns me is intimed_send_info:+/**
+ * Send an INFO packet during long commands based on timer. If
+ *CONFIG_UDP_FUNCTION_FASTBOOTis defined, an INFO packet is
sent
+ * if the time is 30 seconds after start. Else, noop.
+ *
+ * TODO: Handle the situation where both UDP and USB fastboot are
+ * enabled.
+ *
+ * @param start: Time since last INFO packet was sent.
+ * @param msg: String describing the reason for waiting
+ */
+voidtimed_send_info(ulong *start, const char *msg);Quoted 7 lines
The code in
timed_send_infois guarded with an ifdef, rather than based on the transport that's been selected at runtime. Do we need to maketimed_send_infowork based on the runtime state, rather than the compile time, or can we drop the ifdef guard and remove the TODO? I guess I'm assuming the former, but with no way to test USB I don't want head off down the wrong road!
Quoted 5 lines
Having started digging through how we'd merge the two code paths, it's clear if you had UDP and USB both enabled at compile time and then try and run the USB path it'll try and do UDP things in
timed_send_info, which can't be good!
I think that we can assume operation of only one medium in a time - i.e.
when you issue fastboot usb then no UDP support (and opposite).
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de -------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180425/d9c5972a/attachment.sig>