[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] vtpmmgr: fix build on 32-bit



On Mon, 2013-01-21 at 16:17 +0000, Fioravante, Matthew E. wrote:
> 
> > -----Original Message-----
> > From: Ian Campbell [mailto:Ian.Campbell@xxxxxxxxxx]
> > Sent: Monday, January 21, 2013 11:16 AM
> > To: Fioravante, Matthew E.
> > Cc: xen-devel@xxxxxxxxxxxxx; Samuel Thibault; Ian Jackson; Keir (Xen.org)
> > Subject: Re: [PATCH] vtpmmgr: fix build on 32-bit
> > 
> > On Mon, 2013-01-21 at 15:14 +0000, Fioravante, Matthew E. wrote:
> > > Acked by: Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
> > 
> > Thanks, applied.
> > 
> > I noticed that I had to add padlock.o to stubdom/vtpm/Makefile too. I just 
> > went
> > ahead and did that.
> Hmm, I thought that was included. Its something that only works in via
> cpus so its easy to miss. Anyway if you just switch to -lpolarssl then
> that problem should fix itself also.

I've already pushed the padlock.o fix but here is the updated "use
-lpolarssl" patch.

8<----------------------------------------

>From f8650d829965e16612a2570990190ded991294f3 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@xxxxxxxxxx>
Date: Mon, 21 Jan 2013 13:40:56 +0000
Subject: [PATCH] vtpm/vtpmmgr: Use libpolarssl.a instead of hardcoding own list 
of .o files

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Cc: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Cc: "Fioravante, Matthew E." <Matthew.Fioravante@xxxxxxxxxx>
--
v2: Do vtpm as well as vtpmmgr.
---
 stubdom/Makefile         |    4 ++--
 stubdom/vtpm/Makefile    |    5 +----
 stubdom/vtpmmgr/Makefile |    5 +----
 3 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 64ee6e2..970f227 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -428,11 +428,11 @@ c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c 
lwip-$(XEN_TARGET_ARCH) libxc c
 
 .PHONY: vtpm-stubdom
 vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm vtpm
-       DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" 
DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpm/minios.cfg" 
$(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpm/vtpm.a" 
APP_LDLIBS="-ltpm -ltpm_crypto -lgmp"
+       DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" 
DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpm/minios.cfg" 
$(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS="$(CURDIR)/vtpm/vtpm.a" 
APP_LDLIBS="-ltpm -ltpm_crypto -lgmp -lpolarssl"
 
 .PHONY: vtpmmgr-stubdom
 vtpmmgr-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr
-       DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" 
DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" 
$(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< 
APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm"
+       DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" 
DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/vtpmmgr/minios.cfg" 
$(MAKE) -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< 
APP_OBJS="$(CURDIR)/vtpmmgr/vtpmmgr.a" APP_LDLIBS="-lm -lpolarssl"
 
 .PHONY: pv-grub
 pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub
diff --git a/stubdom/vtpm/Makefile b/stubdom/vtpm/Makefile
index 30f7a1a..37051c1 100644
--- a/stubdom/vtpm/Makefile
+++ b/stubdom/vtpm/Makefile
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o sha4.o padlock.o
-
 TARGET=vtpm.a
 OBJS=vtpm.o vtpm_cmd.o vtpmblk.o vtpm_pcrs.o
 
@@ -24,7 +21,7 @@ CPPFLAGS+=-I../tpm_emulator-$(XEN_TARGET_ARCH)/crypto
 CPPFLAGS+=-I../tpm_emulator-$(XEN_TARGET_ARCH)
 
 $(TARGET): $(OBJS)
-       ar -cr $@ $(OBJS) $(TPMEMU_OBJS) $(foreach 
obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+       ar -cr $@ $(OBJS)
 
 $(OBJS): vtpm_manager.h
 
diff --git a/stubdom/vtpmmgr/Makefile b/stubdom/vtpmmgr/Makefile
index e41c261..af13b39 100644
--- a/stubdom/vtpmmgr/Makefile
+++ b/stubdom/vtpmmgr/Makefile
@@ -11,9 +11,6 @@
 
 XEN_ROOT=../..
 
-PSSL_DIR=../polarssl-$(XEN_TARGET_ARCH)/library
-PSSL_OBJS=aes.o sha1.o entropy.o ctr_drbg.o bignum.o sha4.o havege.o timing.o 
entropy_poll.o padlock.o
-
 TARGET=vtpmmgr.a
 OBJS=vtpmmgr.o vtpm_cmd_handler.o vtpm_storage.o init.o tpmrsa.o tpm.o log.o
 
@@ -22,7 +19,7 @@ CFLAGS+=-Wno-declaration-after-statement -Wno-unused-label
 
 build: $(TARGET)
 $(TARGET): $(OBJS)
-       ar -rcs $@ $^ $(foreach obj,$(PSSL_OBJS),$(PSSL_DIR)/$(obj))
+       ar -rcs $@ $^
 
 clean:
        rm -f $(TARGET) $(OBJS)
-- 
1.7.2.5




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.