[U-Boot] [PATCH 1/4] configs: opos6uldev: undef CONFIG_POWER_DOMAIN when SPL_BUILD

Peng Fan peng.fan at nxp.com
Fri Jul 27 02:18:18 UTC 2018


Hi Simon,

> >> > Need to find a way to avoid SPL build failure in future patch, but
> >> > in this patchset let's undef CONFIG_POWER_DOMAIN first, because it
> >> > is not needed.
> >> >
> >> >  include/configs/opos6uldev.h | 1 +
> >> >  1 file changed, 1 insertion(+)
> >>
> >> This should be handled by adding an SPL_POWER_DOMAIN option and
> >> converting existing uses to CONFIG_IS_ENABLED(POWER_DOMAIN)
> >
> > The opos6uldev_defconfig has "CONFIG_POWER_DOMAIN=y", so when
> building
> > SPL, this macro is still effective.
> > Opos6uldev compiles driver/core/device.c which includes power-domain.h in
> my later patch.
> > Because driver/power/domain is not built for SPL, so build failure for SPL.
> >
> > The simple method for now is to undef CONFIG_POWER_DOMAIN for SPL
> build.
> > If use CONFIG_IS_ENABLED, the undef CONFIG_POWER_DOMAIN will not be
> detected in Kconfig.
> >
> > Simply introduce SPL_POWER_DOMAIN could not fix this issue. Need to
> > let SPL choose CONFIG_SPL_POWER_DOMAIN, but not
> CONFIG_POWER_DOMAIN, I do not have a clear idea on how.
> 
> Here's how it works:
> 
> 1. Have two separate Kconfig options: CONFIG_POWER_DOMAIN and
> CONFIG_SPL_POWER_DOMAIN 2. Enable CONFIG_POWER_DOMAIN in the
> board config, but not CONFIG_SPL_POWER_DOMAIN 3. Use
> CONFIG_IS_ENABLED(POWER_DOMAIN) everywhere (with if() or #if) 4. Now,
> U-Boot proper will support POWER_DOMAIN, but SPL will not
> 
> The #undef mechanism is the old way of doing it, before we had
> CONFIG_IS_ENABLED
> 

Just posted out V2 following your suggestion.

Thanks,
Peng.

> Regards,
> Simon


More information about the U-Boot mailing list