Skip to contentSkip to conversation

devtool: kernel config fixes

PATCH New Markus Lehtonen 1 participant 3 messages Dec 3, 2015

lore
Share & tools
lore
#0 lore raw

cover devtool: kernel config fixes

Two patches changing the kernel config handling (of kernel packages). Now the srctree is expected to have .config which will be used as the initial kernel config when building.

The following changes since commit 687e5ef86361a16d6c411386939d4ba96a5909ea:

libsdl: remove redundant configure_tweak patch (2015-12-01 21:31:04 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib marquiz/devtool/kernel

for you to fetch changes up to 0ccea2b62e4d28f3989a72f773e0cbf023739721:

devtool: extract: update SRCTREECOVEREDTASKS for kernel (2015-12-03 15:35:42 +0200)

Markus Lehtonen (2):
devtool: extract: copy kernel config to srctree
devtool: extract: update SRCTREECOVEREDTASKS for kernel

 scripts/lib/devtool/standard.py | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/2 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.

---
 scripts/lib/devtool/standard.py | 8 ++++++++
 1 file changed, 8 insertions(+)
scripts/lib/devtool/standard.py +8 -0
index 68d6eb9..a4f3da4 100644
@@ -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')
 
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/2 devtool: extract: update SRCTREECOVEREDTASKS for kernel

In reply to Markus Lehtonen

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.

---
 scripts/lib/devtool/standard.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
scripts/lib/devtool/standard.py +2 -1
index a4f3da4..a5e81f3 100644
@@ -650,7 +650,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.1.4