Message ID | 20201129164618.5829-3-pali@kernel.org |
---|---|
State | Superseded |
Delegated to: | Marek Vasut |
Headers | show |
Series | Nokia RX-51: Fix USB TTY console and enable it | expand |
On Sun 2020-11-29 17:46:07, Pali Rohár wrote: > musb udc code depends on usb gadget code provided by CONFIG_USB_DEVICE and > defined in drivers/usb/gadget/Makefile. But this Makefile is not included > into U-Boot build when CONFIG_USB_GADGET is not set. As CONFIG_USB_DEVICE > cannot be enabled together with CONFIG_USB_GADGET it means that dependency > for musb udc code is not compiled during build. Fix it by including > drivers/usb/gadget dependency also when CONFIG_USB_DEVICE is set. > _device_event_irq' > arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o:u-boot/drivers/usb/musb/musb_udc.c: more undefined references to `usbd_device_event_irq' follow > arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_setup_ep': > u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_alloc_urb' > arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_startup_events': > u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' > arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' > arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' > make: *** [Makefile:1762: u-boot] Error 1 > > Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Pavel Machek <pavel@ucw.cz>
On Sunday 29 November 2020 18:52:13 Pavel Machek wrote: > On Sun 2020-11-29 17:46:07, Pali Rohár wrote: > > musb udc code depends on usb gadget code provided by CONFIG_USB_DEVICE and > > defined in drivers/usb/gadget/Makefile. But this Makefile is not included > > into U-Boot build when CONFIG_USB_GADGET is not set. As CONFIG_USB_DEVICE > > cannot be enabled together with CONFIG_USB_GADGET it means that dependency > > for musb udc code is not compiled during build. Fix it by including > > drivers/usb/gadget dependency also when CONFIG_USB_DEVICE is set. > > > _device_event_irq' > > arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o:u-boot/drivers/usb/musb/musb_udc.c: more undefined references to `usbd_device_event_irq' follow > > arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_setup_ep': > > u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_alloc_urb' > > arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_startup_events': > > u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' > > arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' > > arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' > > make: *** [Makefile:1762: u-boot] Error 1 > > > > Signed-off-by: Pali Rohár <pali@kernel.org> > > Reviewed-by: Pavel Machek <pavel@ucw.cz> PING! I would like to remind this patch series as above compile error is still present in U-Boot v2021.01 version.
diff --git a/Makefile b/Makefile index 17719666fb..8b146db22c 100644 --- a/Makefile +++ b/Makefile @@ -792,6 +792,7 @@ libs-y += drivers/usb/dwc3/ libs-y += drivers/usb/common/ libs-y += drivers/usb/emul/ libs-y += drivers/usb/eth/ +libs-$(CONFIG_USB_DEVICE) += drivers/usb/gadget/ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/ libs-$(CONFIG_USB_GADGET) += drivers/usb/gadget/udc/ libs-y += drivers/usb/host/
musb udc code depends on usb gadget code provided by CONFIG_USB_DEVICE and defined in drivers/usb/gadget/Makefile. But this Makefile is not included into U-Boot build when CONFIG_USB_GADGET is not set. As CONFIG_USB_DEVICE cannot be enabled together with CONFIG_USB_GADGET it means that dependency for musb udc code is not compiled during build. Fix it by including drivers/usb/gadget dependency also when CONFIG_USB_DEVICE is set. This patch fixes compile errors: arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_rx': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_idle': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_zero_data_request': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_idle': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `ep0_recv_setup' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_ep0_rx': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_rcv_complete' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `musb_peri_rx_ep': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_rcv_complete' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_endpoint_write': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_tx_complete' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_irq': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o:u-boot/drivers/usb/musb/musb_udc.c: more undefined references to `usbd_device_event_irq' follow arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_setup_ep': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_alloc_urb' arm-linux-gnueabi-ld.bfd: drivers/usb/musb/built-in.o: in function `udc_startup_events': u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' arm-linux-gnueabi-ld.bfd: u-boot/drivers/usb/musb/musb_udc.c: undefined reference to `usbd_device_event_irq' make: *** [Makefile:1762: u-boot] Error 1 Signed-off-by: Pali Rohár <pali@kernel.org> --- Makefile | 1 + 1 file changed, 1 insertion(+)