Commit Graph

4 Commits

Author SHA1 Message Date
Huihuang Shi d859182d41 customize function to generate config.h with proper suffixes
Add new format to parsed by kconfig to support
U and UL.
When config is 'int',if this symbol have 'range'
key words and bigger or qeual to 0,the int macro
will have suffix 'U'.
When config is 'hex',the suffix is 'U'.
When config have 'help' keywords,and the help contents
have the string "64-bit integer",it will add suffix 'L'.

V1->V2:
     1.modified the comments to let it much eaisy to understand.
     2.change the values' name protected_foot,protected_tai to
     guard_begin and guard_end.
     3.add regex to identified the '64-bit' and 'integer'.

V2->V3:
     1.remove kconfiglib internal attribute
     2.use config_string to avoid no active config entry

Tracked-On: #861
Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
2018-10-12 16:32:25 +08:00
Junjie Mao 5251f42574 HV: make: rename minimalconfig to savedefconfig
... following the naming convention of Linux kbuild.

v1 -> v2:

    * Introduced.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Geoffroy VanCutsem <geoffroy.vancutsem@intel.com>
2018-06-15 15:50:09 +08:00
Junjie Mao c4493cc1f8 HV: make: skip duplicated PLATFORM= on command line
Since .config has PLATFORM now, it is expected that the PLATFORM= command line
option is no longer necessary as long as a proper .config exists.

This patch implements this expectation. Now the platform to be selected is
determined by the following steps.

    1. If PLATFORM= is provided on the command line, the specified value is
       used.
    2. If there is no PLATFORM= on the command line and PLATFORM is defined in
       config.mk, its value is used.
    3. If neither PLATFORM= on the command line nor config.mk is available, a
       predefined default value is used.

v1 -> v2:

    * 'make oldconfig' should not pass CONFIG_xxx to the script since config.mk
      can be out-dated.
    * Change the default value of PLATFORM to SBL for backward compatibility of
      'make all'.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
Acked-by: Geoffroy VanCutsem <geoffroy.vancutsem@intel.com>
2018-06-15 15:50:09 +08:00
Junjie Mao 647aee6e34 scripts: introduce .config/config.h generators
This patch introduces some scripts that takes a Kconfig script and generates
.config or config.h. These scripts are general and can be used by the
hypervisor, dm, tools, etc. as long as proper make targets are added.

Note: Kconfiglib by Ulf Magnusson is ISC licensed.

v4 -> v5:

    * Add minimalconfig which creates a defconfig by minimizing a given .config.

v3 -> v4:

    * silentoldconfig now properly generate a .config if an old one does not
      exist.

v2 -> v3:

    * Add license info and the permission notice of Kconfiglib.
    * Mention the input Kconfig in the script descriptions.

v1 -> v2:

    * Drop kconfiglib.py. The getting started guide will be updated accordingly
      and dependency checks will be added to Makefile in the following patches.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
2018-06-08 17:21:13 +08:00