summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArmin Kuster <akuster808@gmail.com>2017-05-07 22:51:01 -0700
committerArmin Kuster <akuster808@gmail.com>2017-05-08 08:39:35 -0700
commitfcbd8a33d4257dd56080e50dd02e6da3f6c5a441 (patch)
treeb8d22c2c2dab1e736ae6e9ea31b2652b67421e03
parent64928b7943d9207cabffe77598e111da34782459 (diff)
downloadmeta-security-fcbd8a33d4257dd56080e50dd02e6da3f6c5a441.tar.gz
kernel tpm rework
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto/tpm.cfg5
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto/tpm.scc3
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto/tpm_i2c.cfg15
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto/tpm_i2c.scc6
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto/tpm_x86.cfg4
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto/vtpm.cfg5
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto/vtpm.scc4
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto_4.%.bbappend11
-rw-r--r--meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend5
9 files changed, 53 insertions, 5 deletions
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto/tpm.cfg b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm.cfg
new file mode 100644
index 0000000..e34b24e
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm.cfg
@@ -0,0 +1,5 @@
1CONFIG_HW_RANDOM_TPM=y
2CONFIG_TCG_TPM=y
3CONFIG_TCG_TIS_CORE=y
4CONFIG_TCG_TIS=y
5CONFIG_SECURITYFS=y
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto/tpm.scc b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm.scc
new file mode 100644
index 0000000..2949ed4
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm.scc
@@ -0,0 +1,3 @@
1define KFEATURE_DESCRIPTION "Enable TPM"
2
3kconf hardware tpm.cfg
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_i2c.cfg b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_i2c.cfg
new file mode 100644
index 0000000..59993f9
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_i2c.cfg
@@ -0,0 +1,15 @@
1CONFIG_HW_RANDOM_TPM=y
2CONFIG_TCG_TPM=y
3CONFIG_TCG_TIS_CORE=y
4CONFIG_TCG_TIS=y
5CONFIG_SECURITYFS=y
6
7CONFIG_REGMAP_I2C=y
8CONFIG_I2C_BOARDINFO=y
9CONFIG_I2C_COMPAT=y
10CONFIG_RTC_I2C_AND_SPI=y
11
12CONFIG_TCG_TIS_I2C_ATMEL=m
13CONFIG_TCG_TIS_I2C_INFINEON=m
14CONFIG_TCG_TIS_I2C_NUVOTON=m
15CONFIG_TCG_TIS_ST33ZP24_I2C=m
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_i2c.scc b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_i2c.scc
new file mode 100644
index 0000000..0e4eedb
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_i2c.scc
@@ -0,0 +1,6 @@
1define KFEATURE_DESCRIPTION "Enable TPM i2c"
2
3include features/i2c/i2c.scc
4
5kconf hardware tpm_i2c.cfg
6
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_x86.cfg b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_x86.cfg
new file mode 100644
index 0000000..8be331a
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto/tpm_x86.cfg
@@ -0,0 +1,4 @@
1CONFIG_TCG_NSC=m
2CONFIG_TCG_ATMEL=m
3CONFIG_TCG_INFINEON=m
4CONFIG_TCG_TIS_ST33ZP24=m
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto/vtpm.cfg b/meta-tpm/recipes-kernel/linux/linux-yocto/vtpm.cfg
new file mode 100644
index 0000000..a8b3758
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto/vtpm.cfg
@@ -0,0 +1,5 @@
1CONFIG_HW_RANDOM_TPM=y
2CONFIG_TCG_TPM=y
3CONFIG_TCG_VTPM_PROXY=y
4CONFIG_SECURITYFS=y
5~
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto/vtpm.scc b/meta-tpm/recipes-kernel/linux/linux-yocto/vtpm.scc
new file mode 100644
index 0000000..e842da6
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto/vtpm.scc
@@ -0,0 +1,4 @@
1define KFEATURE_DESCRIPTION "Enable vTPM"
2
3kconf hardware vtpm.cfg
4
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto_4.%.bbappend b/meta-tpm/recipes-kernel/linux/linux-yocto_4.%.bbappend
new file mode 100644
index 0000000..0eebf00
--- /dev/null
+++ b/meta-tpm/recipes-kernel/linux/linux-yocto_4.%.bbappend
@@ -0,0 +1,11 @@
1FILESEXTRAPATHS_prepend := "${THISDIR}/linux-yocto:"
2
3# Enable tpm in kernel
4SRC_URI_append_x86 = " \
5 ${@bb.utils.contains('MACHINE_FEATURES', 'tpm', 'file://tpm.scc', '', d)} \
6 "
7
8SRC_URI += " \
9 ${@bb.utils.contains('MACHINE_FEATURES', 'tpm_i2c', 'file://tpm_i2c.scc', '', d)} \
10 ${@bb.utils.contains('MACHINE_FEATURES', 'vtpm', 'file://vtpm.scc', '', d)} \
11 "
diff --git a/meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend b/meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend
deleted file mode 100644
index 208d23f..0000000
--- a/meta-tpm/recipes-kernel/linux/linux-yocto_4.10.bbappend
+++ /dev/null
@@ -1,5 +0,0 @@
1#
2# TPM kernel support
3
4KERNEL_FEATURES_append += "${@bb.utils.contains('MACHINE_FEATURES', 'tpm', ' features/tpm/tpm.scc', '', d)}"
5