mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] commands: add config option for dfu command
@ 2025-01-09  7:44 Sascha Hauer
  2025-01-09  9:10 ` Ahmad Fatoum
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Hauer @ 2025-01-09  7:44 UTC (permalink / raw)
  To: Barebox List

Add an extra config option for the dfu command to avoid building it in
non interactive builds which leads to linker errors.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 commands/Kconfig  | 6 ++++++
 commands/Makefile | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/commands/Kconfig b/commands/Kconfig
index 67116ec9fc..a30299abf6 100644
--- a/commands/Kconfig
+++ b/commands/Kconfig
@@ -2172,6 +2172,12 @@ config CMD_USBGADGET
 	depends on USB_GADGET
 	prompt "usbgadget"
 
+config CMD_DFU
+	bool
+	depends on USB_GADGET_DFU
+	default y
+	prompt "dfu"
+
 config CMD_WD
 	bool
 	depends on WATCHDOG
diff --git a/commands/Makefile b/commands/Makefile
index a98c39637c..0dfa0a33a4 100644
--- a/commands/Makefile
+++ b/commands/Makefile
@@ -64,7 +64,7 @@ obj-$(CONFIG_CMD_INSMOD)	+= insmod.o
 obj-$(CONFIG_CMD_SPLASH)	+= splash.o
 obj-$(CONFIG_CMD_FBTEST)	+= fbtest.o
 obj-$(CONFIG_CMD_BEEP)		+= beep.o
-obj-$(CONFIG_USB_GADGET_DFU)	+= dfu.o
+obj-$(CONFIG_CMD_DFU)		+= dfu.o
 obj-$(CONFIG_USB_GADGET_SERIAL)	+= usbserial.o
 obj-$(CONFIG_CMD_GPIO)		+= gpio.o
 obj-$(CONFIG_CMD_UNCOMPRESS)	+= uncompress.o
-- 
2.39.5




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] commands: add config option for dfu command
  2025-01-09  7:44 [PATCH] commands: add config option for dfu command Sascha Hauer
@ 2025-01-09  9:10 ` Ahmad Fatoum
  0 siblings, 0 replies; 2+ messages in thread
From: Ahmad Fatoum @ 2025-01-09  9:10 UTC (permalink / raw)
  To: Sascha Hauer, Barebox List

Hello Sascha,

On 09.01.25 08:44, Sascha Hauer wrote:
> Add an extra config option for the dfu command to avoid building it in
> non interactive builds which leads to linker errors.
> 
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
>  commands/Kconfig  | 6 ++++++
>  commands/Makefile | 2 +-
>  2 files changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/commands/Kconfig b/commands/Kconfig
> index 67116ec9fc..a30299abf6 100644
> --- a/commands/Kconfig
> +++ b/commands/Kconfig
> @@ -2172,6 +2172,12 @@ config CMD_USBGADGET
>  	depends on USB_GADGET
>  	prompt "usbgadget"
>  
> +config CMD_DFU
> +	bool
> +	depends on USB_GADGET_DFU
> +	default y

Let's use the occasion and make it not enabled by default?

> +	prompt "dfu"

Please add a help text pointing out usbgdaget and mentioning that
the downside of using dfu (blocks shell).

Thanks,
Ahmad

> +
>  config CMD_WD
>  	bool
>  	depends on WATCHDOG
> diff --git a/commands/Makefile b/commands/Makefile
> index a98c39637c..0dfa0a33a4 100644
> --- a/commands/Makefile
> +++ b/commands/Makefile
> @@ -64,7 +64,7 @@ obj-$(CONFIG_CMD_INSMOD)	+= insmod.o
>  obj-$(CONFIG_CMD_SPLASH)	+= splash.o
>  obj-$(CONFIG_CMD_FBTEST)	+= fbtest.o
>  obj-$(CONFIG_CMD_BEEP)		+= beep.o
> -obj-$(CONFIG_USB_GADGET_DFU)	+= dfu.o
> +obj-$(CONFIG_CMD_DFU)		+= dfu.o
>  obj-$(CONFIG_USB_GADGET_SERIAL)	+= usbserial.o
>  obj-$(CONFIG_CMD_GPIO)		+= gpio.o
>  obj-$(CONFIG_CMD_UNCOMPRESS)	+= uncompress.o


-- 
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 |



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-01-09  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-09  7:44 [PATCH] commands: add config option for dfu command Sascha Hauer
2025-01-09  9:10 ` Ahmad Fatoum

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox