* [U-Boot] [PATCH] dfu: Migrate to Kconfig
@ 2016-09-19 17:31 ` Tom Rini
2016-09-19 18:19 ` Tom Rini
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Tom Rini @ 2016-09-19 17:31 UTC (permalink / raw)
To: u-boot
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@samsung.com>
Signed-off-by: Tom Rini <trini@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
--
1.9.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] dfu: Migrate to Kconfig
2016-09-19 17:31 ` [U-Boot] [PATCH] dfu: Migrate to Kconfig Tom Rini
@ 2016-09-19 18:19 ` Tom Rini
2016-09-20 10:53 ` Lukasz Majewski
2016-09-20 10:53 ` Lukasz Majewski
2016-09-27 21:34 ` [U-Boot] " Tom Rini
2 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2016-09-19 18:19 UTC (permalink / raw)
To: u-boot
On Mon, Sep 19, 2016 at 01:31:30PM -0400, Tom Rini wrote:
> 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.
[snip]
> +config DFU_MMC
> + bool "MMC back end for DFU"
> + help
> + This option enables using DFU to read and write to MMC based storage.
Adding:
If working with an underlying filesystem rather than raw
storage you will still need to enable the appropriate write
commands.
As in doing local testing of stuff that drove me to scratch this itch I
noticed that CMD_EXT4_WRITE is not set on sunxi. But I don't think we
should force fat+ext4 write to be enabled simply because DFU_MMC is set.
I should however follow up with adding default y if DFU_MMC to
CMD_EXT4_WRITE and migrate FAT_WRITE to Kconfig as well.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160919/459d1ade/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] dfu: Migrate to Kconfig
2016-09-19 18:19 ` Tom Rini
@ 2016-09-20 10:53 ` Lukasz Majewski
0 siblings, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2016-09-20 10:53 UTC (permalink / raw)
To: u-boot
Hi Tom,
> On Mon, Sep 19, 2016 at 01:31:30PM -0400, Tom Rini wrote:
>
> > 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.
> [snip]
> > +config DFU_MMC
> > + bool "MMC back end for DFU"
> > + help
> > + This option enables using DFU to read and write to MMC
> > based storage.
>
> Adding:
> If working with an underlying filesystem rather than raw
> storage you will still need to enable the appropriate write
> commands.
>
> As in doing local testing of stuff that drove me to scratch this itch
> I noticed that CMD_EXT4_WRITE is not set on sunxi. But I don't think
> we should force fat+ext4 write to be enabled simply because DFU_MMC
> is set. I should however follow up with adding default y if DFU_MMC to
> CMD_EXT4_WRITE and migrate FAT_WRITE to Kconfig as well.
>
+1
Thanks for investigation.
(It comes to me that inevitably it is the highest time to move
DFU/THor/UMS and underlying USB layers to DM and Kconfig).
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] dfu: Migrate to Kconfig
2016-09-19 17:31 ` [U-Boot] [PATCH] dfu: Migrate to Kconfig Tom Rini
2016-09-19 18:19 ` Tom Rini
@ 2016-09-20 10:53 ` Lukasz Majewski
2016-09-27 21:34 ` [U-Boot] " Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Lukasz Majewski @ 2016-09-20 10:53 UTC (permalink / raw)
To: u-boot
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@samsung.com>
> Signed-off-by: Tom Rini <trini@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@samsung.com>
Tom, thanks for the patch.
--
Best regards,
Lukasz Majewski
Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] dfu: Migrate to Kconfig
2016-09-19 17:31 ` [U-Boot] [PATCH] dfu: Migrate to Kconfig Tom Rini
2016-09-19 18:19 ` Tom Rini
2016-09-20 10:53 ` Lukasz Majewski
@ 2016-09-27 21:34 ` Tom Rini
2 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2016-09-27 21:34 UTC (permalink / raw)
To: u-boot
On Mon, Sep 19, 2016 at 01:31:30PM -0400, Tom Rini wrote:
> 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@samsung.com>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160927/a3cc5352/attachment.sig>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-09-27 21:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20160919173112eucas1p2d7d9a29201aa72349ab8b01f031109fc@eucas1p2.samsung.com>
2016-09-19 17:31 ` [U-Boot] [PATCH] dfu: Migrate to Kconfig Tom Rini
2016-09-19 18:19 ` Tom Rini
2016-09-20 10:53 ` Lukasz Majewski
2016-09-20 10:53 ` Lukasz Majewski
2016-09-27 21:34 ` [U-Boot] " Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox