summaryrefslogtreecommitdiffstats
path: root/meta/classes/kernel-yocto.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r--meta/classes/kernel-yocto.bbclass24
1 files changed, 17 insertions, 7 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 077a1ab8ef..19d74a7875 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -321,7 +321,7 @@ do_kernel_configme() {
321addtask kernel_configme before do_configure after do_patch 321addtask kernel_configme before do_configure after do_patch
322 322
323python do_kernel_configcheck() { 323python do_kernel_configcheck() {
324 import re, string, sys 324 import re, string, sys, subprocess
325 325
326 # if KMETA isn't set globally by a recipe using this routine, we need to 326 # if KMETA isn't set globally by a recipe using this routine, we need to
327 # set the default to 'meta'. Otherwise, kconf_check is not passed a valid 327 # set the default to 'meta'. Otherwise, kconf_check is not passed a valid
@@ -330,16 +330,26 @@ python do_kernel_configcheck() {
330 if not os.path.exists(kmeta): 330 if not os.path.exists(kmeta):
331 kmeta = "." + kmeta 331 kmeta = "." + kmeta
332 332
333 pathprefix = "export PATH=%s:%s; " % (d.getVar('PATH'), "${S}/scripts/util/") 333 s = d.getVar('S')
334 334
335 cmd = d.expand("scc --configs -o ${S}/.kernel-meta") 335 env = os.environ.copy()
336 ret, configs = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd)) 336 env['PATH'] = "%s:%s%s" % (d.getVar('PATH'), s, "/scripts/util/")
337 337
338 cmd = d.expand("cd ${S}; kconf_check --report -o ${S}/%s/cfg/ ${B}/.config ${S} %s" % (kmeta,configs)) 338 try:
339 ret, result = oe.utils.getstatusoutput("%s%s" % (pathprefix, cmd)) 339 configs = subprocess.check_output(['scc', '--configs', '-o', s + '/.kernel-meta'], env=env).decode('utf-8')
340 except subprocess.CalledProcessError:
341 bb.fatal( "Cannot gather config fragments for audit: %s" % configs)
342
343 try:
344 subprocess.check_call(['kconf_check', '--report', '-o',
345 '%s/%s/cfg' % (s, kmeta), d.getVar('B') + '/.config', s, configs], cwd=s, env=env)
346 except subprocess.CalledProcessError:
347 # The configuration gathering can return different exit codes, but
348 # we interpret them based on the KCONF_AUDIT_LEVEL variable, so we catch
349 # everything here, and let the run continue.
350 pass
340 351
341 config_check_visibility = int(d.getVar("KCONF_AUDIT_LEVEL") or 0) 352 config_check_visibility = int(d.getVar("KCONF_AUDIT_LEVEL") or 0)
342 bsp_check_visibility = int(d.getVar("KCONF_BSP_AUDIT_LEVEL") or 0)
343 353
344 # if config check visibility is non-zero, report dropped configuration values 354 # if config check visibility is non-zero, report dropped configuration values
345 mismatch_file = d.expand("${S}/%s/cfg/mismatch.txt" % kmeta) 355 mismatch_file = d.expand("${S}/%s/cfg/mismatch.txt" % kmeta)