12 def config(txtconfig):
13 "Apply text configuration to kernel folder"
14 infile = tempfile.NamedTemporaryFile()
16 infile.write(bytes(ln + '\n', sys.getdefaultencoding()))
18 os.chdir(sf(conf.linux_sources))
20 utils.callsubprocess('write_config', [sf(conf.write_config), infile.name],
21 conf.kernel_config_output, env=utils.get_kernel_env())
22 except exceptions.ProcessFailed:
23 raise exceptions.ConfigurationError("some configs mismatch")
27 #def config_noprogram():
28 # # Executing old linux config
29 # env = dict(os.environ)
31 # os.chdir(sf(conf.linux_sources))
32 # if conf.kernel_config_output:
33 # sprc = subprocess.call('yes "" | make oldconfig', shell=True,
34 # env=utils.get_kernel_env())
36 # sprc = subprocess.call('yes "" | make oldconfig', shell=True,
37 # stdout=subprocess.DEVNULL, env=utils.get_kernel_env())
42 os.chdir(sf(conf.linux_sources))
43 if conf.kernel_make_output:
44 subprocess.call(conf.build_command, env=utils.get_kernel_env())
46 subprocess.call(conf.build_command, stdout=subprocess.DEVNULL,
47 env=utils.get_kernel_env())
48 jobimage = os.path.join(sf(conf.build_folder), confhash + '_linux.img')
49 shutil.move(sf(conf.linux_image), jobimage)
51 return confhash + '_linux.img'