aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf.py2
-rw-r--r--scripts/exceptions.py6
-rw-r--r--scripts/initialize.py2
-rw-r--r--scripts/kernel.py20
4 files changed, 8 insertions, 22 deletions
diff --git a/conf.py b/conf.py
index 3c69ee0..0de8bca 100644
--- a/conf.py
+++ b/conf.py
@@ -37,4 +37,4 @@ kconfig_parser = checkXf(pf('programs/kconfig_parser'), 'You must build programs
# Programs output hide
kconfig_parser_output = False
minisat_output = False
-kernel_config_output = True
+kernel_config_output = False
diff --git a/scripts/exceptions.py b/scripts/exceptions.py
index 68fef59..722c44a 100644
--- a/scripts/exceptions.py
+++ b/scripts/exceptions.py
@@ -19,9 +19,3 @@ class PhaseMismatch(Exception):
pass
def __str__(self):
return "Phase in " + conf.phase_file + " is unknown."
-
-class KernelConfigFailed(Exception):
- def __init__(self):
- pass
- def __str__(self):
- return "Kernel configuration failed."
diff --git a/scripts/initialize.py b/scripts/initialize.py
index 951834a..66236e5 100644
--- a/scripts/initialize.py
+++ b/scripts/initialize.py
@@ -24,7 +24,7 @@ def kconfig_parser():
def gen_requred():
"Generates required depenpency from required file."
- utils.build_symbol_map()
+ utils.build_symbol_map() # Ensure smap existence
srmap = {value:key for key, value in utils.smap.items()}
try:
diff --git a/scripts/kernel.py b/scripts/kernel.py
index 76255d0..58e3287 100644
--- a/scripts/kernel.py
+++ b/scripts/kernel.py
@@ -4,26 +4,18 @@ import subprocess
from conf import conf
import utils
-from exceptions import KernelConfigFailed
def config():
# Executing old linux config
env = dict(os.environ)
wd = os.getcwd()
os.chdir(conf.linux_sources)
- 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:
- sprc.terminate()
- raise KernelConfigFailed()
- break
- else:
- if conf.kernel_config_output:
- print(line.decode('utf-8'), end="")
- else:
- break
+ if conf.kernel_config_output:
+ sprc = subprocess.call('yes "" | make oldconfig', shell=True,
+ env=utils.get_kernel_env())
+ else:
+ sprc = subprocess.call('yes "" | make oldconfig', shell=True,
+ stdout=subprocess.DEVNULL, env=utils.get_kernel_env())
os.chdir(wd)
def make():