scons: Hook up the kconfig guiconfig program.
Change-Id: I0563a2fb2d79cea5974aeaf65a400be5ee51dc63
This commit is contained in:
11
SConstruct
11
SConstruct
@@ -261,6 +261,7 @@ Targets:
|
||||
|
||||
kconfig_actions = (
|
||||
'defconfig',
|
||||
'guiconfig',
|
||||
'listnewconfig',
|
||||
'menuconfig',
|
||||
'setconfig',
|
||||
@@ -294,6 +295,13 @@ Kconfig tools:
|
||||
scons defconfig build/foo/bar build_opts/MIPS
|
||||
|
||||
|
||||
guiconfig:
|
||||
Opens the guiconfig editor which will let you view and edit config
|
||||
values, and view help text. guiconfig runs as a graphical application.
|
||||
|
||||
scons guiconfig build/foo/bar
|
||||
|
||||
|
||||
listnewconfig:
|
||||
Lists config options which are new in the Kconfig and which are not
|
||||
currently set in the existing config file.
|
||||
@@ -839,6 +847,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 == 'guiconfig':
|
||||
kconfig.guiconfig(env, kconfig_file.abspath, config_file.abspath,
|
||||
variant_path)
|
||||
elif kconfig_action == 'listnewconfig':
|
||||
kconfig.listnewconfig(env, kconfig_file.abspath,
|
||||
config_file.abspath)
|
||||
|
||||
@@ -30,6 +30,7 @@ import kconfiglib
|
||||
|
||||
_kconfig_helpers = {
|
||||
"DEFCONFIG_PY": "defconfig.py",
|
||||
"GUICONFIG_PY": "guiconfig.py",
|
||||
"LISTNEWCONFIG_PY": "listnewconfig.py",
|
||||
"MENUCONFIG_PY": "menuconfig.py",
|
||||
"SETCONFIG_PY": "setconfig.py",
|
||||
@@ -94,6 +95,16 @@ def defconfig(env, base_kconfig, config_in, config_out):
|
||||
error("Failed to run defconfig")
|
||||
|
||||
|
||||
def guiconfig(env, base_kconfig, config_path, main_menu_text):
|
||||
"""
|
||||
Interface of handling guiconfig.py of Kconfiglib
|
||||
"""
|
||||
kconfig_env = _prep_env(env, base_kconfig, config_path)
|
||||
kconfig_env["ENV"]["MAIN_MENU_TEXT"] = main_menu_text
|
||||
if kconfig_env.Execute('"${GUICONFIG_PY}" "${BASE_KCONFIG}"') != 0:
|
||||
error("Failed to run guiconfig")
|
||||
|
||||
|
||||
def listnewconfig(env, base_kconfig, config_path):
|
||||
"""
|
||||
Interface of handling listnewconfig.py of Kconfiglib
|
||||
|
||||
Reference in New Issue
Block a user