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

Sam Protsenko semen.protsenko at linaro.org
Sat Apr 2 23:04:01 CEST 2016


On Sat, Apr 2, 2016 at 4:00 PM, Tom Rini <trini at konsulko.com> wrote:
> 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).

You mean we should invert those options in include/configs/*.h files
using #undefs? But I thought we are going to get rid of those files
entirely, moving everything to Kconfigs/defconfigs? Or it's not the
case?

>
> --
> Tom


More information about the U-Boot mailing list