path: root/tools
diff options
authorMasahiro Yamada <>2016-05-19 15:52:04 +0900
committerMasahiro Yamada <>2016-06-13 07:46:28 +0900
commit7fb0bacd389b9b041164965d31a8c50e8616f7a0 (patch)
tree4365f26014628ec3707adda590f18d6e80bef91c /tools
parent4efef998cda69edb162ea61e4a14f564133457d1 (diff)
tools: moveconfig: skip savedefconfig if .config was not updated
If no CONFIG option is moved to the .config, no need to sync the defconfig file. This accelerates the processing by skipping needless "make savedefconfig". Signed-off-by: Masahiro Yamada <> Reviewed-by: Joe Hershberger <>
Diffstat (limited to 'tools')
1 files changed, 16 insertions, 5 deletions
diff --git a/tools/ b/tools/
index 84ad16d876..e32104412e 100755
--- a/tools/
+++ b/tools/
@@ -496,10 +496,13 @@ class KconfigParser:
defconfig: defconfig name.
- Return log string
+ Return a tuple of (updated flag, log string).
+ The "updated flag" is True if the .config was updated, False
+ otherwise. The "log string" shows what happend to the .config.
results = []
+ updated = False
with open(self.dotconfig) as f:
dotconfig_lines = f.readlines()
@@ -534,11 +537,12 @@ class KconfigParser:
for (action, value) in results:
if action == ACTION_MOVE:
f.write(value + '\n')
+ updated = True
- return log
+ return (updated, log)
class Slot:
@@ -614,8 +618,11 @@ class Slot:
If the configuration is successfully finished, assign a new
subprocess to build include/
If include/ is generated, invoke the parser to
- parse the .config and the include/, and then set the
- slot back to the idle state.
+ parse the .config and the include/, moving
+ config options to the .config as needed.
+ If the .config was updated, run "make savedefconfig" to sync
+ it, update the original defconfig, and then set the slot back
+ to the idle state.
Return True if the subprocess is terminated, False otherwise
@@ -636,8 +643,12 @@ class Slot:
return True
if self.state == STATE_AUTOCONF:
- self.log += self.parser.update_dotconfig()
+ (updated, log) = self.parser.update_dotconfig()
+ self.log += log
+ if not updated:
+ self.finish(True)
+ return True
"""Save off the defconfig in a consistent way"""
cmd = list(self.make_cmd)
OpenPOWER on IntegriCloud