[U-Boot] Kconfig for SPL

Simon Glass sjg at chromium.org
Mon Jul 20 04:32:24 CEST 2015


HI Masahiro,

In my fiddling with Rockchip in SPL I found that the current single
config is simple, but a little too limited. You discussed this briefly
with someone from Marvell also. At present we effectively have two
options:

1. decide for all boards that a uclass should be supported in SPL (and
put it in Makefile.spl, or not)

2. ugly #undefs to try to fix things up after the fact (i.e. #ifdef
CONFIG_SPL_BUILD...#undef CONFIG_PINCTRL)

You mentioned the idea of allowing something like this:

spl-$(CONFIG_FRED) += file.o

In practice I assume you would generate two config headers from the
same input: one for SPL and one for U-Boot proper.

Another option would be to allow several states for the same config.
At present in the .config files we have:

CONFIG_FRED=y

We could allow:

CONFIG_FRED=yyn

meaning yes for U-Boot proper, yes for SPL, no for TPL (assuming these
are enabled for the board). For this we would need a new type, similar
to tristate which allows cycling through the options.

In the Makefile we could have

obj-$(CONFIG_FRED) += file.o

and then Kbuild would do the right thing - i.e. include the file for
U-Boot proper, SPL but not TPL.

What do you think about this? I fear that we need to figure something out...

Regards,
Simon


More information about the U-Boot mailing list