aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-02-11 18:03:20 +0100
committerKarel Kočí <cynerd@email.cz>2015-02-11 18:03:20 +0100
commit2cfa034037c20e91e2b167c1b490f8d045c68178 (patch)
treea71d9d0a09fb0834fc3f63ce0dd2deca63ba153c /scripts
parenta41cc012991ca1879e8f60511327ed8d01db14c3 (diff)
downloadlinux-conf-perf-2cfa034037c20e91e2b167c1b490f8d045c68178.tar.gz
linux-conf-perf-2cfa034037c20e91e2b167c1b490f8d045c68178.tar.bz2
linux-conf-perf-2cfa034037c20e91e2b167c1b490f8d045c68178.zip
Kernel config repair and configurable make arguments
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kernel.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/scripts/kernel.py b/scripts/kernel.py
index f50a616..51c5b21 100644
--- a/scripts/kernel.py
+++ b/scripts/kernel.py
@@ -11,17 +11,22 @@ def config():
env = dict(os.environ)
wd = os.getcwd()
os.chdir(conf.linux_sources)
- sprc = subprocess.Popen(['make', 'oldconfig'], env=utils.get_kernel_env())
- for line in sprc.stdout:
- if line == "* Restart config...":
- print("Configuration failed")
- sprc.kill()
+ sprc = subprocess.Popen(['make', 'oldconfig'], stdout=subprocess.PIPE, env=utils.get_kernel_env())
+ while True:
+ line = sprc.stdout.readline()
+ if line != '':
+ if b'Restart config' in line:
+ print("Kernel config failed")
+ sprc.terminate()
+ break
+ else:
+ print(line.decode('utf-8'), end="")
else:
- print(line)
+ break
os.chdir(wd)
def make():
wd = os.getcwd()
os.chdir(conf.linux_sources)
- subprocess.call(['make', '-j8'], env=utils.get_kernel_env())
+ subprocess.call(['make'] + conf.linux_make_args, env=utils.get_kernel_env())
os.chdir(wd)