From ef85245f159402fd948ff045b56ad9095d22b39e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 3 Feb 2015 20:57:20 +0100 Subject: Implementing main loop These new scripts are part of main loop. kernel is not finished!! Divides kconfig_parser, sat_solution to better named modules. Phasing and iteration is implemented for loop watching. --- scripts/kernel.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 scripts/kernel.py (limited to 'scripts/kernel.py') diff --git a/scripts/kernel.py b/scripts/kernel.py new file mode 100644 index 0000000..f50a616 --- /dev/null +++ b/scripts/kernel.py @@ -0,0 +1,27 @@ +import os +import sys +import subprocess + +import utils +from conf import conf + + +def config(): + # Executing old linux 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() + else: + print(line) + os.chdir(wd) + +def make(): + wd = os.getcwd() + os.chdir(conf.linux_sources) + subprocess.call(['make', '-j8'], env=utils.get_kernel_env()) + os.chdir(wd) -- cgit v1.2.3