kconfiglib: Update to the 12.14.0 release
A large number of changes have happened upstream since our last sync
which was to 375506d. The reason to do the upgrade at this point is for
improved Python 3 support.
As part of this upgrade we need to update moveconfig.py and
genboardscfg.py the current API. This is:
- Change "kconfiglib.Config" calls to "kconfiglib.Kconfig"
- Change get_symbol() calls to syms.get().
- Change get_value() to str_value.
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index 0bbc7c1..b99417e 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -851,7 +851,7 @@
os.environ['srctree'] = os.getcwd()
os.environ['UBOOTVERSION'] = 'dummy'
os.environ['KCONFIG_OBJDIR'] = ''
- self.conf = kconfiglib.Config()
+ self.conf = kconfiglib.Kconfig()
class KconfigParser:
@@ -1525,7 +1525,7 @@
"""Check whether a config has a 'select' or 'imply' keyword
Args:
- kconf: Kconfig.Config object
+ kconf: Kconfiglib.Kconfig object
config: Name of config to check (without CONFIG_ prefix)
imply_config: Implying config (without CONFIG_ prefix) which may or
may not have an 'imply' for 'config')
@@ -1533,7 +1533,7 @@
Returns:
Symbol object for 'config' if found, else None
"""
- sym = kconf.get_symbol(imply_config)
+ sym = kconf.syms.get(imply_config)
if sym:
for sel in sym.get_selected_symbols() | sym.get_implied_symbols():
if sel.get_name() == config:
@@ -1547,7 +1547,7 @@
to add an 'imply' for 'config' to that part of the Kconfig.
Args:
- kconf: Kconfig.Config object
+ kconf: Kconfiglib.Kconfig object
config: Name of config to check (without CONFIG_ prefix)
imply_config: Implying config (without CONFIG_ prefix) which may or
may not have an 'imply' for 'config')
@@ -1558,7 +1558,7 @@
line number within the Kconfig file, or 0 if none
message indicating the result
"""
- sym = kconf.get_symbol(imply_config)
+ sym = kconf.syms.get(imply_config)
if not sym:
return 'cannot find sym'
locs = sym.get_def_locations()
@@ -1784,7 +1784,7 @@
if skip_added:
show = False
else:
- sym = kconf.get_symbol(iconfig[CONFIG_LEN:])
+ sym = kconf.syms.get(iconfig[CONFIG_LEN:])
fname = ''
if sym:
locs = sym.get_def_locations()