kconfig: switch to Kconfig

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 multiple binary images (Normal, SPL, TPL)
from one source tree.
Each image needs its own configuration input.

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] Normal U-Boot image
   - configs/<board>_defconfig        (default configuration)
   - .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
   - configs/<board>_spl_defconfig    (default configuration)
   - 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
   - configs/<board>_tpl_defconfig    (default configuration)
   - 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.

You can use "make config", "make menuconfig" etc. to create
a new .config or modify the existing one.

In Kconfig for U-boot, the configuration is done on three levels at most.

By the way, there is another item worth remarking here:
coexistence of Kconfig and board herder files.

Prior to Kconfig, we used C headers to define a set of configs.

We expect a very long term to migrate from C headers to Kconfig.
Two different infractructure must coexist in the interim.

In our former configuration scheme, include/autoconf.mk was generated
for use in makefiles.
It is still generated under include/, spl/include/, tpl/include/ directory
for the Normal, SPL, TPL image, respectively.

Series-changes: 3
  - Invoke SPL/TPL configuration only for defconfig and silentoldconfig

Series-changes: 2
  - Put dirty build rule into scripts/multiple_config.sh and
    scripts/Makefile.autoconf
  - Fix dependency tracking.
    In v1, any change to Kconfig triggered re-complile of all objects.
    In this version, re-compile is kept at a minimum.
  - Fix a clean-source check
    In v1, clean source tree check did not work correctly for
    out-of-tree build.
fix Makefile.autoconf
Don't send: do not clean scripts/kconfig/* by make mrproper
Do not apply: tools: add gen_maintainers

 ========================================
 Do not apply this patch to the main line
 ========================================

This tool generates MAINTAINERS files based on boards.cfg file.

Because it is used only once, it should not be applied.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-changes: 4
  - Newly added
Add MAINTAINERS files

We have switched to Kconfig and the boards.cfg file is going to
be removed. We have to retrieve the board status and maintainers
information from it.

The MAINTAINERS format as in Linux Kernel would be nice
because we can crib the scripts/get_maintainer.pl for our use.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-changes: 4
  - Newly added
tools: add genboardscfg

Now the primary data for each board is in Kconfig, defconfig and
MAINTAINERS.

It is true boards.cfg is needed for MAKEALL and buildman and
might be useful to brouse boards in a single database.
But it would be painful to maintain the boards.cfg in sync.

So, this is the solution.
Add a tool to generate the equivalent boards.cfg file based on
the latest Kconfig, defconfig and MAINTAINERS.

We can keep all the functions of MAKEALL and buildman with it.

The best thing would be to change MAKEALL and buildman for not
depending on boards.cfg in future, but it would take some time.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-changes: 4
  - Newly added
kconfig: remove mkconfig and boards.cfg

The old configuration script is no longer necessary.

And boards.cfg is not a primary database, but derived from
Kconfig, defconfig and MAINTAINERS files.

We can generate the latest boards.cfg with the genboardscfg tool.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Series-changes: 4
  - Remove boards.cfg
  - Update .gitignore
MAKEALL: adjust for Kconfig

Use "make <board>_defconfig" instead of "make <board>_config".

Invoke tools/genboardscfg to generate boards.cfg when it is missing.

Series-changes: 4
  - Generate boards.cfg automatically if it is missing
buildman: adjust for Kconfig

Use "make <board>_defconfig" instead of "make <board>_config".

Invoke tools/genboardscfg to generate boards.cfg when it is missing.

Series-changes: 4
  - Generate boards.cfg automatically if it is missing
MAKEALL: Show configuration
kconfig: delete redundant CONFIG_${ARCH} definition

CONFIG_${ARCH} is defined by Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Series-changes: 4
  - Rebase on the current u-boot/master
kbuild: remove CONFIG_SPL/CONFIG_TPL definition in config headers

Now CONFIG_SPL and CONFIG_TPL are defined in Kconfig.

Remove the redundant definition in config headers.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Series-changes: 4
  - Rebase on the current u-boot/master

Series-changes: 3
  - Rebase on the current u-boot/master

Series-changes: 2
  - Rebase on the current u-boot/master
kconfig: add CONFIG_CROSS_COMPILE

Copy from Linux Kernel (with a few adjustments in comments).
kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE
Do not apply: tools: add updatedefconfig
kconfig: zynq: refactor Zynq Kconfig and defconfig

Move Zynq board select menu to arch/arm/cpu/armv7/Kconfig.

Move common setting (CONFIG_SYS_SOC="zynq" etc.)
to arch/arm/cpu/armv7/Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
tegra:
tools: move_config
init version
tmp