Re: [PATCH 1/3] fastboot: split generic code from USB gadget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 28, 2020 at 09:48:21PM +0100, Daniel Glöckner wrote:
> From: Edmund Henniges <eh@xxxxxxxxx>
> 
> 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@xxxxxxxxx>
> Signed-off-by: Daniel Glöckner <dg@xxxxxxxxx>
> ---
>  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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux