Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


matthew.fioravante at jhuapl

Nov 20, 2012, 6:21 AM

Post #1 of 9 (490 views)
Permalink
[PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile

Add 3 new libraries to stubdom:
libgmp
polarssl
Berlios TPM Emulator 0.7.4

Also adds makefile structure for vtpm-stubdom and vtpmmgrdom

Signed-off-by: Matthew Fioravante <matthew.fioravante [at] jhuapl>
Acked-by: Ian Campbell <ian.campbell [at] citrix>
---
stubdom/Makefile | 138 +++++++++++++++++++++++++++++++++++++++++++-
stubdom/polarssl.patch | 64 ++++++++++++++++++++
stubdom/tpmemu-0.7.4.patch | 12 ++++
3 files changed, 211 insertions(+), 3 deletions(-)
create mode 100644 stubdom/polarssl.patch
create mode 100644 stubdom/tpmemu-0.7.4.patch

diff --git a/stubdom/Makefile b/stubdom/Makefile
index 50ba360..fc70d88 100644
--- a/stubdom/Makefile
+++ b/stubdom/Makefile
@@ -31,6 +31,18 @@ GRUB_VERSION=0.97
OCAML_URL?=http://caml.inria.fr/pub/distrib/ocaml-3.11
OCAML_VERSION=3.11.0

+GMP_VERSION=4.3.2
+GMP_URL?=$(XEN_EXTFILES_URL)
+#GMP_URL?=ftp://ftp.gmplib.org/pub/gmp-$(GMP_VERSION)
+
+POLARSSL_VERSION=1.1.4
+POLARSSL_URL?=$(XEN_EXTFILES_URL)
+#POLARSSL_URL?=http://polarssl.org/code/releases
+
+TPMEMU_VERSION=0.7.4
+TPMEMU_URL?=$(XEN_EXTFILES_URL)
+#TPMEMU_URL?=http://download.berlios.de/tpm-emulator
+
WGET=wget -c

GNU_TARGET_ARCH:=$(XEN_TARGET_ARCH)
@@ -74,12 +86,12 @@ TARGET_CPPFLAGS += -I$(XEN_ROOT)/xen/include

TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib

-TARGETS=ioemu c caml grub xenstore
+TARGETS=ioemu c caml grub xenstore vtpm vtpmmgr

.PHONY: all
all: build
ifeq ($(STUBDOM_SUPPORTED),1)
-build: genpath ioemu-stubdom c-stubdom pv-grub xenstore-stubdom
+build: genpath ioemu-stubdom c-stubdom pv-grub xenstore-stubdom vtpm-stubdom vtpmmgrdom
else
build: genpath
endif
@@ -176,6 +188,76 @@ lwip-$(XEN_TARGET_ARCH): lwip-$(LWIP_VERSION).tar.gz
touch $@

#############
+# cross-gmp
+#############
+gmp-$(GMP_VERSION).tar.bz2:
+ $(WGET) $(GMP_URL)/$@
+
+.PHONY: cross-gmp
+ifeq ($(XEN_TARGET_ARCH), x86_32)
+ GMPEXT=ABI=32
+endif
+gmp-$(XEN_TARGET_ARCH): gmp-$(GMP_VERSION).tar.bz2 $(NEWLIB_STAMPFILE)
+ tar xjf $<
+ mv gmp-$(GMP_VERSION) $@
+ #patch -d $@ -p0 < gmp.patch
+ cd $@; CPPFLAGS="-isystem $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include $(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" CC=$(CC) $(GMPEXT) ./configure --disable-shared --enable-static --disable-fft --without-readline --prefix=$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf
+ sed -i 's/#define HAVE_OBSTACK_VPRINTF 1/\/\/#define HAVE_OBSTACK_VPRINTF 1/' $@/config.h
+ touch $@
+
+GMP_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libgmp.a
+cross-gmp: $(GMP_STAMPFILE)
+$(GMP_STAMPFILE): gmp-$(XEN_TARGET_ARCH)
+ ( cd $< && \
+ $(MAKE) && \
+ $(MAKE) install )
+
+#############
+# cross-polarssl
+#############
+polarssl-$(POLARSSL_VERSION)-gpl.tgz:
+ $(WGET) $(POLARSSL_URL)/$@
+
+polarssl-$(XEN_TARGET_ARCH): polarssl-$(POLARSSL_VERSION)-gpl.tgz
+ tar xzf $<
+ mv polarssl-$(POLARSSL_VERSION) $@
+ patch -d $@ -p1 < polarssl.patch
+ touch $@
+
+POLARSSL_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libpolarssl.a
+cross-polarssl: $(POLARSSL_STAMPFILE)
+$(POLARSSL_STAMPFILE): polarssl-$(XEN_TARGET_ARCH) $(NEWLIB_STAMPFILE) lwip-$(XEN_TARGET_ARCH)
+ ( cd $</library && \
+ make CC="$(CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -I $(realpath $(MINI_OS)/include)" && \
+ mkdir -p $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include && \
+ cp -r ../include/* $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/include && \
+ mkdir -p $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib && \
+ $(INSTALL_DATA) libpolarssl.a $(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib/ )
+
+#############
+# cross-tpmemu
+#############
+tpm_emulator-$(TPMEMU_VERSION).tar.gz:
+ $(WGET) $(TPMEMU_URL)/$@
+
+tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz
+ tar xzf $<
+ mv tpm_emulator-$(TPMEMU_VERSION) $@
+ patch -d $@ -p1 < tpmemu-$(TPMEMU_VERSION).patch;
+ mkdir $@/build
+ cd $@/build; cmake .. -DCMAKE_C_COMPILER=${CC} -DCMAKE_C_FLAGS="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
+ touch $@
+
+TPMEMU_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm.a
+$(TPMEMU_STAMPFILE): tpm_emulator-$(XEN_TARGET_ARCH) $(GMP_STAMPFILE)
+ ( cd $</build && make VERBOSE=1 tpm_crypto tpm )
+ cp $</build/crypto/libtpm_crypto.a $(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm_crypto.a
+ cp $</build/tpm/libtpm.a $(TPMEMU_STAMPFILE)
+
+.PHONY: cross-tpmemu
+cross-tpmemu: $(TPMEMU_STAMPFILE)
+
+#############
# Cross-ocaml
#############

@@ -319,6 +401,24 @@ c: $(CROSS_ROOT)
CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) DESTDIR= -C $@ LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH)

######
+# VTPM
+######
+
+.PHONY: vtpm
+vtpm: cross-polarssl cross-tpmemu
+ make -C $(MINI_OS) links
+ XEN_TARGET_ARCH="$(XEN_TARGET_ARCH)" CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@
+
+######
+# VTPMMGR
+######
+
+.PHONY: vtpmmgr
+vtpmmgr: cross-polarssl
+ make -C $(MINI_OS) links
+ XEN_TARGET_ARCH="$(XEN_TARGET_ARCH)" CPPFLAGS="$(TARGET_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" $(MAKE) -C $@
+
+######
# Grub
######

@@ -362,6 +462,14 @@ caml-stubdom: mini-os-$(XEN_TARGET_ARCH)-caml lwip-$(XEN_TARGET_ARCH) libxc cros
c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxc c
DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/c/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< LWIPDIR=$(CURDIR)/lwip-$(XEN_TARGET_ARCH) APP_OBJS=$(CURDIR)/c/main.a

+.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"
+
+.PHONY: vtpmmgrdom
+vtpmmgrdom: 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"
+
.PHONY: pv-grub
pv-grub: mini-os-$(XEN_TARGET_ARCH)-grub libxc grub
DEF_CPPFLAGS="$(TARGET_CPPFLAGS)" DEF_CFLAGS="$(TARGET_CFLAGS)" DEF_LDFLAGS="$(TARGET_LDFLAGS)" MINIOS_CONFIG="$(CURDIR)/grub/minios.cfg" $(MAKE) DESTDIR= -C $(MINI_OS) OBJ_DIR=$(CURDIR)/$< APP_OBJS=$(CURDIR)/grub-$(XEN_TARGET_ARCH)/main.a
@@ -375,7 +483,7 @@ xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore
#########

ifeq ($(STUBDOM_SUPPORTED),1)
-install: genpath install-readme install-ioemu install-grub install-xenstore
+install: genpath install-readme install-ioemu install-grub install-xenstore install-vtpm install-vtpmmgr
else
install: genpath
endif
@@ -399,6 +507,14 @@ install-xenstore: xenstore-stubdom
$(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/boot"
$(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-xenstore/mini-os.gz "$(DESTDIR)/usr/lib/xen/boot/xenstore-stubdom.gz"

+install-vtpm: vtpm-stubdom
+ $(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
+ $(INSTALL_PROG) mini-os-$(XEN_TARGET_ARCH)-vtpm/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/vtpm-stubdom.gz"
+
+install-vtpmmgr: vtpm-stubdom
+ $(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
+ $(INSTALL_PROG) mini-os-$(XEN_TARGET_ARCH)-vtpmmgr/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/vtpmmgrdom.gz"
+
#######
# clean
#######
@@ -411,8 +527,12 @@ clean:
rm -fr mini-os-$(XEN_TARGET_ARCH)-caml
rm -fr mini-os-$(XEN_TARGET_ARCH)-grub
rm -fr mini-os-$(XEN_TARGET_ARCH)-xenstore
+ rm -fr mini-os-$(XEN_TARGET_ARCH)-vtpm
+ rm -fr mini-os-$(XEN_TARGET_ARCH)-vtpmmgr
$(MAKE) DESTDIR= -C caml clean
$(MAKE) DESTDIR= -C c clean
+ $(MAKE) -C vtpm clean
+ $(MAKE) -C vtpmmgr clean
rm -fr grub-$(XEN_TARGET_ARCH)
rm -f $(STUBDOMPATH)
[ ! -d libxc-$(XEN_TARGET_ARCH) ] || $(MAKE) DESTDIR= -C libxc-$(XEN_TARGET_ARCH) clean
@@ -426,6 +546,10 @@ crossclean: clean
rm -fr newlib-$(XEN_TARGET_ARCH)
rm -fr zlib-$(XEN_TARGET_ARCH) pciutils-$(XEN_TARGET_ARCH)
rm -fr libxc-$(XEN_TARGET_ARCH) ioemu
+ rm -fr gmp-$(XEN_TARGET_ARCH)
+ rm -fr polarssl-$(XEN_TARGET_ARCH)
+ rm -fr openssl-$(XEN_TARGET_ARCH)
+ rm -fr tpm_emulator-$(XEN_TARGET_ARCH)
rm -f mk-headers-$(XEN_TARGET_ARCH)
rm -fr ocaml-$(XEN_TARGET_ARCH)
rm -fr include
@@ -434,6 +558,10 @@ crossclean: clean
.PHONY: patchclean
patchclean: crossclean
rm -fr newlib-$(NEWLIB_VERSION)
+ rm -fr gmp-$(XEN_TARGET_ARCH)
+ rm -fr polarssl-$(XEN_TARGET_ARCH)
+ rm -fr openssl-$(XEN_TARGET_ARCH)
+ rm -fr tpm_emulator-$(XEN_TARGET_ARCH)
rm -fr lwip-$(XEN_TARGET_ARCH)
rm -fr grub-upstream

@@ -442,10 +570,14 @@ patchclean: crossclean
downloadclean: patchclean
rm -f newlib-$(NEWLIB_VERSION).tar.gz
rm -f zlib-$(ZLIB_VERSION).tar.gz
+ rm -f gmp-$(GMP_VERSION).tar.gz
+ rm -f tpm_emulator-$(TPMEMU_VERSION).tar.gz
rm -f pciutils-$(LIBPCI_VERSION).tar.bz2
rm -f grub-$(GRUB_VERSION).tar.gz
rm -f lwip-$(LWIP_VERSION).tar.gz
rm -f ocaml-$(OCAML_VERSION).tar.gz
+ rm -f polarssl-$(POLARSSL_VERSION)-gpl.tgz
+ rm -f openssl-$(POLARSSL_VERSION)-gpl.tgz

.PHONY: distclean
distclean: downloadclean
diff --git a/stubdom/polarssl.patch b/stubdom/polarssl.patch
new file mode 100644
index 0000000..d387d4e
--- /dev/null
+++ b/stubdom/polarssl.patch
@@ -0,0 +1,64 @@
+diff -Naur polarssl-1.1.4/include/polarssl/config.h polarssl-x86_64/include/polarssl/config.h
+--- polarssl-1.1.4/include/polarssl/config.h 2011-12-22 05:06:27.000000000 -0500
++++ polarssl-x86_64/include/polarssl/config.h 2012-10-30 17:18:07.567001000 -0400
+@@ -164,8 +164,8 @@
+ * application.
+ *
+ * Uncomment this macro to prevent loading of default entropy functions.
+-#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
+ */
++#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES
+
+ /**
+ * \def POLARSSL_NO_PLATFORM_ENTROPY
+@@ -175,8 +175,8 @@
+ * standards like the /dev/urandom or Windows CryptoAPI.
+ *
+ * Uncomment this macro to disable the built-in platform entropy functions.
+-#define POLARSSL_NO_PLATFORM_ENTROPY
+ */
++#define POLARSSL_NO_PLATFORM_ENTROPY
+
+ /**
+ * \def POLARSSL_PKCS1_V21
+@@ -426,8 +426,8 @@
+ * Requires: POLARSSL_TIMING_C
+ *
+ * This module enables the HAVEGE random number generator.
+- */
+ #define POLARSSL_HAVEGE_C
++ */
+
+ /**
+ * \def POLARSSL_MD_C
+@@ -490,7 +490,7 @@
+ *
+ * This module provides TCP/IP networking routines.
+ */
+-#define POLARSSL_NET_C
++//#define POLARSSL_NET_C
+
+ /**
+ * \def POLARSSL_PADLOCK_C
+@@ -644,8 +644,8 @@
+ * Caller: library/havege.c
+ *
+ * This module is used by the HAVEGE random number generator.
+- */
+ #define POLARSSL_TIMING_C
++ */
+
+ /**
+ * \def POLARSSL_VERSION_C
+diff -Naur polarssl-1.1.4/library/bignum.c polarssl-x86_64/library/bignum.c
+--- polarssl-1.1.4/library/bignum.c 2012-04-29 16:15:55.000000000 -0400
++++ polarssl-x86_64/library/bignum.c 2012-10-30 17:21:52.135000999 -0400
+@@ -1101,7 +1101,7 @@
+ Z.p[i - t - 1] = ~0;
+ else
+ {
+-#if defined(POLARSSL_HAVE_LONGLONG)
++#if 0 //defined(POLARSSL_HAVE_LONGLONG)
+ t_udbl r;
+
+ r = (t_udbl) X.p[i] << biL;
diff --git a/stubdom/tpmemu-0.7.4.patch b/stubdom/tpmemu-0.7.4.patch
new file mode 100644
index 0000000..b84eff1
--- /dev/null
+++ b/stubdom/tpmemu-0.7.4.patch
@@ -0,0 +1,12 @@
+diff -Naur tpm_emulator-x86_64-back/tpm/tpm_emulator_extern.c tpm_emulator-x86_64/tpm/tpm_emulator_extern.c
+--- tpm_emulator-x86_64-back/tpm/tpm_emulator_extern.c 2012-04-27 10:55:46.581963398 -0400
++++ tpm_emulator-x86_64/tpm/tpm_emulator_extern.c 2012-04-27 10:56:02.193034152 -0400
+@@ -249,7 +249,7 @@
+ #else /* TPM_NO_EXTERN */
+
+ int (*tpm_extern_init)(void) = NULL;
+-int (*tpm_extern_release)(void) = NULL;
++void (*tpm_extern_release)(void) = NULL;
+ void* (*tpm_malloc)(size_t size) = NULL;
+ void (*tpm_free)(/*const*/ void *ptr) = NULL;
+ void (*tpm_log)(int priority, const char *fmt, ...) = NULL;
--
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


samuel.thibault at ens-lyon

Nov 20, 2012, 7:45 AM

Post #2 of 9 (469 views)
Permalink
Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile [In reply to]

Matthew Fioravante, le Tue 20 Nov 2012 09:21:10 -0500, a écrit :
> Add 3 new libraries to stubdom:
> libgmp
> polarssl
> Berlios TPM Emulator 0.7.4
>
> Also adds makefile structure for vtpm-stubdom and vtpmmgrdom
>
> Signed-off-by: Matthew Fioravante <matthew.fioravante [at] jhuapl>
> Acked-by: Ian Campbell <ian.campbell [at] citrix>

Acked-by: Samuel Thibault <samuel.thibault [at] ens-lyon>


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Campbell at citrix

Nov 23, 2012, 1:59 AM

Post #3 of 9 (468 views)
Permalink
Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile [In reply to]

On Tue, 2012-11-20 at 14:21 +0000, Matthew Fioravante wrote:
>
> +tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz
> + tar xzf $<
> + mv tpm_emulator-$(TPMEMU_VERSION) $@
> + patch -d $@ -p1 < tpmemu-$(TPMEMU_VERSION).patch;
> + mkdir $@/build
> + cd $@/build; cmake .. -DCMAKE_C_COMPILER=${CC} -DCMAKE_C_FLAGS="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
> + touch $@

Ian -- is the test system ready to copy with this cmake requirement?

Or do we need to make this dependency conditional?

I think at the very least it should be $(CMAKE), at which point we may
as well go the whole hog and make configure.ac do the right thing.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Nov 29, 2012, 3:39 AM

Post #4 of 9 (470 views)
Permalink
Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile [In reply to]

Ian Campbell writes ("Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile"):
> On Tue, 2012-11-20 at 14:21 +0000, Matthew Fioravante wrote:
> > +tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz
> > + tar xzf $<
> > + mv tpm_emulator-$(TPMEMU_VERSION) $@
> > + patch -d $@ -p1 < tpmemu-$(TPMEMU_VERSION).patch;
> > + mkdir $@/build
> > + cd $@/build; cmake .. -DCMAKE_C_COMPILER=${CC} -DCMAKE_C_FLAGS="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
> > + touch $@
>
> Ian -- is the test system ready to copy with this cmake requirement?
>
> Or do we need to make this dependency conditional?

I think it would be better to make the dependency conditional.
Ideally this would be done via configure but (having discussed this
with Ian Campbell) we think converting stubdom to use autoconf is too
much yak-shaving to ask of you.

I guess it would be possible to have an ad-hoc switch in Config.mk
(say) but I'm not sure this is better than just adding cmake as a hard
dependency.

So I have pushed a change to the pre-test tree for the automatic
testing system to add cmake to the set of packages installed for
builds. Barring unrelated trouble, this should pass the self-tests
and be live by tomorrow morning.

> I think at the very least it should be $(CMAKE), at which point we may
> as well go the whole hog and make configure.ac do the right thing.

I think it's fine to say CMAKE:=cmake somewhere.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Nov 29, 2012, 3:41 AM

Post #5 of 9 (472 views)
Permalink
Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile [In reply to]

Ian Jackson writes ("Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile"):
> I guess it would be possible to have an ad-hoc switch in Config.mk
> (say) but I'm not sure this is better than just adding cmake as a hard
> dependency.

Although, can we have a manual y/n switch in Config.mk so that if
someone has trouble with this feature they can turn off the build ?

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


matthew.fioravante at jhuapl

Nov 29, 2012, 5:54 AM

Post #6 of 9 (473 views)
Permalink
Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile [In reply to]

As annoying as it may be, I think having a configure script or something
similar is the only right answer. More hidden makefile variables and
hacks makes everything more complicated. Before the existence of the
configure script Xen's build system was a huge pain to work with. Its
still not perfect.

So here are 2 proposals:

Add a configure.ac to stubdom. I can whip up a simple one where you can
enable/disable specific stub domains. Other options could be setting the
fetch urls for the libraries. People can add more options later. Now if
people disable vtpm, the check for cmake goes away.

Move /tools/configure.ac to /configure.ac. Use this configure script to
configure the entire build. /Makefile still exists and works with or
without configuring, to enable building of the hypervisor.

If we don't want to do this now, then I vote to just make cmake a
dependency for Xen without adding messy conditional hacks.

On 11/29/2012 06:41 AM, Ian Jackson wrote:
> Ian Jackson writes ("Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile"):
>> I guess it would be possible to have an ad-hoc switch in Config.mk
>> (say) but I'm not sure this is better than just adding cmake as a hard
>> dependency.
> Although, can we have a manual y/n switch in Config.mk so that if
> someone has trouble with this feature they can turn off the build ?
>
> Thanks,
> Ian.
Attachments: smime.p7s (1.42 KB)


Ian.Campbell at citrix

Nov 29, 2012, 8:03 AM

Post #7 of 9 (469 views)
Permalink
Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile [In reply to]

On Thu, 2012-11-29 at 13:54 +0000, Matthew Fioravante wrote:
> As annoying as it may be, I think having a configure script or something
> similar is the only right answer. More hidden makefile variables and
> hacks makes everything more complicated. Before the existence of the
> configure script Xen's build system was a huge pain to work with. Its
> still not perfect.
>
> So here are 2 proposals:
>
> Add a configure.ac to stubdom. I can whip up a simple one where you can
> enable/disable specific stub domains. Other options could be setting the
> fetch urls for the libraries. People can add more options later. Now if
> people disable vtpm, the check for cmake goes away.

I think I would like this best, with a simple configure.ac at the
top-level which has the absolute minimum boiler plate plus
"AC_CONFIG_SUBDIRS([tools stubdom])" (and eventually docs
too) to call down as appropriate and appropriate runes in autogen.sh to
regenerate everything in one go.

> Move /tools/configure.ac to /configure.ac. Use this configure script to
> configure the entire build. /Makefile still exists and works with or
> without configuring, to enable building of the hypervisor.

I think there was some sort of practical glitch which stopped us doing
this originally, but I can't remember what it was.

Or maybe it was just that it made it to easy to accidentally slip a
configure dependency into the hypervisor code.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Nov 29, 2012, 9:54 AM

Post #8 of 9 (467 views)
Permalink
Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile [In reply to]

Matthew Fioravante writes ("Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile"):
> Add a configure.ac to stubdom. I can whip up a simple one where you can
> enable/disable specific stub domains. Other options could be setting the
> fetch urls for the libraries. People can add more options later. Now if
> people disable vtpm, the check for cmake goes away.

This would be fine, if you feel like doing it.

> Move /tools/configure.ac to /configure.ac. Use this configure script to
> configure the entire build. /Makefile still exists and works with or
> without configuring, to enable building of the hypervisor.

That would also be OK by me but would need wider agreement.

> If we don't want to do this now, then I vote to just make cmake a
> dependency for Xen without adding messy conditional hacks.

We already have a number of things you can enable/disable with a
simple y/n in Config.mk. I don't see why adding one more would be a
problem.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


matthew.fioravante at jhuapl

Nov 29, 2012, 10:30 AM

Post #9 of 9 (469 views)
Permalink
Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile [In reply to]

On 11/29/2012 12:54 PM, Ian Jackson wrote:
> Matthew Fioravante writes ("Re: [PATCH VTPM v4 3/5] vtpm/vtpmmgr and required libs to stubdom/Makefile"):
>> Add a configure.ac to stubdom. I can whip up a simple one where you can
>> enable/disable specific stub domains. Other options could be setting the
>> fetch urls for the libraries. People can add more options later. Now if
>> people disable vtpm, the check for cmake goes away.
> This would be fine, if you feel like doing it.
>
>> Move /tools/configure.ac to /configure.ac. Use this configure script to
>> configure the entire build. /Makefile still exists and works with or
>> without configuring, to enable building of the hypervisor.
> That would also be OK by me but would need wider agreement.
>
>> If we don't want to do this now, then I vote to just make cmake a
>> dependency for Xen without adding messy conditional hacks.
> We already have a number of things you can enable/disable with a
> simple y/n in Config.mk. I don't see why adding one more would be a
> problem.
Maybe at some point they can all be moved into the configure script and
retired.
>
> Ian.
Attachments: smime.p7s (1.42 KB)

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.