mirror of
https://github.com/jiazhang0/meta-secure-core.git
synced 2026-05-06 09:48:40 +00:00
meta-secure-core: update TSS 2.0 to the latest stable version
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
This commit is contained in:
@@ -17,12 +17,12 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=89c8ce1346a3dfe75379e84f3ba9d641"
|
||||
|
||||
DEPENDS += "tpm2.0-tss tpm2-abrmd pkgconfig-native"
|
||||
|
||||
PV = "0.6.0+git${SRCPV}"
|
||||
PV = "0.6.2+git${SRCPV}"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/WindRiver-OpenSourceLabs/cryptfs-tpm2.git \
|
||||
"
|
||||
SRCREV = "cf736b0fe06e8ce46232e9bc6f24817405f902b9"
|
||||
SRCREV = "1a1fe2bd67b5c4a3ec0ad5dd6dbb168df38144a4"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
|
||||
@@ -11,14 +11,14 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
|
||||
|
||||
DEPENDS += "autoconf-archive dbus glib-2.0 pkgconfig tpm2.0-tss glib-2.0-native"
|
||||
|
||||
PV = "1.1.0+git${SRCPV}"
|
||||
PV = "1.2.0+git${SRCPV}"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/01org/tpm2-abrmd.git \
|
||||
git://github.com/tpm2-software/tpm2-abrmd \
|
||||
file://tpm2-abrmd-init.sh \
|
||||
file://tpm2-abrmd.default \
|
||||
"
|
||||
SRCREV = "1003fcfaad39f5c27f75deb678f4fba253f38a82"
|
||||
SRCREV = "59ce1008e5fa3bd5a143437b0f7390851fd25bd8"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -60,8 +60,12 @@ do_install_append() {
|
||||
install -m 0644 "${WORKDIR}/tpm2-abrmd.default" "${D}${sysconfdir}/default/tpm2-abrmd"
|
||||
}
|
||||
|
||||
FILES_${PN} += "\
|
||||
${libdir}/systemd \
|
||||
"
|
||||
|
||||
RDEPENDS_${PN} += "\
|
||||
libgcc dbus-glib libtss2 libtctidevice libtctisocket libmarshal \
|
||||
libgcc dbus-glib libtss2 libtctidevice libtctisocket \
|
||||
"
|
||||
|
||||
BBCLASSEXTEND = "native"
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
From 1f8d526bad6a0317bde32a0278fbabe2492e7c62 Mon Sep 17 00:00:00 2001
|
||||
From: Lans Zhang <jia.zhang@windriver.com>
|
||||
Date: Thu, 20 Jul 2017 14:51:34 +0800
|
||||
Subject: [PATCH] Fix build failure with glib-2.0
|
||||
|
||||
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
|
||||
---
|
||||
Makefile.am | 2 +-
|
||||
configure.ac | 1 +
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index c40c24b..2f4fa3e 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -35,7 +35,7 @@ ACLOCAL_AMFLAGS = -I m4
|
||||
INCLUDE_DIRS = -I$(srcdir)/src -I$(srcdir)/lib
|
||||
LIB_COMMON := lib/libcommon.a
|
||||
|
||||
-AM_CFLAGS := $(INCLUDE_DIRS) $(TPM20_TSS_CFLAGS) $(EXTRA_CFLAGS) $(TCTI_TABRMD_CFLAGS) $(CRYPTO_CFLAGS)
|
||||
+AM_CFLAGS := $(INCLUDE_DIRS) $(GLIB_CFLAGS) $(TPM20_TSS_CFLAGS) $(EXTRA_CFLAGS) $(TCTI_TABRMD_CFLAGS) $(CRYPTO_CFLAGS)
|
||||
AM_LDFLAGS := $(EXTRA_LDFLAGS)
|
||||
|
||||
LDADD = $(LIB_COMMON) $(TPM20_TSS_LIBS) $(TCTI_SOCK_LIBS) $(TCTI_DEV_LIBS) $(TCTI_TABRMD_LIBS) $(CRYPTO_LIBS)
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8ef3b17..8db6922 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -6,6 +6,7 @@ LT_INIT
|
||||
AM_INIT_AUTOMAKE([foreign
|
||||
subdir-objects])
|
||||
AC_CONFIG_FILES([Makefile])
|
||||
+PKG_CHECK_MODULES([GLIB], [glib-2.0])
|
||||
PKG_CHECK_MODULES([SAPI],[sapi])
|
||||
# disable libtcti-device selectively (enabled by default)
|
||||
AC_ARG_WITH(
|
||||
--
|
||||
2.7.5
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
From 1c29c5206be61edb9ebb165f5e4ae2f5eceb5608 Mon Sep 17 00:00:00 2001
|
||||
From: Jia Zhang <zhang.jia@linux.alibaba.com>
|
||||
Date: Fri, 16 Feb 2018 20:31:58 -0500
|
||||
Subject: [PATCH] tpm2-tools: use dynamic linkage with tpm2-abrmd
|
||||
|
||||
tpm2-abrmd has huge dependencies and they are not necessary to be involved
|
||||
in initramfs.
|
||||
|
||||
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
|
||||
---
|
||||
lib/tcti/tpm2_tools_tcti_abrmd.c | 21 +++++++++++++++++++--
|
||||
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/tcti/tpm2_tools_tcti_abrmd.c b/lib/tcti/tpm2_tools_tcti_abrmd.c
|
||||
index 5e50288..48e0df6 100644
|
||||
--- a/lib/tcti/tpm2_tools_tcti_abrmd.c
|
||||
+++ b/lib/tcti/tpm2_tools_tcti_abrmd.c
|
||||
@@ -30,6 +30,7 @@
|
||||
//**********************************************************************;
|
||||
#include <inttypes.h>
|
||||
#include <stdlib.h>
|
||||
+#include <dlfcn.h>
|
||||
#include <tcti/tcti-tabrmd.h>
|
||||
|
||||
#include <sapi/tpm20.h>
|
||||
@@ -42,8 +43,24 @@ TSS2_TCTI_CONTEXT *tpm2_tools_tcti_abrmd_init(char *opts) {
|
||||
|
||||
UNUSED(opts);
|
||||
|
||||
+ /*
|
||||
+ * Intend to "forget" the handle in order to make sure libtcti-tabrmd
|
||||
+ * is unloaded along with the deconstructed functions.
|
||||
+ */
|
||||
+ void *tabrmd_handle;
|
||||
+ tabrmd_handle = dlopen("libtcti-tabrmd.so.0", RTLD_LAZY);
|
||||
+ if (!tabrmd_handle) {
|
||||
+ LOG_ERR ("Unable to find out the tabrmd tcti library");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ TSS2_RC (*init)(TSS2_TCTI_CONTEXT *, size_t *);
|
||||
+ init = dlsym(tabrmd_handle, "tss2_tcti_tabrmd_init");
|
||||
+ if (!init)
|
||||
+ return NULL;
|
||||
+
|
||||
size_t size;
|
||||
- TSS2_RC rc = tss2_tcti_tabrmd_init(NULL, &size);
|
||||
+ TSS2_RC rc = init(NULL, &size);
|
||||
if (rc != TSS2_RC_SUCCESS) {
|
||||
LOG_ERR("Failed to get size for TABRMD TCTI context: 0x%" PRIx32, rc);
|
||||
return NULL;
|
||||
@@ -55,7 +72,7 @@ TSS2_TCTI_CONTEXT *tpm2_tools_tcti_abrmd_init(char *opts) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- rc = tss2_tcti_tabrmd_init(tcti_ctx, &size);
|
||||
+ rc = init(tcti_ctx, &size);
|
||||
if (rc != TSS2_RC_SUCCESS) {
|
||||
LOG_ERR ("Failed to initialize TABRMD TCTI context: 0x%" PRIx32, rc);
|
||||
free(tcti_ctx);
|
||||
--
|
||||
2.14.1
|
||||
|
||||
@@ -1,65 +0,0 @@
|
||||
From b328bb108cc926274ca20cc722d8d8ad91f19d60 Mon Sep 17 00:00:00 2001
|
||||
From: Lans Zhang <jia.zhang@windriver.com>
|
||||
Date: Thu, 20 Jul 2017 15:19:51 +0800
|
||||
Subject: [PATCH] tpm2-tools: use dynamic linkage with tpm2-abrmd
|
||||
|
||||
tpm2-abrmd has huge dependencies and they are not necessary to be involved
|
||||
in initramfs.
|
||||
|
||||
Signed-off-by: Lans Zhang <jia.zhang@windriver.com>
|
||||
---
|
||||
lib/context-util.c | 21 +++++++++++++++++++--
|
||||
1 file changed, 19 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/context-util.c b/lib/context-util.c
|
||||
index 7de22ac..9814548 100644
|
||||
--- a/lib/context-util.c
|
||||
+++ b/lib/context-util.c
|
||||
@@ -38,6 +38,7 @@
|
||||
#include <tcti/tcti_socket.h>
|
||||
#endif
|
||||
#ifdef HAVE_TCTI_TABRMD
|
||||
+#include <dlfcn.h>
|
||||
#include <tcti/tcti-tabrmd.h>
|
||||
#endif
|
||||
|
||||
@@ -134,10 +135,26 @@ TSS2_TCTI_CONTEXT*
|
||||
tcti_tabrmd_init (void)
|
||||
{
|
||||
TSS2_TCTI_CONTEXT *tcti_ctx;
|
||||
+ TSS2_RC (*init)(TSS2_TCTI_CONTEXT *, size_t *);
|
||||
+ /*
|
||||
+ * Intend to "forget" the handle in order to make sure libtcti-tabrmd
|
||||
+ * is unloaded along with the deconstructed functions.
|
||||
+ */
|
||||
+ void *tabrmd_handle;
|
||||
TSS2_RC rc;
|
||||
size_t size;
|
||||
|
||||
- rc = tss2_tcti_tabrmd_init(NULL, &size);
|
||||
+ tabrmd_handle = dlopen("libtcti-tabrmd.so.0", RTLD_LAZY);
|
||||
+ if (!tabrmd_handle) {
|
||||
+ LOG_ERR ("Unable to find out the tabrmd tcti library");
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ init = dlsym(tabrmd_handle, "tss2_tcti_tabrmd_init");
|
||||
+ if (!init)
|
||||
+ return NULL;
|
||||
+
|
||||
+ rc = init(NULL, &size);
|
||||
if (rc != TSS2_RC_SUCCESS) {
|
||||
LOG_ERR ("Failed to get size for TABRMD TCTI context: 0x%" PRIx32, rc);
|
||||
return NULL;
|
||||
@@ -148,7 +165,7 @@ tcti_tabrmd_init (void)
|
||||
strerror (errno));
|
||||
return NULL;
|
||||
}
|
||||
- rc = tss2_tcti_tabrmd_init (tcti_ctx, &size);
|
||||
+ rc = init (tcti_ctx, &size);
|
||||
if (rc != TSS2_RC_SUCCESS) {
|
||||
LOG_ERR ("Failed to initialize TABRMD TCTI context: 0x%" PRIx32, rc);
|
||||
free (tcti_ctx);
|
||||
--
|
||||
2.7.5
|
||||
|
||||
@@ -7,14 +7,13 @@ LIC_FILES_CHKSUM = "file://${S}/LICENSE;md5=91b7c548d73ea16537799e8060cea819"
|
||||
|
||||
DEPENDS += "tpm2.0-tss tpm2-abrmd openssl curl autoconf-archive pkgconfig"
|
||||
|
||||
PV = "2.1.0+git${SRCPV}"
|
||||
PV = "3.0.3+git${SRCPV}"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/01org/tpm2.0-tools.git \
|
||||
file://0001-Fix-build-failure-with-glib-2.0.patch \
|
||||
file://0002-tpm2-tools-use-dynamic-linkage-with-tpm2-abrmd.patch \
|
||||
git://github.com/tpm2-software/tpm2-tools.git;branch=3.X \
|
||||
file://0001-tpm2-tools-use-dynamic-linkage-with-tpm2-abrmd.patch \
|
||||
"
|
||||
SRCREV = "97306d6dc1fc5f3142c50efe3189bd46ff35b5a0"
|
||||
SRCREV = "6b4385f098bd5d39e1cfc6cd2b038b68c960413f"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=500b2e742befc3da00684d8a1d5fd9da"
|
||||
|
||||
DEPENDS += "autoconf-archive pkgconfig"
|
||||
|
||||
PV = "1.1.0+git${SRCPV}"
|
||||
PV = "1.3.0+git${SRCPV}"
|
||||
|
||||
SRC_URI = "\
|
||||
git://github.com/01org/TPM2.0-TSS.git \
|
||||
git://github.com/tpm2-software/tpm2-tss.git;branch=1.x \
|
||||
"
|
||||
SRCREV = "3fb91634e61c97a0ae732bc5c298b188c23376cf"
|
||||
SRCREV = "b1d9ece8c6bea2e3043943b2edfaebcdca330c38"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
@@ -39,9 +39,6 @@ PACKAGES = "\
|
||||
libtctisocket \
|
||||
libtctisocket-dev \
|
||||
libtctisocket-staticdev \
|
||||
libmarshal \
|
||||
libmarshal-dev \
|
||||
libmarshal-staticdev \
|
||||
"
|
||||
|
||||
FILES_libtss2 = "${libdir}/libsapi.so.*"
|
||||
@@ -78,15 +75,6 @@ FILES_libtctisocket-staticdev = "\
|
||||
${libdir}/libtcti-socket.a \
|
||||
${libdir}/libtcti-socket.la \
|
||||
"
|
||||
FILES_libmarshal = "${libdir}/libmarshal.so.*"
|
||||
FILES_libmarshal-dev = "${libdir}/libmarshal.so"
|
||||
FILES_libmarshal-staticdev = "\
|
||||
${libdir}/libmarshal.a \
|
||||
${libdir}/libmarshal.la \
|
||||
"
|
||||
|
||||
RDEPENDS_libtss2 += "libmarshal"
|
||||
RDEPENDS_libtctidevice += "libmarshal"
|
||||
|
||||
RRECOMMENDS_${PN} += "\
|
||||
kernel-module-tpm-crb \
|
||||
|
||||
Reference in New Issue
Block a user