From 0a29552ec44690db86e684713559e3a262616534 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Wed, 13 May 2015 18:46:36 +0200 Subject: [PATCH] Add kernel_env setting --- conf.py | 5 ++++- scripts/kernel.py | 7 +++---- scripts/utils.py | 4 +--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/conf.py b/conf.py index 284e4ab..b5a7524 100644 --- a/conf.py +++ b/conf.py @@ -9,10 +9,13 @@ ARCH = 'x86' # This defines environment variable for linux kernel. # You most probably don't want to changing this. SRCARCH = ARCH +gen_all_solution_oninit = True # If True, all solutions are generated at initialization. + # linux_make_args # These are arguments passed to make when linux is build linux_make_args = ['-j8'] -gen_all_solution_oninit = True # If True, all solutions are generated at initialization. +build_command = ['make'] + linux_make_args +kernel_env = {'SRCARCH': SRCARCH, 'ARCH': ARCH, 'KERNELVERSION': ARCH} # novaboot_args # These are arguments passed to novaboot, diff --git a/scripts/kernel.py b/scripts/kernel.py index 994d5cf..4494f22 100644 --- a/scripts/kernel.py +++ b/scripts/kernel.py @@ -39,9 +39,8 @@ def make(): wd = os.getcwd() os.chdir(sf(conf.linux_sources)) if conf.kernel_make_output: - subprocess.call(['make'] + conf.linux_make_args, - env=utils.get_kernel_env()) + subprocess.call(build_command, env=utils.get_kernel_env()) else: - subprocess.call(['make'] + conf.linux_make_args, - stdout=subprocess.DEVNULL, env=utils.get_kernel_env()) + subprocess.call(build_command, stdout=subprocess.DEVNULL, + env=utils.get_kernel_env()) os.chdir(wd) diff --git a/scripts/utils.py b/scripts/utils.py index 0c10553..0b6ac9c 100644 --- a/scripts/utils.py +++ b/scripts/utils.py @@ -83,9 +83,7 @@ def callsubprocess(process_name, process, show_output = True, regular = "", def get_kernel_env(): env = dict(os.environ) - env['SRCARCH'] = conf.SRCARCH - env['ARCH'] = conf.ARCH - env['KERNELVERSION'] = 'KERNELVERSION' # hides error + env.update(conf.kernel_env) return env -- 2.39.2