]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blobdiff - conf.py
Add scripts buildcnf
[linux-conf-perf.git] / conf.py
diff --git a/conf.py b/conf.py
index c2f1902b52cf42b5689384254497d9d28021b6ec..eb8e7accf0980ea85ba049584b35cec4e2fc483f 100644 (file)
--- a/conf.py
+++ b/conf.py
@@ -1,4 +1,5 @@
 import os
+import sys
 import re
 import importlib.machinery
 
@@ -11,23 +12,16 @@ kernel_arch = 'x86'
 # kernle_env
 # Enviroment variables for Linux
 kernel_env = {'SRCARCH': kernel_arch, 'ARCH': kernel_arch, 'KERNELVERSION': kernel_arch}
-# linux_make_args
-# These are arguments passed to make when linux is build.
-linux_make_args = ['-j8']
 # build_command
 # Command executed for kernel build in linux folder.
-build_command = ['make'] + linux_make_args
-
-# novaboot_args
-# These are arguments passed to Novaboot,
-# but only if you don't remove it from boot_command.
-novaboot_args = ['--qemu=qemu-system-x86_64']
-# nbscript
-# This variable is path to Novaboot script.
-nbscript = 'scripts/nbscript'
+build_command = ['make']
+
 # boot_command
 # Command executed for booting. Output of this command is saved to output folder.
 boot_command = ['echo', 'bootit']
+# boot_timeout
+# Set timeout of boot process if no output is generated for selected seconds
+boot_timeout = 120
 
 # parse_command
 # Command to parse double value from boot output
@@ -97,11 +91,6 @@ linux_kconfig_head = linux_sources + 'Kconfig'
 linux_dot_config = linux_sources + '.config'
 linux_image = linux_sources + 'arch/' + kernel_arch + '/boot/bzImage'
 
-buildroot_def_config = 'buildroot_recipe/buildroot.def.config'
-buildroot_inittab_directive = 'buildroot_recipe/inittab_directive'
-buildroot_initscript = 'scripts/buildroot_recipe/linux-conf-perf'
-buildroot_initram = 'buildroot/output/images/rootfs.cpio.gz'
-
 build_folder = 'jobfiles/'
 jobfolder_linux_image = build_folder + 'linuxImage'
 symbol_map_file = build_folder + 'symbol_map' # Also defined in parse_kconfig
@@ -113,10 +102,6 @@ dot_measure_file = build_folder + 'dot_measure'
 dot_config_back_file = build_folder + 'dot_config_back'
 single_generated_file = build_folder + 'single_generated'
 
-configurations_folder = 'configurations/'
-hashconfigsort = configurations_folder + 'hashconfigsort'
-
-output_folder = 'output/'
 result_folder = 'result/'
 log_folder = 'log/'
 
@@ -126,22 +111,24 @@ write_config = 'scripts/write_config/write_config'
 picosat = 'scripts/picosat-959/picosat'
 allconfig = 'scripts/allconfig/allconfig'
 
+#######################################
+absroot = os.path.dirname(os.path.realpath(__file__))
+
 #######################################
 # Overlap configuration for specified target
-if os.path.isfile('.target'):
+if os.path.isfile(os.path.join(absroot, '.target')):
        target = None
-       with open('.target', 'r') as f:
+       with open(os.path.join(absroot, '.target'), 'r') as f:
                target = f.readline().rstrip()
-       conffile = os.path.join('targets', target, 'conf.py')
+       conffile = os.path.join(absroot, 'targets', target, 'conf.py')
        if os.path.isfile(conffile):
                ovconf = importlib.machinery.SourceFileLoader("module.name", conffile).load_module()
                for name in dir(ovconf):
                        if not re.match('__*__', name):
                                vars()[name] = vars(ovconf)[name]
        else:
-               print("W: No target specifier. Write target to .target file.")
+               print("E: Invalid target specifier. Write valid target to .target file.")
+               sys.exit(-99)
 else:
-       print("W: No target specifier. Write target to .target file.")
-
-#######################################
-absroot = os.path.dirname(os.path.realpath(__file__))
+       print("E: No target specifier. Write target to .target file.")
+       sys.exit(-99)