[U-Boot] [PATCH 06/11] kconfig: switch to Kconfig

Simon Glass sjg at chromium.org
Mon Apr 28 19:37:41 CEST 2014


On 23 April 2014 23:04, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
> This commit enables Kconfig.
> Going forward, we use Kconfig for board configuration.
> mkconfig will never be used. Nor will include/config.mk be generated.
>
> Kconfig must be adjusted for U-Boot because our situation is
> a little more complicated than Linux Kernel.
> We have to generate 3 images at most: Main image, SPL, TPL.
> And each of them can have a different set of CONFIG macros.
>
> In order to keep this scheme in Kconfig, some files must be modified.
> But the modification should be minimum.
>
> The location of Kconfig related files is as follows:
>
>  [1] Main
>    - .config                          (saved CONFIG list)
>    - include/config/auto.conf         (for use in makefiles)
>    - include/generated/autoconf.h     (for use in C sources)
>    - include/config/*                 (for if_changed_dep)
>
>  [2] SPL
>    - spl/.config                      (saved CONFIG list)
>    - spl/include/config/auto.conf     (for use in makefiles)
>    - spl/include/generated/autoconf.h (for use in C sources)
>    - spl/include/config/*             (for if_changed_dep)
>
>  [3] TPL
>    - tpl/.config                      (saved CONFIG list)
>    - tpl/include/config/auto.conf     (for use in makefiles)
>    - tpl/include/generated/autoconf.h (for use in C sources)
>    - tpl/include/config/*             (for if_changed_dep)
>
> Usage:
>
> Execute "make <board>_defconfig" to configure board and then run "make".
> Or "make <board>_defconfig all" to configure and build in one time.
>
> To modify configuration, run "make config", "make menuconfig", etc.
> To see the other configuration targets execute "make help".
>
> In Kconfig for U-boot, the configuration is done on three levels at most.
>
> "make menuconfig" will show a menu with a blue background for the
> main configuration.
>
> Enable "Build SPL image", "Build TPL image" under "General setup"
> to build SPL, TPL, respectively.
>
> After modifying settings, choose <Exit>.
> CONFIG macros will be saved into ".config" file.
>
> If SPL build is enabled, the second menu for SPL configuration
> will come up.
>
> And if TPL build is also enabled, the third menu for TPL will
> be displayed.
>
> By the way, there is another item worth remarking here:
> coexistence of Kconfig and board herder files.
>
> To define the set of CONFIG macros, we have used C headers.
>
> We expect long term to move existing CONFIG macros to Kconfig.
> Two different infractructure must coexist in the interim.
>
> Prior to Kconfig, include/autoconf.mk, include/spl-autoconf.mk,
> include/tpl-autoconf.mk were generated from the config header
> for the use in makefiles.
>
> They are still supported in Kconfig for U-Boot.
> They are created at the beginning of the build and merged into
> include/config/auto.conf, spl/include/config/auto.conf,
> tpl/include/config/auto.conf, respectively.
>
> Signed-off-by: Masahiro Yamada <yamada.m at jp.panasonic.com>

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list