[U-Boot] SPL building unwanted code

Adam Ford aford173 at gmail.com
Thu Aug 22 20:41:45 UTC 2019

I have boards (omap3_logic and omap3_logic_somlv) which do not want
USB enabled for SPL yet SPL is showing USB chunks being compiled into

I had to create a patch [1] which disables the USB host controller
when in SPL, yet some of the framework is still present. There appears
to be an option in the SPL menu for enabling/disabling "Support USB
host drivers" and an option for "Support USB Gadget drivers" and for
me, neither are selected.  What I'd like to do is kill off all the USB
code inside SPL to shrink the size.

When I look at the Makefile for the USB host, there doesn't appear to
be any checks for whether or not we're in SPL.

There also appears to be an inconsistency in where to place the
options for enabling something in SPL.  In some cases, high-level
options are listed in SPL/TPL menu, but in other instances, the
options are listed under the "Device Drivers" menu.  What I'd like to
do is add a menu option for CONFIG_SPL_USB which lets people turn off
all USB code when in SPL if they don't want any, then fix up the
Makefiles to use the SPL/TPL macros to determine if we need to build
or not.

My question is is...Where should the menu item for enabling
CONFIG_SPL_USB be used, in the SPL/TPL menu or the USB menu?


[1] - https://patchwork.ozlabs.org/patch/1151811/

More information about the U-Boot mailing list