[U-Boot] [PATCH] dfu: Migrate to Kconfig

Lukasz Majewski l.majewski at samsung.com
Tue Sep 20 12:53:56 CEST 2016


Hi Tom,

> Introduce a hidden USB_FUNCTION_DFU Kconfig option and select it for
> CMD_DFU (as we must have the DFU command enabled to do anything DFU).
> Make all of the entries in drivers/dfu/Kconfig depend on CMD_DFU and
> add options for all of the back end choices that DFU can make use of.
> 
> Cc: Lukasz Majewski <l.majewski at samsung.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Once ack'd I'll run moveconfig.py to migrate everyone over and check
> for size changes.  This will also depend on the patch I sent to
> change the malloc pool size on TI parts as we otherwise will now
> expose the bug about DFU_MMC being unset.
> ---
>  cmd/Kconfig         |  1 +
>  drivers/dfu/Kconfig | 28 ++++++++++++++++++++++++++++
>  2 files changed, 29 insertions(+)
> 
> diff --git a/cmd/Kconfig b/cmd/Kconfig
> index d28da54ed659..26720b6e1f0d 100644
> --- a/cmd/Kconfig
> +++ b/cmd/Kconfig
> @@ -404,6 +404,7 @@ config CMD_USB
>  
>  config CMD_DFU
>  	bool "dfu"
> +	select USB_FUNCTION_DFU
>  	help
>  	  Enables the command "dfu" which is used to have U-Boot
> create a DFU class device via USB.
> diff --git a/drivers/dfu/Kconfig b/drivers/dfu/Kconfig
> index 6b92064f0b52..56a98f5273ce 100644
> --- a/drivers/dfu/Kconfig
> +++ b/drivers/dfu/Kconfig
> @@ -1,5 +1,9 @@
>  menu "DFU support"
>  
> +config USB_FUNCTION_DFU
> +	bool
> +
> +if CMD_DFU
>  config DFU_TFTP
>  	bool "DFU via TFTP"
>  	help
> @@ -7,4 +11,28 @@ config DFU_TFTP
>  	  sent via TFTP boot.
>  
>  	  Detailed description of this feature can be found
> at ./doc/README.dfutftp +
> +config DFU_MMC
> +	bool "MMC back end for DFU"
> +	help
> +	  This option enables using DFU to read and write to MMC
> based storage. +
> +config DFU_NAND
> +	bool "NAND back end for DFU"
> +	help
> +	  This option enables using DFU to read and write to NAND
> based
> +	  storage.
> +
> +config DFU_RAM
> +	bool "RAM back end for DFU"
> +	help
> +	  This option enables using DFU to read and write RAM on the
> target. +
> +config DFU_SF
> +	bool "SPI flash back end for DFU"
> +	help
> +	  This option enables using DFU to read and write to SPI
> flash based
> +	  storage.
> +
> +endif
>  endmenu

Acked-by: Lukasz Majewski <l.majewski at samsung.com>

Tom, thanks for the patch.

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group


More information about the U-Boot mailing list