[U-Boot] Quick guide to Kconfig

Masahiro Yamada yamada.m at jp.panasonic.com
Fri Aug 1 06:42:15 CEST 2014


Hi Ian,




On Thu, 31 Jul 2014 16:07:54 +0100
Ian Campbell <ijc at hellion.org.uk> wrote:

> On Thu, 2014-07-31 at 16:38 +0200, Hans de Goede wrote:
> > make Foo_defconfig
> > make menuconfig
> > <select FEL>
> > make
> 
> I was hoping that I might eventually be able to do something like
> 	make Foo_defconfig CONFIG_SPL_FEL=y
> or perhaps
> 	make Foo_defconfig S:CONFIG_SPL_FEL=y
> and have it DTRT(tm).


Sorry, we cannot override CONFIG macros from the command line;
We have to run "make menuconfig" (or "make spl/menuconfig")
and toggle the option.


> > I was planning on taking a shot at this, but the different make menuconfig
> > and make spl/menuconfigs have me somewhat confused (I've a decent knowledge of
> > Kconfig from my kernel work).
> 
> I think part of the problem is that right now we are at "Phase I" of the
> switch to Kconfig, which is where the board.cfg settings have moved as a
> string into CONFIG_SYS_EXTRA_OPTIONS. I suppose "Phase II" is that the
> various maintainers implement proper Kconfig options for their platforms
> and transition the individual settings over to it. Eventually
> CONFIG_SYS_EXTRA_OPTIONS goes away.

Exactly.

CONFIG_SYS_EXTRA_OPTIONS is a temporary gimmick
to migrate to Kconfig.


Please note this option is marked as "DEPRECATED".


config SYS_EXTRA_OPTIONS
        string "Extra Options (DEPRECATED)"
        depends on !SPL_BUILD
        help
          The old configuration infrastructure (= mkconfig + boards.cfg)
          provided the extra options field. If you have something like
          "HAS_BAR,BAZ=64", the optional options
            #define CONFIG_HAS
            #define CONFIG_BAZ  64
          will be defined in include/config.h.
          This option was prepared for the smooth migration from the old
          configuration to Kconfig. Since this option will be removed sometime,
          new boards should not use this option.



I do not recommend to use this option for new boards.



> Eventually (sooner rather than later, I think) we will want to have a
> first-class Kconfig setting for CONFIG_SPL_FEL and then things like
> "make spl/menuconfig" would let you enable FEL, I think/hope.
> 
> Apologies if I've misunderstood something and am therefore talking
> nonsense ;-)


Sounds nice, thanks!



Best Regards
Masahiro Yamada



More information about the U-Boot mailing list