]> rtime.felk.cvut.cz Git - linux-conf-perf.git/blob - conf.py
Add initram config
[linux-conf-perf.git] / conf.py
1 import os
2 from exceptions import MissingFile
3
4 def pf(rfile):
5         "Relative patch of file is decoded to absolute acording to working tree."
6         return os.path.dirname(os.path.realpath(__file__)) + '/' + rfile
7
8 def checkXf(f, message):
9         "Check if file is executable. If not, raise MissingFile exception."
10         if os.path.isfile(f) and os.access(f, os.X_OK):
11                 return f
12         else:
13                 raise MissingFile(f, message)
14
15 # Global configs
16 SRCARCH = 'x86' # Kernel architecture
17 ARCH = SRCARCH
18 linux_make_args = ['-j8']
19
20 # Path settings
21 dot_confmk = pf('.conf.mk')
22
23 linux_sources = pf('linux')
24 linux_kconfig_head = 'Kconfig'
25 linux_dot_config = linux_sources + '/.config'
26 linux_image = linux_sources + '/arch/' + ARCH + '/boot/bzImage'
27
28 build_folder = pf('build/')
29 phase_file = build_folder + '/phase'
30 symbol_map_file = build_folder + '/symbol_map' # Also defined in kconfig_parser
31 rules_file = build_folder + '/rules' # Also defined in kconfig_parser
32 solved_file = build_folder + '/solved'
33 required_file = build_folder + '/required'
34 dot_config_fragment_file = build_folder + '/dot_config_fragment'
35 dot_config_back_file = build_folder + '/dot_config_back'
36 solution_file = build_folder + '/solution'
37 iteration_file = build_folder + '/iteration'
38
39 buildroot_initram = pf('scripts/buildroot/output/images/rootfs.cpio.gz')
40 initram = build_folder + '/initram.gz'
41
42 # Programs paths
43 parse_kconfig = checkXf(pf('scripts/parse_kconfig/parse'), 'You must build programs first.')
44 write_config = checkXf(pf('scripts/write_config/write'), 'You must build programs first.')
45
46 # Programs output show/hide
47 parse_kconfig_output = False
48 minisat_output = False
49 kernel_config_output = True
50 kernel_make_output = True