diff mbox series

[U-Boot,RFC,v1,4/5] dfu: Resolve Kconfig dependency loops

Message ID 1524562627-5794-5-git-send-email-alex.kiernan@gmail.com
State Superseded
Delegated to: Lukasz Majewski
Headers show
Series Add fastboot UDP support | expand

Commit Message

Alex Kiernan April 24, 2018, 9:37 a.m. UTC
Fix recursive dependencies in Kconfig introduced by fastboot UDP

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
---

 cmd/fastboot/Kconfig | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Lukasz Majewski April 25, 2018, 7:53 a.m. UTC | #1
Hi Alex,

> Fix recursive dependencies in Kconfig introduced by fastboot UDP
> 
> Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> ---
> 
>  cmd/fastboot/Kconfig | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig
> index 0c57616..0f804ea 100644
> --- a/cmd/fastboot/Kconfig
> +++ b/cmd/fastboot/Kconfig
> @@ -2,13 +2,13 @@ comment "FASTBOOT"
>  
>  menuconfig FASTBOOT
>  	bool "Fastboot support"
> -	depends on USB_GADGET
>  	default y if ARCH_SUNXI && USB_MUSB_GADGET
>  
>  if FASTBOOT
>  
>  config USB_FUNCTION_FASTBOOT
>  	bool "Enable USB fastboot gadget"
> +	depends on USB_GADGET
>  	default y
>  	select USB_GADGET_DOWNLOAD
>  	imply ANDROID_BOOT_IMAGE
> @@ -17,7 +17,7 @@ config USB_FUNCTION_FASTBOOT
>  	  This enables the USB part of the fastboot gadget.
>  
>  config UDP_FUNCTION_FASTBOOT
> -	select NET
> +	depends on NET
>  	bool "Enable fastboot protocol over UDP"
>  	help
>  	  This enables the fastboot protocol over UDP.
> @@ -66,6 +66,7 @@ config FASTBOOT_BUF_SIZE
>  
>  config FASTBOOT_USB_DEV
>  	int "USB controller number"
> +	depends on USB_FUNCTION_FASTBOOT
>  	default 0
>  	help
>  	  Some boards have USB OTG controller other than 0. Define
> this

I think that it should be possible to have fastboot support enabled for
both USB and ETH if a board has those interfaces present.

Then by using proper commands:

fastboot usb or fastboot udp we can decide which medium would be used.

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
Alex Deymo April 25, 2018, 8:55 a.m. UTC | #2
2018-04-25 9:53 GMT+02:00 Lukasz Majewski <lukma@denx.de>:

> Hi Alex,
>
> > Fix recursive dependencies in Kconfig introduced by fastboot UDP
> >
> > Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
> > ---
> >
> >  cmd/fastboot/Kconfig | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig
> > index 0c57616..0f804ea 100644
> > --- a/cmd/fastboot/Kconfig
> > +++ b/cmd/fastboot/Kconfig
> > @@ -2,13 +2,13 @@ comment "FASTBOOT"
> >
> >  menuconfig FASTBOOT
> >       bool "Fastboot support"
> > -     depends on USB_GADGET
> >       default y if ARCH_SUNXI && USB_MUSB_GADGET
> >
> >  if FASTBOOT
> >
> >  config USB_FUNCTION_FASTBOOT
> >       bool "Enable USB fastboot gadget"
> > +     depends on USB_GADGET
> >       default y
> >       select USB_GADGET_DOWNLOAD
> >       imply ANDROID_BOOT_IMAGE
> > @@ -17,7 +17,7 @@ config USB_FUNCTION_FASTBOOT
> >         This enables the USB part of the fastboot gadget.
> >
> >  config UDP_FUNCTION_FASTBOOT
> > -     select NET
> > +     depends on NET
> >       bool "Enable fastboot protocol over UDP"
> >       help
> >         This enables the fastboot protocol over UDP.
> > @@ -66,6 +66,7 @@ config FASTBOOT_BUF_SIZE
> >
> >  config FASTBOOT_USB_DEV
> >       int "USB controller number"
> > +     depends on USB_FUNCTION_FASTBOOT
> >       default 0
> >       help
> >         Some boards have USB OTG controller other than 0. Define
> > this
>
> I think that it should be possible to have fastboot support enabled for
> both USB and ETH if a board has those interfaces present.
>
> Then by using proper commands:
>
> fastboot usb or fastboot udp we can decide which medium would be used.
>
> I agree that compiling support for both should be possible (I'm not sure
if it is really that useful). I was referring to that supporting fastboot
in both interfaces at the same time would be very complicated; but
selecting at runtime whether you want "fastboot udp" or "fastboot usb" is
easy.

deymo
diff mbox series

Patch

diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig
index 0c57616..0f804ea 100644
--- a/cmd/fastboot/Kconfig
+++ b/cmd/fastboot/Kconfig
@@ -2,13 +2,13 @@  comment "FASTBOOT"
 
 menuconfig FASTBOOT
 	bool "Fastboot support"
-	depends on USB_GADGET
 	default y if ARCH_SUNXI && USB_MUSB_GADGET
 
 if FASTBOOT
 
 config USB_FUNCTION_FASTBOOT
 	bool "Enable USB fastboot gadget"
+	depends on USB_GADGET
 	default y
 	select USB_GADGET_DOWNLOAD
 	imply ANDROID_BOOT_IMAGE
@@ -17,7 +17,7 @@  config USB_FUNCTION_FASTBOOT
 	  This enables the USB part of the fastboot gadget.
 
 config UDP_FUNCTION_FASTBOOT
-	select NET
+	depends on NET
 	bool "Enable fastboot protocol over UDP"
 	help
 	  This enables the fastboot protocol over UDP.
@@ -66,6 +66,7 @@  config FASTBOOT_BUF_SIZE
 
 config FASTBOOT_USB_DEV
 	int "USB controller number"
+	depends on USB_FUNCTION_FASTBOOT
 	default 0
 	help
 	  Some boards have USB OTG controller other than 0. Define this