acrn-hypervisor/scripts
Junjie Mao 5f6a10f1e1 kconfig: use defconfig instead of default values in silentoldconfig
Currently silentoldconfig uses the default values in Kconfig when .config does
not exist or is for a different platform from the one specified in command line
options. This makes it impossible to leverage defconfigs when a simple 'make' is
invoked to build the hypervisor, as 'make' calls oldconfig instead of defconfig
for creating a configuration file.

With DEFCONFIG_LIST in Kconfig, now silentoldconfig is also able to know which
defconfig is appropriate given the specified board. This patch changes the
behavior of oldsilentconfig as follows.

    1. When an old .config for the given board exists, the script updates the
       .config per configurations specified from the command line. Instead of
       manually resetting all symbols, the script now relies on Kconfiglib's
       internal logic to automatically update invisible symbols after symbol
       value changes.

    2. When an old .config does not exist or is not for the specified board, the
       defconfig for that board is used as base line and further tweaked per
       configurations from the command line.

v3 -> v4:

* Rephrase comments in silentoldconfig.py.

v2 -> v3:

* Keep backward compatibility of silentoldconfig.py since vmcfg also uses the
  script.

v1 -> v2:

* Include .config when it is edited manually so that new configurations
  overwritten the old (in the outdated config.mk).

* Compare the board in .config with the one in the defconfig instead of what is
  specified in the environment variable BOARD, as defconfig and BOARD may use
  different names (e.g. aliases or different cases)

Tracked-On: #1588
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Anthony Xu <anthony.xu@intel.com>
2018-10-30 10:49:12 +08:00
..
kconfig kconfig: use defconfig instead of default values in silentoldconfig 2018-10-30 10:49:12 +08:00
deps.mk kconfig: a faster way to check the availability of python3 package 2018-10-30 10:49:12 +08:00