dfu: Migrate to Kconfig
PATCH 1/1 dfu: Migrate to Kconfig
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.
---
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(+)
cmd/Kconfig +1 -0
@@ -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.
drivers/dfu/Kconfig +28 -0
@@ -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
Signature · 1 line
1.9.1
PATCH 1/1 dfu: Migrate to Kconfig
Quoted 4 lines · Tom Rini
Introduce a hidden
USB_FUNCTION_DFUKconfigoption and select it forCMD_DFU(as we must have the DFU command enabled to do anything DFU). Make all of the entries indrivers/dfu/Kconfigdepend onCMD_DFUand add options for all of the back end choices that DFU can make use of.
[snip]
drivers/dfu/Kconfig config DFU_TFTP · line 18
Quoted 4 lines
drivers/dfu/Kconfig +4
-0+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.
Signature · 8 lines
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>
PATCH 1/1 dfu: Migrate to Kconfig
Hi Tom,
Quoted 19 lines · Tom Rini
Quoted 6 lines
Introduce a hidden
USB_FUNCTION_DFUKconfigoption and select it forCMD_DFU(as we must have the DFU command enabled to do anything DFU). Make all of the entries indrivers/dfu/Kconfigdepend onCMD_DFUand add options for all of the back end choices that DFU can make use of.[snip]
Quoted 5 lines
drivers/dfu/Kconfig +4
-0+config DFU_MMC + bool "MMC back end for DFU" + help + This option enables using DFU to read and write to MMCbased storage.
Adding:
If working with an underlying filesystem rather than raw storage you will still need to enable the appropriate write commands.
Quoted 6 lines
As in doing local testing of stuff that drove me to scratch this itch I noticed that
CMD_EXT4_WRITEis not set on sunxi. But I don't think we should force fat+ext4 write to be enabled simply becauseDFU_MMCis set. I should however follow up with adding default y ifDFU_MMCtoCMD_EXT4_WRITEand migrateFAT_WRITEtoKconfigas 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).
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
PATCH 1/1 dfu: Migrate to Kconfig
In reply to Tom RiniHi Tom,
Quoted 70 lines
Introduce a hidden
USB_FUNCTION_DFUKconfigoption and select it forCMD_DFU(as we must have the DFU command enabled to do anything DFU). Make all of the entries indrivers/dfu/Kconfigdepend onCMD_DFUand add options for all of the back end choices that DFU can make use of.Cc Lukasz Majewski <[email protected]>Signed-off-by Tom Rini <[email protected]>---
Once ack'd I'll runmoveconfig.pyto 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 aboutDFU_MMCbeing unset.--- cmd/Kconfig | 1 + drivers/dfu/Kconfig | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+)cmd/Kconfig +1
-0@@ -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-Bootcreate a DFU class device via USB.
drivers/dfu/Kconfig +4
-0@@ -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 foundat ./doc/README.dfutftp +
drivers/dfu/Kconfig +4
-0+config DFU_MMC + bool "MMC back end for DFU" + help + This option enables using DFU to read and write to MMCbased storage. +
drivers/dfu/Kconfig +4
-0+config DFU_NAND + bool "NAND back end for DFU" + help + This option enables using DFU to read and write to NANDbased
drivers/dfu/Kconfig +6
-0+ storage. + +config DFU_RAM + bool "RAM back end for DFU" + help + This option enables using DFU to read and write RAM on thetarget. +
drivers/dfu/Kconfig +4
-0+config DFU_SF + bool "SPI flash back end for DFU" + help + This option enables using DFU to read and write to SPIflash based
drivers/dfu/Kconfig config DFU_TFTP · line 38
Quoted 4 lines
drivers/dfu/Kconfig +3
-0+ storage. + +endif endmenu
Tom, thanks for the patch.
Signature · 5 lines
Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group
Quoted 8 lines · Tom Rini
Introduce a hidden
USB_FUNCTION_DFUKconfigoption and select it forCMD_DFU(as we must have the DFU command enabled to do anything DFU). Make all of the entries indrivers/dfu/Kconfigdepend onCMD_DFUand add options for all of the back end choices that DFU can make use of.Cc Lukasz Majewski <[email protected]>Signed-off-by Tom Rini <[email protected]>Acked-by Lukasz Majewski <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>