Backports for issues using devtool on the kernel
cover Backports for issues using devtool on the kernel
Backport a couple of fixes from master that allow devtool to work properly on the kernel.
The following changes since commit 9e7d207e207bf0319b09d403d87d37f24e3dfbee:
base: check for existing prefix when expanding names in PACKAGECONFIG (2016-03-11 23:14:55 +0000)
are available in the git repository at:
git://git.openembedded.org/openembedded-core-contrib paule/jethro-fixes4-oecore
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=paule/jethro-fixes4-oecore
Markus Lehtonen (2):
devtool: extract: copy kernel config to srctree
devtool: extract: update SRCTREECOVEREDTASKS for kernel
scripts/lib/devtool/standard.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
Signature · 1 line
2.5.0
PATCH 1/2 devtool: extract: copy kernel config to srctree
From: Markus Lehtonen <[email protected]>
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 master rev: 3b516332e038a587685f6e0c14a7f04990bdd6cc)
--- scripts/lib/devtool/standard.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
scripts/lib/devtool/standard.py +6 -5
@@ -430,11 +430,12 @@ def _extract_source(srctree, keep_temp, devbranch, d): if haspatches: bb.process.run('git checkout patches', cwd=srcsubdir) - # Move oe-local-files directory to srctree - if os.path.exists(os.path.join(tempdir, 'oe-local-files')): - logger.info('Adding local source files to srctree...') - shutil.move(os.path.join(tempdir, 'oe-local-files'), 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) shutil.move(srcsubdir, srctree) finally:
Signature · 1 line
2.5.0
PATCH 2/2 devtool: extract: update SRCTREECOVEREDTASKS for kernel
In reply to Paul EggletonFrom: Markus Lehtonen <[email protected]>
Add 'do_kernel_configme' and 'do_kernel_configcheck' to SRCTREECOVEREDTASKS of kernel packages. These tasks should not be run because kernel meta in the srctree is not necessarily up-to-date or even present which causes build failures and/or invalid kernel config. Especially so because 'do_patch' which is a dependency of 'do_kernel_configme' is not being run.
We now store .config in the srctree and 'do_configure' task is able to run successfully.
(From OE-Core master rev: 7ce4c18a4ba1ebcb9f46e652a881ace1f21d2292)
--- scripts/lib/devtool/standard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/lib/devtool/standard.py +2 -1
@@ -594,7 +594,8 @@ def modify(args, config, basepath, workspace): f.write('EXTERNALSRC_BUILD_pn-%s = "%s"\n' % (pn, srctree)) if bb.data.inherits_class('kernel', rd): - f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout do_fetch do_unpack do_patch"\n') + f.write('SRCTREECOVEREDTASKS = "do_validate_branches do_kernel_checkout ' + 'do_fetch do_unpack do_patch do_kernel_configme do_kernel_configcheck"\n') if initial_rev: f.write('\n# initial_rev: %s\n' % initial_rev) for commit in commits:
Signature · 1 line
2.5.0
Re: [jethro][PATCH 1/2] devtool: extract: copy kernel config to srctree
In reply to Paul EggletonHi,
Quoted 21 lines · Paul Eggleton
From: Markus Lehtonen <[email protected]>
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 master rev:
3b516332e038a587685f6e0c14a7f04990bdd6cc)Signed-off-by Markus Lehtonen <[email protected]>Signed-off-by Ross Burton <[email protected]>Signed-off-by Paul Eggleton <[email protected]>Signed-off-by Richard Purdie <[email protected]>---
scripts/lib/devtool/standard.py| 11 ++++++-----1 file changed, 6 insertions(+), 5 deletions(-)scripts/lib/devtool/standard.py +0
-0
scripts/lib/devtool/standard.py def _extract_source(srctree, keep_temp, devbranch, d): · line 437
Quoted 8 lines
scripts/lib/devtool/standard.py +0
-5@@ -430,11 +430,12 @@ def _extract_source(srctree, keep_temp, devbranch, d): if haspatches: bb.process.run('git checkout patches', cwd=srcsubdir) - # Move oe-local-files directory to srctree - if os.path.exists(os.path.join(tempdir, 'oe-local-files')): - logger.info('Adding local source files to srctree...') - shutil.move(os.path.join(tempdir, 'oe-local-files'), srcsubdir) -
Why are you "disabling" oe-local-files here? That's unrelated to the kernel config. A mistake in patch conflict resolving, perhaps(?)
Thanks,
Markus
Quoted 9 lines
scripts/lib/devtool/standard.py +6
-0+ 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) shutil.move(srcsubdir, srctree) finally:
Re: [jethro][PATCH 1/2] devtool: extract: copy kernel config to srctree
Quoted 3 lines · On Fri, 18 Mar 2016 10:23:22 Markus Lehtonen wrote:
Hi,
On 14/03/16 22:43, "Paul Eggleton" <openembedded-core-
[email protected] on behalf of [email protected]>
Quoted 17 lines · wrote:
Quoted 17 lines
From: Markus Lehtonen <[email protected]>
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 master rev:
3b516332e038a587685f6e0c14a7f04990bdd6cc)Signed-off-by Markus Lehtonen <[email protected]>Signed-off-by Ross Burton <[email protected]>Signed-off-by Paul Eggleton <[email protected]>Signed-off-by Richard Purdie <[email protected]>---
scripts/lib/devtool/standard.py| 11 ++++++-----1 file changed, 6 insertions(+), 5 deletions(-)
Quoted 6 lines
scripts/lib/devtool/standard.py def _extract_source(srctree, keep_temp, devbranch,
Quoted 6 lines
(quoted diff) +0
-0
b/scripts/lib/devtool/standard.pyindex 5464d7b..c1fbfe3 100644scripts/lib/devtool/standard.py +0
-0@@ -430,11 +430,12 @@ def _extract_source(srctree, keep_temp, devbranch,
d):
Quoted 11 lines
Quoted 8 lines
scripts/lib/devtool/standard.py +0
-4if haspatches: bb.process.run('git checkout patches', cwd=srcsubdir) - # Move oe-local-files directory to srctree - if os.path.exists(os.path.join(tempdir, 'oe-local-files')): - logger.info('Adding local source files to srctree...') - shutil.move(os.path.join(tempdir, 'oe-local-files'),srcsubdir) -
Why are you "disabling" oe-local-files here? That's unrelated to the kernel config. A mistake in patch conflict resolving, perhaps(?)
Oops! Yes indeed. I've fixed this on the branch so that doesn't get removed.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre