diff mbox

[U-Boot] usb:gadget: Disallow DFU in SPL for now

Message ID 1474987320-26982-1-git-send-email-trini@konsulko.com
State Accepted
Commit 6ad6102246d83ec1d39aeba83f66cf5faffd0f82
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Sept. 27, 2016, 2:42 p.m. UTC
Previously, DFU was not built in for SPL and often disabled via the board
config.h file, in the SPL build.  By moving DFU to Kconfig we now need to
move this logic to the Makefile to continue to allow boards to fit within
their SPL size limit (until gcc 6 is more widespread and unused strings will
be discarded).

Signed-off-by: Tom Rini <trini@konsulko.com>
---
Without this, but everything converted am335x_evm_usbspl fails to link (does
gadget USB in SPL) unless we make drivers/dfu/ unconditional.  This however
breaks a few other platforms that have a smaller SPL size due to undiscarded
strings, and a lot of other platforms just grow by a few KiB.  This is the best
solution I can come up with for now.

 drivers/usb/gadget/Makefile | 2 ++
 1 file changed, 2 insertions(+)

Comments

Tom Rini Sept. 27, 2016, 9:34 p.m. UTC | #1
On Tue, Sep 27, 2016 at 10:42:00AM -0400, Tom Rini wrote:

> Previously, DFU was not built in for SPL and often disabled via the board
> config.h file, in the SPL build.  By moving DFU to Kconfig we now need to
> move this logic to the Makefile to continue to allow boards to fit within
> their SPL size limit (until gcc 6 is more widespread and unused strings will
> be discarded).
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!
Ɓukasz Majewski Sept. 28, 2016, 9:19 a.m. UTC | #2
Hi Tom,

> Previously, DFU was not built in for SPL and often disabled via the
> board config.h file, in the SPL build.  By moving DFU to Kconfig we
> now need to move this logic to the Makefile to continue to allow
> boards to fit within their SPL size limit (until gcc 6 is more
> widespread and unused strings will be discarded).
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> Without this, but everything converted am335x_evm_usbspl fails to
> link (does gadget USB in SPL) unless we make drivers/dfu/
> unconditional.  This however breaks a few other platforms that have a
> smaller SPL size due to undiscarded strings, and a lot of other
> platforms just grow by a few KiB.  This is the best solution I can
> come up with for now.

Ok, lets disable it (hopefully for now).

> 
>  drivers/usb/gadget/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
> index c915c79..acc9964 100644
> --- a/drivers/usb/gadget/Makefile
> +++ b/drivers/usb/gadget/Makefile
> @@ -19,7 +19,9 @@ obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
>  obj-$(CONFIG_CI_UDC)	+= ci_udc.o
>  obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
>  obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
> +ifndef CONFIG_SPL_BUILD
>  obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o
> +endif
>  obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o
>  obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o
>  endif
diff mbox

Patch

diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index c915c79..acc9964 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -19,7 +19,9 @@  obj-$(CONFIG_USB_GADGET_FOTG210) += fotg210.o
 obj-$(CONFIG_CI_UDC)	+= ci_udc.o
 obj-$(CONFIG_USB_GADGET_DOWNLOAD) += g_dnl.o
 obj-$(CONFIG_USB_FUNCTION_THOR) += f_thor.o
+ifndef CONFIG_SPL_BUILD
 obj-$(CONFIG_USB_FUNCTION_DFU) += f_dfu.o
+endif
 obj-$(CONFIG_USB_FUNCTION_MASS_STORAGE) += f_mass_storage.o
 obj-$(CONFIG_USB_FUNCTION_FASTBOOT) += f_fastboot.o
 endif