Skip to content
Browse files Use messages returned by load_config() and write_config()

load_config() and write_config() now return a message to print. This
message also says whether the configuration was loaded (replace=True) or
merged (replace=False), and whether the new .config is different from
the old (for write_config()).

Print the returned messages and remove some old print()s.

Also switch to an improved warning control API (the old one is still
supported, but might as well).

Signed-off-by: Ulf Magnusson <>
  • Loading branch information...
ulfalizer authored and carlescufi committed Jun 3, 2019
1 parent e36e544 commit f46ebc3c97a031c41641336dc9a6183a5c6f6889
Showing with 9 additions and 10 deletions.
  1. +9 −10 scripts/kconfig/
@@ -31,18 +31,18 @@ def main():
print("Parsing Kconfig tree in " + args.kconfig_root)
kconf = Kconfig(args.kconfig_root, warn_to_stderr=False)

# Warn for assignments to undefined symbols
kconf.warn_assign_undef = True

# prj.conf may override settings from the board configuration, so disable
# warnings about symbols being assigned more than once
# Warn for assignments to undefined symbols
kconf.warn_assign_override = False
kconf.warn_assign_redun = False

for i, config in enumerate(args.conf_fragments):
print(("Loading {} as base" if i == 0 else "Merging {}")
for config in args.conf_fragments[1:]:
# replace=False creates a merged configuration
kconf.load_config(config, replace=False)
print(kconf.load_config(config, replace=False))

# Print warnings for symbols whose actual value doesn't match the assigned
# value
@@ -89,8 +89,7 @@ def main():
100) + "\n")

# Write the merged configuration and the C header
print("Configuration written to '{}'".format(args.dotconfig))

# Write the list of processed Kconfig sources to a file

0 comments on commit f46ebc3

Please sign in to comment.
You can’t perform that action at this time.