2 from exceptions import MissingFile
5 "Relative patch of file is decoded to absolute acording to working tree."
6 return os.path.dirname(os.path.realpath(__file__)) + '/' + rfile
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):
13 raise MissingFile(f, message)
16 SRCARCH = 'x86' # Kernel architecture
18 linux_make_args = ['-j8']
21 dot_confmk = pf('.conf.mk')
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'
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'
39 buildroot_initram = pf('scripts/buildroot/output/images/rootfs.cpio.gz')
40 initram = build_folder + '/initram.gz'
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.')
46 # Programs output show/hide
47 parse_kconfig_output = False
48 minisat_output = False
49 kernel_config_output = True
50 kernel_make_output = True