scons: Hook in the listnewconfig kconfig helper.
This helper lists config options which are new in the Kconfig and which are not currently set in the config file. Change-Id: I0c426d85c0cf0d2bdbac599845669165285a82a0
This commit is contained in:
11
SConstruct
11
SConstruct
@@ -261,6 +261,7 @@ Targets:
|
||||
|
||||
kconfig_actions = (
|
||||
'defconfig',
|
||||
'listnewconfig',
|
||||
'menuconfig',
|
||||
'setconfig',
|
||||
)
|
||||
@@ -293,6 +294,13 @@ Kconfig tools:
|
||||
scons defconfig build/foo/bar build_opts/MIPS
|
||||
|
||||
|
||||
listnewconfig:
|
||||
Lists config options which are new in the Kconfig and which are not
|
||||
currently set in the existing config file.
|
||||
|
||||
scons listnewconfig build/foo/bar
|
||||
|
||||
|
||||
menuconfig:
|
||||
Opens the menuconfig editor which will let you view and edit config
|
||||
values, and view help text. menuconfig runs in text mode.
|
||||
@@ -831,6 +839,9 @@ for variant_path in variant_paths:
|
||||
defconfig_path = makePathAbsolute(kconfig_args[0])
|
||||
kconfig.defconfig(env, kconfig_file.abspath,
|
||||
defconfig_path, config_file.abspath)
|
||||
elif kconfig_action == 'listnewconfig':
|
||||
kconfig.listnewconfig(env, kconfig_file.abspath,
|
||||
config_file.abspath)
|
||||
elif kconfig_action == 'menuconfig':
|
||||
kconfig.menuconfig(env, kconfig_file.abspath, config_file.abspath,
|
||||
variant_path)
|
||||
|
||||
@@ -30,6 +30,7 @@ import kconfiglib
|
||||
|
||||
_kconfig_helpers = {
|
||||
"DEFCONFIG_PY": "defconfig.py",
|
||||
"LISTNEWCONFIG_PY": "listnewconfig.py",
|
||||
"MENUCONFIG_PY": "menuconfig.py",
|
||||
"SETCONFIG_PY": "setconfig.py",
|
||||
}
|
||||
@@ -93,6 +94,18 @@ def defconfig(env, base_kconfig, config_in, config_out):
|
||||
error("Failed to run defconfig")
|
||||
|
||||
|
||||
def listnewconfig(env, base_kconfig, config_path):
|
||||
"""
|
||||
Interface of handling listnewconfig.py of Kconfiglib
|
||||
"""
|
||||
kconfig_env = _prep_env(env, base_kconfig, config_path)
|
||||
# Provide a little visual separation between SCons output and
|
||||
# listnewconfig output.
|
||||
print()
|
||||
if kconfig_env.Execute('"${LISTNEWCONFIG_PY}" "${BASE_KCONFIG}"') != 0:
|
||||
error("Failed to run listnewconfig")
|
||||
|
||||
|
||||
def menuconfig(
|
||||
env, base_kconfig, config_path, main_menu_text, style="aquatic"
|
||||
):
|
||||
|
||||
Reference in New Issue
Block a user