
On 6/10/20 11:57 PM, Tom Rini wrote: [...]
My point is more in the general direction of being able to configure SPL/TPL/U-Boot separately, without being forced to craft nasty ifdeffery in include/config/board.h if I need something enabled in SPL, but not in U-Boot, and vice versa. And for that the Kconfig should be able to somehow emit the _SPL/_TPL/U-Boot options of all symbols I think, so that we won't need separate entry for each.
I haven't seen a case where the nasty ifdeffery in a config header file wasn't basically either:
- Now wrong (we _have_ the symbols today to say we don't want X in SPL)
- Working around a case where we need to use $(SPL_TPL_) somewhere but didn't know that we could use $(SPL_TPL_) to fix the problem instead.
- Now not useful (for example, disable CMD_xxx for SPL, but we've really sorted things out so now so doing that didn't help anything).
Now I'm happy to admit that I just might be missing a case as I've only gotten as far as "undef CONFIG_[ABC]" and BOOTCOMMAND is possibly leading to embedding a long string where we really don't want it. Please point me at more undef cases that need to be resolved in some way.
I don't want to resolve these problems one-by-one , the obvious solution for them AND the growth of Kconfig files with multiple copies of the same symbol for SPL/TPL/U-Boot is the have Kconfig generate those symbols automatically for SPL/TPL/U-Boot and then let user pick the configuration as needed. That would make the undefs in include/configs/board.h go away easily and would reduce the duplication in Kconfig files.