[U-Boot] [RFC] Disable USB options for SPL build

Tom Rini trini at konsulko.com
Sat Apr 2 15:00:01 CEST 2016


On Fri, Apr 01, 2016 at 11:50:24PM +0300, Sam Protsenko wrote:

> Hi All,
> 
> Since we are moving config options from include/configs/* to Kconfigs
> and defconfigs, we can't do #ifdefs anymore. Example: in
> include/configs/am43xx_evm.h you can see next code:
> 
> #if !defined(CONFIG_SPL_BUILD) || \
>     (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SPL_USBETH_SUPPORT))
> #define CONFIG_USB_GADGET
> ...
> #endif
> 
> So USB GADGET builds only for U-Boot, but doesn't builds for SPL.
> But when defining the same CONFIG_USB_GADGET option in defconfig, we
> can't do #ifdef code.
> 
> My question is, should we hardcode this in corresponding drivers
> instead? Or perhaps it should be done in some more elegant way? Or we
> can just forget about this and let it be built for both U-Boot and
> SPL? Please share your thoughts on this matter.

What's going on is that when we do have USB gadget support in SPL (which
is only some cases) we need to have other stuff off, so that it will fit
into SRAM.  Transitioning the SPL Kconfig options will require some
care, but for the USB side we can always just invert the logic as needed
to undef things Kconfig sets (.. other than via
CONFIG_SYS_EXTRA_OPTIONS).

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160402/a890525d/attachment.sig>


More information about the U-Boot mailing list