mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: "Daniel Glöckner" <dg@emlix.com>
To: barebox@lists.infradead.org
Cc: "Daniel Glöckner" <dg@emlix.com>
Subject: [PATCH 0/3] Support for fastboot over UDP
Date: Fri, 28 Feb 2020 21:48:20 +0100	[thread overview]
Message-ID: <20200228204823.28415-1-dg@emlix.com> (raw)

This patch series adds support the UDP variant of the fastboot protocol
that was already supported in its USB form by Barebox. There is also a
TCP variant, but Barebox obviously can't support that one with its
current network stack.

The first patch separates all functions that can be reused into a file in
common/. Although git didn't pick up the similarities, common/fastboot.c
can be easily diffed against the old drivers/usb/gadget/f_fastboot.c,
especially after replacing struct f_fb with fb and struct f_fastboot with
struct fastboot.

The global.usbgadget.fastboot_max_download_size variable has not been
renamed because someone might expect it to have that name. But I'll
happily drop the usbgadget part from the name if you prefer.

The generic Kconfig options have been renamed. We could add options
with the old name that select the new options to make the transition
easier.

The second patch contains the implementation. The code was initially
taken from U-Boot, but had to be rewritten heavily to fit the way the
existing Barebox fastboot code executes commands and prints messages.
Contrary to U-Boot it does not send keep alive messages every 30
seconds because everything is executed from a poller. The timeout of
Google's fastboot tool is 60 seconds.

The third patch was necessary to allow network interfaces to be activated
without sending packets. The fastboot code sends packets only in reply to
received packets.

Daniel Glöckner (1):
  fastboot net: workaround for receiving before sending

Edmund Henniges (2):
  fastboot: split generic code from USB gadget
  fastboot net: implement fastboot over UDP

 common/Kconfig                  |  35 ++
 common/Makefile                 |   1 +
 common/fastboot.c               | 958 +++++++++++++++++++++++++++++++
 drivers/usb/gadget/Kconfig      |   3 +-
 drivers/usb/gadget/f_fastboot.c | 968 ++------------------------------
 drivers/usb/gadget/multi.c      |   5 +-
 include/fastboot.h              |  67 +++
 include/fastboot_net.h          |  12 +
 include/net.h                   |   1 +
 include/usb/fastboot.h          |  34 +-
 include/usb/gadget-multi.h      |   2 +-
 net/Kconfig                     |  17 +
 net/Makefile                    |   1 +
 net/eth.c                       |   2 +-
 net/fastboot.c                  | 438 +++++++++++++++
 15 files changed, 1579 insertions(+), 965 deletions(-)
 create mode 100644 common/fastboot.c
 create mode 100644 include/fastboot.h
 create mode 100644 include/fastboot_net.h
 create mode 100644 net/fastboot.c

-- 
2.17.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2020-02-28 20:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 20:48 Daniel Glöckner [this message]
2020-02-28 20:48 ` [PATCH 1/3] fastboot: split generic code from USB gadget Daniel Glöckner
2020-03-05  7:25   ` Sascha Hauer
2020-02-28 20:48 ` [PATCH 2/3] fastboot net: implement fastboot over UDP Daniel Glöckner
2020-03-05  7:50   ` Sascha Hauer
2020-03-05 20:15     ` Daniel Glöckner
2020-03-06 19:36       ` Sascha Hauer
2020-02-28 20:48 ` [PATCH 3/3] fastboot net: workaround for receiving before sending Daniel Glöckner
2020-03-05  7:54 ` [PATCH 0/3] Support for fastboot over UDP Sascha Hauer
2020-03-09  7:14 ` Sascha Hauer
2020-03-09 15:38   ` Daniel Glöckner
2020-03-12  8:26     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200228204823.28415-1-dg@emlix.com \
    --to=dg@emlix.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox