mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 13:18:36 -09:00
package/tpm2-tss: add Mbed-TLS crypto backend support
Add mbedtls crypto backend support for lightweight build BR2_PACKAGE_TPM2_TSS_FAPI depends on openssl explicitly Rewrite fapi -> FAPI Signed-off-by: Andreas Mohr <and@gmx.li> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
2d7cf86aaa
commit
5394df6400
@@ -1,8 +1,8 @@
|
||||
config BR2_PACKAGE_TPM2_TSS
|
||||
bool "tpm2-tss"
|
||||
depends on !BR2_STATIC_LIBS # dlfcn.h
|
||||
select BR2_PACKAGE_OPENSSL
|
||||
select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL
|
||||
select BR2_PACKAGE_OPENSSL if !BR2_PACKAGE_MBEDTLS
|
||||
select BR2_PACKAGE_OPENSSL_FORCE_LIBOPENSSL if !BR2_PACKAGE_MBEDTLS
|
||||
help
|
||||
OSS implementation of the Trusted Computing Group's (TCG) TPM2
|
||||
Software Stack (TSS). This stack consists of the following
|
||||
@@ -35,8 +35,9 @@ config BR2_PACKAGE_TPM2_TSS
|
||||
if BR2_PACKAGE_TPM2_TSS
|
||||
|
||||
config BR2_PACKAGE_TPM2_TSS_FAPI
|
||||
bool "fapi support"
|
||||
bool "FAPI support"
|
||||
depends on BR2_TOOLCHAIN_HAS_SYNC_4 # json-c
|
||||
depends on !BR2_PACKAGE_MBEDTLS # configure: FAPI has to be compiled with OpenSSL
|
||||
select BR2_PACKAGE_JSON_C
|
||||
select BR2_PACKAGE_LIBCURL
|
||||
select BR2_PACKAGE_UTIL_LINUX
|
||||
@@ -54,6 +55,9 @@ config BR2_PACKAGE_TPM2_TSS_FAPI
|
||||
https://trustedcomputinggroup.org/wp-content/uploads/TSS_FAPI_v0.94_r04_pubrev.pdf
|
||||
https://trustedcomputinggroup.org/wp-content/uploads/TSS_JSON_Policy_v0.7_r04_pubrev.pdf
|
||||
|
||||
comment "FAPI not supported with Mbed TLS backend"
|
||||
depends on BR2_PACKAGE_MBEDTLS
|
||||
|
||||
endif
|
||||
|
||||
comment "tpm2-tss needs a toolchain w/ dynamic library"
|
||||
|
||||
@@ -11,7 +11,7 @@ TPM2_TSS_LICENSE_FILES = LICENSE
|
||||
TPM2_TSS_CPE_ID_VENDOR = tpm2_software_stack_project
|
||||
TPM2_TSS_CPE_ID_PRODUCT = tpm2_software_stack
|
||||
TPM2_TSS_INSTALL_STAGING = YES
|
||||
TPM2_TSS_DEPENDENCIES = openssl host-pkgconf
|
||||
TPM2_TSS_DEPENDENCIES = host-pkgconf
|
||||
|
||||
# systemd-sysusers and systemd-tmpfiles are only used at install time
|
||||
# to trigger the creation of users and tmpfiles, which we do not care
|
||||
@@ -25,10 +25,17 @@ TPM2_TSS_CONF_OPTS = \
|
||||
ac_cv_prog_systemd_tmpfiles=no \
|
||||
ac_cv_prog_useradd=yes \
|
||||
ac_cv_prog_groupadd=yes \
|
||||
--with-crypto=ossl \
|
||||
--disable-doxygen-doc \
|
||||
--disable-defaultflags
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPENSSL),y)
|
||||
TPM2_TSS_DEPENDENCIES += openssl
|
||||
TPM2_TSS_CONF_OPTS += --with-crypto=ossl
|
||||
else ifeq ($(BR2_PACKAGE_MBEDTLS),y)
|
||||
TPM2_TSS_DEPENDENCIES += mbedtls
|
||||
TPM2_TSS_CONF_OPTS += --with-crypto=mbed
|
||||
endif
|
||||
|
||||
# uses C99 code but forgets to pass -std=c99 when --disable-defaultflags is used
|
||||
TPM2_TSS_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -std=c99"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user