summaryrefslogtreecommitdiffstats
path: root/meta-tpm/classes
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2021-06-02 01:57:37 +0000
committerArmin Kuster <akuster808@gmail.com>2021-06-06 13:03:37 -0700
commit2bfc09017d3c6dfc611a46e42a09771c23004a93 (patch)
treed969a6cab5f70add8c5f54a11c568c3f179d3e99 /meta-tpm/classes
parentb226ebdc4af3be30018f9e73ae1c7e3f365323d9 (diff)
downloadmeta-security-2bfc09017d3c6dfc611a46e42a09771c23004a93.tar.gz
meta-tpm: add layer sanity check
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-tpm/classes')
-rw-r--r--meta-tpm/classes/sanity-meta-tpm.bbclass10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta-tpm/classes/sanity-meta-tpm.bbclass b/meta-tpm/classes/sanity-meta-tpm.bbclass
new file mode 100644
index 0000000..2f8b52d
--- /dev/null
+++ b/meta-tpm/classes/sanity-meta-tpm.bbclass
@@ -0,0 +1,10 @@
1addhandler tpm_machinecheck
2tpm_machinecheck[eventmask] = "bb.event.SanityCheck"
3python tpm_machinecheck() {
4 skip_check = e.data.getVar('SKIP_META_TPM_SANITY_CHECK') == "1"
5 if 'tpm' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
6 bb.warn("You have included the meta-tpm layer, but \
7'tpm or tpm2' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
8and preferred version setting may not take effect. See the meta-tpm README \
9for details on enabling tpm support.")
10}