mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: "Daniel Glöckner" <dg@emlix.com>
Cc: barebox@lists.infradead.org, Edmund Henniges <eh@emlix.com>
Subject: Re: [PATCH 1/3] fastboot: split generic code from USB gadget
Date: Thu, 5 Mar 2020 08:25:55 +0100	[thread overview]
Message-ID: <20200305072554.GN3335@pengutronix.de> (raw)
In-Reply-To: <20200228204823.28415-2-dg@emlix.com>

On Fri, Feb 28, 2020 at 09:48:21PM +0100, Daniel Glöckner wrote:
> From: Edmund Henniges <eh@emlix.com>
> 
> The fastboot specification describes other protocols beyond USB. Allow
> these to reuse the generic parts of the existing fastboot code when they
> are implemented.
> 
> Most of the changes in common/fastboot.c are due to the renaming of struct
> f_fastboot *f_fb to struct fastboot *fb.
> 
> Signed-off-by: Edmund Henniges <eh@emlix.com>
> Signed-off-by: Daniel Glöckner <dg@emlix.com>
> ---
>  common/Kconfig                  |  35 ++
>  common/Makefile                 |   1 +
>  common/fastboot.c               | 955 +++++++++++++++++++++++++++++++
>  drivers/usb/gadget/Kconfig      |   3 +-
>  drivers/usb/gadget/f_fastboot.c | 968 ++------------------------------
>  drivers/usb/gadget/multi.c      |   5 +-
>  include/fastboot.h              |  66 +++
>  include/usb/fastboot.h          |  34 +-
>  include/usb/gadget-multi.h      |   2 +-
>  9 files changed, 1105 insertions(+), 964 deletions(-)
>  create mode 100644 common/fastboot.c
>  create mode 100644 include/fastboot.h
> 
> diff --git a/common/Kconfig b/common/Kconfig
> index 02ef3631e..bed7e49db 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -114,6 +114,9 @@ config USBGADGET_START
>  config BOOT
>  	bool
>  
> +config FASTBOOT_BASE
> +	bool
> +
>  menu "General Settings"
>  
>  config LOCALVERSION
> @@ -1013,6 +1016,38 @@ config PBL_OPTEE
>  
>  endmenu
>  
> +config FASTBOOT_SPARSE
> +	bool
> +	depends on FASTBOOT_BASE
> +	select IMAGE_SPARSE
> +	prompt "Enable Fastboot sparse image support"
> +	help
> +	  Sparse images are a way for the fastboot protocol to write
> +	  images that are bigger than the available memory. If unsure,
> +	  say yes here.
> +
> +config FASTBOOT_BUF
> +	bool
> +	depends on FASTBOOT_BASE
> +	prompt "Download files to temporary buffer instead of file"
> +	help
> +	  With this option enabled the fastboot code will download files to a
> +	  temporary buffer instead of a temporary file. Normally you want to
> +	  use a file as this also works when your memory is fragmented. However,
> +	  in some special cases, when the file consumer also better copes with
> +	  a buffer, then using a buffer might be better.
> +
> +	  Say no here unless you know what you are doing.
> +
> +config FASTBOOT_CMD_OEM
> +	bool
> +	depends on FASTBOOT_BASE
> +	prompt "Enable OEM commands"
> +	help
> +	  This option enables the fastboot "oem" group of commands. They allow to
> +	  executing arbitrary barebox commands and may be disabled in secure
> +	  environments.

I think these entries deserve an extra menu. Looking at the menu we now
have entries like "Download files to temporary buffer instead of file"
without giving any context that this is a fastboot option.

Does it make sense to add the fastboot USB and fastboot net options to
that menu as well? That way all fastboot options would be together and
not split into three different areas in the menu hierarchy.

Sascha

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2020-03-05  7:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-28 20:48 [PATCH 0/3] Support for fastboot over UDP Daniel Glöckner
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 [this message]
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=20200305072554.GN3335@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=dg@emlix.com \
    --cc=eh@emlix.com \
    /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