summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>2017-05-12 18:24:51 +0530
committerArmin Kuster <akuster808@gmail.com>2017-05-19 07:40:49 -0700
commit3d863f72641f930e10ed1b6211d66b2c3d04d306 (patch)
tree6afdd19901636150d08a3e4a0507ee63b9a27c32
parent99a63fd09770526b29c570394b5636569ebdfdd9 (diff)
downloadmeta-security-3d863f72641f930e10ed1b6211d66b2c3d04d306.tar.gz
tpm2.0-tss: Fix build issue with tpm2-abrmd recipe
It solves tpm2-abrmd recipe build failure (as mentioned below) as none of the tpm2.0-tss header files define MAX_LOADED_OBJECTS1 macro. The macro name should be MAX_LOADED_OBJECTS. -- snip -- | from ../tpm2-abrmd/src/include/tabrmd.h:31, | from ../tpm2-abrmd/src/access-broker.c:31: | ../tpm2-abrmd/src/access-broker.c: In function 'access_broker_get_trans_object_count': | ../tpm2-abrmd/src/access-broker.c:549:34: error: 'MAX_LOADED_OBJECTS1' undeclared (first use in this function) -- snip -- Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--recipes-tpm/tpm2.0-tss/tpm2.0-tss/0001-tss2_tpm2_types.h-Fix-broken-TRANSIENT_LAST-macro.patch29
-rw-r--r--recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb3
2 files changed, 31 insertions, 1 deletions
diff --git a/recipes-tpm/tpm2.0-tss/tpm2.0-tss/0001-tss2_tpm2_types.h-Fix-broken-TRANSIENT_LAST-macro.patch b/recipes-tpm/tpm2.0-tss/tpm2.0-tss/0001-tss2_tpm2_types.h-Fix-broken-TRANSIENT_LAST-macro.patch
new file mode 100644
index 0000000..74f82be
--- /dev/null
+++ b/recipes-tpm/tpm2.0-tss/tpm2.0-tss/0001-tss2_tpm2_types.h-Fix-broken-TRANSIENT_LAST-macro.patch
@@ -0,0 +1,29 @@
1From 92a0830306c2eb3081b5ac3329f7504cd58d670b Mon Sep 17 00:00:00 2001
2From: Philip Tricca <philip.b.tricca@intel.com>
3Date: Thu, 12 Jan 2017 11:55:52 -0800
4Subject: [PATCH] tss2_tpm2_types.h: Fix broken TRANSIENT_LAST macro.
5
6Upstream-Status: Backport
7
8Signed-off-by: Philip Tricca <philip.b.tricca@intel.com>
9Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
10---
11 include/sapi/tss2_tpm2_types.h | 2 +-
12 1 file changed, 1 insertion(+), 1 deletion(-)
13
14diff --git a/include/sapi/tss2_tpm2_types.h b/include/sapi/tss2_tpm2_types.h
15index 48cc1dc..aa41c06 100644
16--- a/include/sapi/tss2_tpm2_types.h
17+++ b/include/sapi/tss2_tpm2_types.h
18@@ -452,7 +452,7 @@ typedef TPM_HANDLE TPM_HC;
19 #define TRANSIENT_FIRST (HR_TRANSIENT + 0 ) /* first transient object */
20 #define ACTIVE_SESSION_FIRST (POLICY_SESSION_FIRST ) /* used in GetCapability */
21 #define ACTIVE_SESSION_LAST (POLICY_SESSION_LAST ) /* used in GetCapability */
22-#define TRANSIENT_LAST (TRANSIENT_FIRST+MAX_LOADED_OBJECTS1 ) /* last transient object */
23+#define TRANSIENT_LAST (TRANSIENT_FIRST + MAX_LOADED_OBJECTS - 1 ) /* last transient object */
24 #define PERSISTENT_FIRST (HR_PERSISTENT + 0 ) /* first persistent object */
25 #define PERSISTENT_LAST (PERSISTENT_FIRST + 0x00FFFFFF ) /* last persistent object */
26 #define PLATFORM_PERSISTENT (PERSISTENT_FIRST + 0x00800000 ) /* first platform persistent object */
27--
282.6.4
29
diff --git a/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb b/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
index c4b5c8c..2910741 100644
--- a/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
+++ b/recipes-tpm/tpm2.0-tss/tpm2.0-tss_git.bb
@@ -7,7 +7,8 @@ SECTION = "tpm"
7SRCREV = "8e25d0cbb287d30c93b2b77e99bc761dc67e31a9" 7SRCREV = "8e25d0cbb287d30c93b2b77e99bc761dc67e31a9"
8SRC_URI = " \ 8SRC_URI = " \
9 git://github.com/01org/TPM2.0-TSS.git;protocol=git;branch=master;name=TPM2.0-TSS;destsuffix=TPM2.0-TSS \ 9 git://github.com/01org/TPM2.0-TSS.git;protocol=git;branch=master;name=TPM2.0-TSS;destsuffix=TPM2.0-TSS \
10 file://ax_pthread.m4" 10 file://ax_pthread.m4 \
11 file://0001-tss2_tpm2_types.h-Fix-broken-TRANSIENT_LAST-macro.patch"
11 12
12inherit autotools pkgconfig 13inherit autotools pkgconfig
13 14