summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/kernel-yocto.bbclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass
index 96ea612258d..cb7614d64ac 100644
--- a/meta/classes/kernel-yocto.bbclass
+++ b/meta/classes/kernel-yocto.bbclass
@@ -18,6 +18,7 @@ SRCREV_FORMAT ?= "meta_machine"
KCONF_AUDIT_LEVEL ?= "1"
KCONF_BSP_AUDIT_LEVEL ?= "0"
KMETA_AUDIT ?= "yes"
+KMETA_AUDIT_WERROR ?= ""
# returns local (absolute) path names for all valid patches in the
# src_uri
@@ -507,6 +508,8 @@ python do_kernel_configcheck() {
config_check_visibility = int(d.getVar("KCONF_AUDIT_LEVEL") or 0)
bsp_check_visibility = int(d.getVar("KCONF_BSP_AUDIT_LEVEL") or 0)
+ kmeta_audit_werror = d.getVar("KMETA_AUDIT_WERROR") or ""
+ warnings_detected = False
# if config check visibility is "1", that's the lowest level of audit. So
# we add the --classify option to the run, since classification will
@@ -533,6 +536,7 @@ python do_kernel_configcheck() {
with open (outfile, "r") as myfile:
results = myfile.read()
bb.warn( "[kernel config]: specified values did not make it into the kernel's final configuration:\n\n%s" % results)
+ warnings_detected = True
# category #2: invalid fragment elements
extra_params = ""
@@ -552,8 +556,9 @@ python do_kernel_configcheck() {
if bsp_check_visibility and os.stat(outfile).st_size > 0:
with open (outfile, "r") as myfile:
- results = myfile.read()
- bb.warn( "[kernel config]: This BSP contains fragments with warnings:\n\n%s" % results)
+ results = myfile.read()
+ bb.warn( "[kernel config]: This BSP contains fragments with warnings:\n\n%s" % results)
+ warnings_detected = True
# category #3: redefined options (this is pretty verbose and is debug only)
try:
@@ -574,6 +579,10 @@ python do_kernel_configcheck() {
with open (outfile, "r") as myfile:
results = myfile.read()
bb.warn( "[kernel config]: This BSP has configuration options defined in more than one config, with differing values:\n\n%s" % results)
+ warnings_detected = True
+
+ if warnings_detected and kmeta_audit_werror:
+ bb.fatal( "configuration warnings detected, werror is set, promoting to fatal" )
}
# Ensure that the branches (BSP and meta) are on the locations specified by