[PATCH] usb: gadget: Compile USB ethernet gadget only if NET is enabled
Lukasz Majewski
lukma at denx.de
Thu May 4 11:04:45 CEST 2023
On Sun, 30 Apr 2023 23:20:35 +0200
Marek Vasut <marex at denx.de> wrote:
> In case NET networking is not enabled, it is not possible to compile
> the USB ethernet gadget. Protect the symbols in Makefile to avoid
> build failure. Such build failure may occur e.g. in case NET and USB
> ethernet gadget is enabled in U-Boot proper, but not in SPL.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> ---
> Cc: Lukasz Majewski <lukma at denx.de>
> ---
> drivers/usb/gadget/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
> index 6cfe0f3a041..36f65e7eb95 100644
> --- a/drivers/usb/gadget/Makefile
> +++ b/drivers/usb/gadget/Makefile
> @@ -34,8 +34,10 @@ endif
>
> obj-$(CONFIG_CI_UDC) += ci_udc.o
>
> +ifeq ($(CONFIG_$(SPL_TPL_)NET),y)
> obj-$(CONFIG_USB_ETHER) += ether.o
> obj-$(CONFIG_USB_ETH_RNDIS) += rndis.o
> +endif
>
> # Devices not related to the new gadget layer depend on
> CONFIG_USB_DEVICE # This is really only N900 and USBTTY now.
Reviewed-by: Lukasz Majewski <lukma at denx.de>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230504/669bdd76/attachment.sig>
More information about the U-Boot
mailing list