devtool: extract: copy kernel config to srctree

This makes the correct kernel config to be used when building kernel
from srctree (extrernalsrc). If no kernel config is present in the
builddir 'do_configure' task copies .config from the srctree.

(From OE-Core rev: 3b516332e038a587685f6e0c14a7f04990bdd6cc)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Markus Lehtonen 2015-12-03 15:54:24 +02:00 committed by Richard Purdie
parent 6650357f13
commit 34f1d819f4
1 changed files with 8 additions and 0 deletions

View File

@ -457,6 +457,14 @@ def _extract_source(srctree, keep_temp, devbranch, sync, d):
if haspatches:
bb.process.run('git checkout patches', cwd=srcsubdir)
if bb.data.inherits_class('kernel-yocto', d):
# Store generate and store kernel config
logger.info('Generating kernel config')
task_executor.exec_func('do_configure', False)
kconfig = os.path.join(d.getVar('B', True), '.config')
shutil.copy2(kconfig, srcsubdir)
tempdir_localdir = os.path.join(tempdir, 'oe-local-files')
srctree_localdir = os.path.join(srctree, 'oe-local-files')