mirror of
https://git.yoctoproject.org/meta-security
synced 2026-01-12 03:10:13 +00:00
meta-tpm: add layer sanity check
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
@@ -1,6 +1,25 @@
|
||||
meta-tpm layer
|
||||
==============
|
||||
|
||||
The bbappend files for some recipes (e.g. linux-yocto) in this layer need
|
||||
to have 'tpm' in DISTRO_FEATURES to have effect.
|
||||
To enable them, add in configuration file the following line.
|
||||
|
||||
DISTRO_FEATURES_append = " tmp"
|
||||
|
||||
If meta-tpm is included, but tpm is not enabled as a
|
||||
distro feature a warning is printed at parse time:
|
||||
|
||||
You have included the meta-tpm layer, but
|
||||
'tpm' has not been enabled in your DISTRO_FEATURES. Some bbappend files
|
||||
and preferred version setting may not take effect.
|
||||
|
||||
If you know what you are doing, this warning can be disabled by setting the following
|
||||
variable in your configuration:
|
||||
|
||||
SKIP_META_TPM_SANITY_CHECK = 1
|
||||
|
||||
|
||||
This layer contains base TPM recipes.
|
||||
|
||||
Dependencies
|
||||
|
||||
10
meta-tpm/classes/sanity-meta-tpm.bbclass
Normal file
10
meta-tpm/classes/sanity-meta-tpm.bbclass
Normal file
@@ -0,0 +1,10 @@
|
||||
addhandler tpm_machinecheck
|
||||
tpm_machinecheck[eventmask] = "bb.event.SanityCheck"
|
||||
python tpm_machinecheck() {
|
||||
skip_check = e.data.getVar('SKIP_META_TPM_SANITY_CHECK') == "1"
|
||||
if 'tpm' not in e.data.getVar('DISTRO_FEATURES').split() and not skip_check:
|
||||
bb.warn("You have included the meta-tpm layer, but \
|
||||
'tpm or tpm2' has not been enabled in your DISTRO_FEATURES. Some bbappend files \
|
||||
and preferred version setting may not take effect. See the meta-tpm README \
|
||||
for details on enabling tpm support.")
|
||||
}
|
||||
@@ -17,6 +17,10 @@ LAYERDEPENDS_tpm-layer = " \
|
||||
"
|
||||
BBLAYERS_LAYERINDEX_NAME_tpm-layer = "meta-tpm"
|
||||
|
||||
# Sanity check for meta-integrity layer.
|
||||
# Setting SKIP_META_TPM_SANITY_CHECK to "1" would skip the bbappend files check.
|
||||
INHERIT += "sanity-meta-tpm"
|
||||
|
||||
BBFILES_DYNAMIC += " \
|
||||
networking-layer:${LAYERDIR}/dynamic-layers/meta-networking/recipes-*/*/*.bbappend \
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user