diff options
Diffstat (limited to 'meta/classes/kernel-yocto.bbclass')
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index 96ea612258..cb7614d64a 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass | |||
@@ -18,6 +18,7 @@ SRCREV_FORMAT ?= "meta_machine" | |||
18 | KCONF_AUDIT_LEVEL ?= "1" | 18 | KCONF_AUDIT_LEVEL ?= "1" |
19 | KCONF_BSP_AUDIT_LEVEL ?= "0" | 19 | KCONF_BSP_AUDIT_LEVEL ?= "0" |
20 | KMETA_AUDIT ?= "yes" | 20 | KMETA_AUDIT ?= "yes" |
21 | KMETA_AUDIT_WERROR ?= "" | ||
21 | 22 | ||
22 | # returns local (absolute) path names for all valid patches in the | 23 | # returns local (absolute) path names for all valid patches in the |
23 | # src_uri | 24 | # src_uri |
@@ -507,6 +508,8 @@ python do_kernel_configcheck() { | |||
507 | 508 | ||
508 | config_check_visibility = int(d.getVar("KCONF_AUDIT_LEVEL") or 0) | 509 | config_check_visibility = int(d.getVar("KCONF_AUDIT_LEVEL") or 0) |
509 | bsp_check_visibility = int(d.getVar("KCONF_BSP_AUDIT_LEVEL") or 0) | 510 | bsp_check_visibility = int(d.getVar("KCONF_BSP_AUDIT_LEVEL") or 0) |
511 | kmeta_audit_werror = d.getVar("KMETA_AUDIT_WERROR") or "" | ||
512 | warnings_detected = False | ||
510 | 513 | ||
511 | # if config check visibility is "1", that's the lowest level of audit. So | 514 | # if config check visibility is "1", that's the lowest level of audit. So |
512 | # we add the --classify option to the run, since classification will | 515 | # we add the --classify option to the run, since classification will |
@@ -533,6 +536,7 @@ python do_kernel_configcheck() { | |||
533 | with open (outfile, "r") as myfile: | 536 | with open (outfile, "r") as myfile: |
534 | results = myfile.read() | 537 | results = myfile.read() |
535 | bb.warn( "[kernel config]: specified values did not make it into the kernel's final configuration:\n\n%s" % results) | 538 | bb.warn( "[kernel config]: specified values did not make it into the kernel's final configuration:\n\n%s" % results) |
539 | warnings_detected = True | ||
536 | 540 | ||
537 | # category #2: invalid fragment elements | 541 | # category #2: invalid fragment elements |
538 | extra_params = "" | 542 | extra_params = "" |
@@ -552,8 +556,9 @@ python do_kernel_configcheck() { | |||
552 | 556 | ||
553 | if bsp_check_visibility and os.stat(outfile).st_size > 0: | 557 | if bsp_check_visibility and os.stat(outfile).st_size > 0: |
554 | with open (outfile, "r") as myfile: | 558 | with open (outfile, "r") as myfile: |
555 | results = myfile.read() | 559 | results = myfile.read() |
556 | bb.warn( "[kernel config]: This BSP contains fragments with warnings:\n\n%s" % results) | 560 | bb.warn( "[kernel config]: This BSP contains fragments with warnings:\n\n%s" % results) |
561 | warnings_detected = True | ||
557 | 562 | ||
558 | # category #3: redefined options (this is pretty verbose and is debug only) | 563 | # category #3: redefined options (this is pretty verbose and is debug only) |
559 | try: | 564 | try: |
@@ -574,6 +579,10 @@ python do_kernel_configcheck() { | |||
574 | with open (outfile, "r") as myfile: | 579 | with open (outfile, "r") as myfile: |
575 | results = myfile.read() | 580 | results = myfile.read() |
576 | bb.warn( "[kernel config]: This BSP has configuration options defined in more than one config, with differing values:\n\n%s" % results) | 581 | bb.warn( "[kernel config]: This BSP has configuration options defined in more than one config, with differing values:\n\n%s" % results) |
582 | warnings_detected = True | ||
583 | |||
584 | if warnings_detected and kmeta_audit_werror: | ||
585 | bb.fatal( "configuration warnings detected, werror is set, promoting to fatal" ) | ||
577 | } | 586 | } |
578 | 587 | ||
579 | # Ensure that the branches (BSP and meta) are on the locations specified by | 588 | # Ensure that the branches (BSP and meta) are on the locations specified by |