include: define CONFIG_SPL and CONFIG_TPL as 1

We are about to switch to Kconfig in the next commit.
But there are something to get done beforehand.

In Kconfig, include/generated/autoconf.h defines boolean
CONFIG macros as 1.

CONFIG_SPL and CONFIG_TPL, if defined, must be defined as 1.
Otherwise, when switching to Kconfig, the build log
would be sprinkled with warning messages like this:
  warning: "CONFIG_SPL" redefined [enabled by default]

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Series-changes: 2
  - Rebase on the current u-boot/master
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 (Full U-Boot, SPL, TPL)
from one source tree.
Each image needs each 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] Full 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/spl/<board>_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/tpl/<board>_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 define a set of configs.

We expect a very long term to move existing config macros to Kconfig.
Two different infractructure must coexist in the interim.

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

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.
Don't send: do not clean scripts/kconfig/* by make mrproper
MAKEALL: adjust for Kconfig

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

FIXME!
This fixup is bad because it still depends on boards.cfg
to support options such as -a <ARCH>, -c <CPU> etc.
We want to delete it when switching to Kconfig.

We have to invent another method without using boards.cfg.
buildman: adjust for Kconfig

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

FIXME!
This fixup is bad because it still depends on boards.cfg
to support options such as -a <ARCH>, -c <CPU> etc.
We want to delete it when switching to Kconfig.

We have to invent another method without using boards.cfg.
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>
kbuild: remove CONFIG_SPL/CONFIG_TPL definition in config headers

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>
kconfig: remove old script

mkconfig is no longer used in Kconfig.
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