[PATCH 00/32] RFC: Migrate to split config

Tom Rini trini at konsulko.com
Tue Jan 31 22:57:58 CET 2023


On Tue, Jan 31, 2023 at 08:26:30AM -0700, Simon Glass wrote:

> U-Boot uses an SPL prefix on CONFIG options to indicate when an option
> relates to SPL. For example, while CONFIG_TEXT_BASE is the text base for
> U-Boot proper, CONFIG_SPL_TEXT_BASE is the text base for SPL.
> 
> Within the code it is possible do things like CONFIG_VAL(TEXT_BASE) to
> get that value. It returns the appropriate option, depending on the phase
> being built.
> 
> The same applies for boolean options, like CONFIG_BLK and CONFIG_SPL_BLK
> but in that case we use CONFIG_IS_ENABLED(BLK) to obtain the value.
> 
> For Makefiles we use an SPL_TPL_ macro which evalutes either to empty,
> SPL, TPL or even VPL depending on the build phase. So we can do things
> like:
> 
>    obj-$(CONFIG_$(SPL_TPL_)CLK) += clk-uclass.o
> 
> To complicate things a little, some options like CONFIG_ARCH_APPLE do not
> have an SPL version, so people have to remember to use IS_ENABLED()
> instead of CONFIG_IS_ENABLED(). If the latter is used, the value will be
> false.
> 
> All of this is rather confusing, since:
> 
> - people have to know whether to use IS_ENABLED() or CONFIG_IS_ENABLED()
> - the Makefiles are cluttered with $(SPL_TPL_) constructs
> - plain use of a CONFIG option (e.g. #ifdef CONFIG_CLK) may be correct in
>   some cases but not in others
> 
> This series updates U-Boot to use separate config files for each phase of
> the build. It drops use of CONFIG_IS_ENABLED() and SPL_TPL_ as well.
> 
> For now this series does not fully work due to inconsistencies in the
> Kconfig options. Many of these have been fixed [1] [2a] [2b] but more
> remain.
> 
> This series is available at u-boot-dm/splc-working
> 
> [1] https://patchwork.ozlabs.org/project/uboot/list/?series=339004
> [2a] https://patchwork.ozlabs.org/project/uboot/list/?series=339199&state=*
> [2b] https://patchwork.ozlabs.org/project/uboot/list/?series=339208&state=*

To summarize what I said on IRC, it's going to depend on what this looks
like once every board is expected to build and boot, which isn't the
case today, as there's more "dummy" or in other words, def_bool n
symbols added, so that we don't change things before/after this series.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230131/cb66f691/attachment.sig>


More information about the U-Boot mailing list