[PATCH 2/6] kconfig: Add support for conditional values
sjg at chromium.org
Fri May 22 16:24:55 CEST 2020
On Fri, 22 May 2020 at 00:18, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
> On 5/22/20 4:17 AM, Masahiro Yamada wrote:
> > On Fri, May 22, 2020 at 11:02 AM Simon Glass <sjg at chromium.org> wrote:
> >> At present if an optional Kconfig value needs to be used it must be
> >> bracketed by #ifdef. For example, with this Kconfig setup:
> >> config WIBBLE
> >> bool "Support wibbles, the world needs more wibbles"
> >> config WIBBLE_ADDR
> >> hex "Address of the wibble"
> >> depends on WIBBLE
> > I am not sure if this is a good idea.
> > If you want to always use CONFIG_WIBBLE_ADDR,
> > you can get rid of 'depends on WIBBLE'.
Yes that's right.
But I worry that we end up clutting the Kconfig with unused things.
Another option would be for Kconfig to emit hex CONFIGs always, even
> Hello Simon,
> what is the effect on the code size if you eliminate the #ifdefs?
> Isn't this move growing the size of the U-Boot binary?
No it is handled at compile time so the code doesn't make it into the image.
More information about the U-Boot