mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
stubdom: Add autoconf
Stub domains now use autoconf to build. This configure script can enable or disable specific domains and also specify custom download locations for stubdom library packages. See ./configure --help for details. C and Caml are disabled by default. vtpm-stubdom is conditional on the presense of cmake. Rename vtpmmgrdom to vtpmmgr-stubdom Also update .*ignore Signed-off-by: Matthew Fioravante <matthew.fioravante@jhuapl.edu> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
e627fcdae7
commit
1f44053686
26 files changed
+4893
-79
No files matched your search
@@ -93,7 +93,10 @@ patches/tmp/*
|
|||||||
pristine-*
|
pristine-*
|
||||||
ref-*
|
ref-*
|
||||||
tmp-*
|
tmp-*
|
||||||
|
stubdom/autom4te.cache
|
||||||
stubdom/binutils-*
|
stubdom/binutils-*
|
||||||
|
stubdom/config.log
|
||||||
|
stubdom/config.status
|
||||||
stubdom/cross-root-*
|
stubdom/cross-root-*
|
||||||
stubdom/gcc-*
|
stubdom/gcc-*
|
||||||
stubdom/include
|
stubdom/include
|
||||||
@@ -123,6 +126,7 @@ tools/config.log
|
|||||||
tools/config.status
|
tools/config.status
|
||||||
tools/config.cache
|
tools/config.cache
|
||||||
config/Tools.mk
|
config/Tools.mk
|
||||||
|
config/Stubdom.mk
|
||||||
tools/blktap2/daemon/blktapctrl
|
tools/blktap2/daemon/blktapctrl
|
||||||
tools/blktap2/drivers/img2qcow
|
tools/blktap2/drivers/img2qcow
|
||||||
tools/blktap2/drivers/lock-util
|
tools/blktap2/drivers/lock-util
|
||||||
|
|||||||
@@ -89,7 +89,10 @@
|
|||||||
^pristine-.*$
|
^pristine-.*$
|
||||||
^ref-.*$
|
^ref-.*$
|
||||||
^tmp-.*$
|
^tmp-.*$
|
||||||
|
^stubdom/autom4te\.cache$
|
||||||
^stubdom/binutils-.*$
|
^stubdom/binutils-.*$
|
||||||
|
^stubdom/config\.log$
|
||||||
|
^stubdom/config\.status$
|
||||||
^stubdom/cross-root-.*$
|
^stubdom/cross-root-.*$
|
||||||
^stubdom/gcc-.*$
|
^stubdom/gcc-.*$
|
||||||
^stubdom/include$
|
^stubdom/include$
|
||||||
|
|||||||
@@ -2,3 +2,5 @@
|
|||||||
cd tools
|
cd tools
|
||||||
autoconf
|
autoconf
|
||||||
autoheader
|
autoheader
|
||||||
|
cd ../stubdom
|
||||||
|
autoconf
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
# Prefix and install folder
|
||||||
|
prefix := @prefix@
|
||||||
|
PREFIX := $(prefix)
|
||||||
|
exec_prefix := @exec_prefix@
|
||||||
|
libdir := @libdir@
|
||||||
|
LIBDIR := $(libdir)
|
||||||
|
|
||||||
|
# Path Programs
|
||||||
|
CMAKE := @CMAKE@
|
||||||
|
WGET := @WGET@ -c
|
||||||
|
|
||||||
|
# A debug build of stubdom? //FIXME: Someone make this do something
|
||||||
|
debug := @debug@
|
||||||
|
vtpm = @vtpm@
|
||||||
|
|
||||||
|
STUBDOM_TARGETS := @STUBDOM_TARGETS@
|
||||||
|
STUBDOM_BUILD := @STUBDOM_BUILD@
|
||||||
|
STUBDOM_INSTALL := @STUBDOM_INSTALL@
|
||||||
|
|
||||||
|
ZLIB_VERSION := @ZLIB_VERSION@
|
||||||
|
ZLIB_URL := @ZLIB_URL@
|
||||||
|
|
||||||
|
LIBPCI_VERSION := @LIBPCI_VERSION@
|
||||||
|
LIBPCI_URL := @LIBPCI_URL@
|
||||||
|
|
||||||
|
NEWLIB_VERSION := @NEWLIB_VERSION@
|
||||||
|
NEWLIB_URL := @NEWLIB_URL@
|
||||||
|
|
||||||
|
LWIP_VERSION := @LWIP_VERSION@
|
||||||
|
LWIP_URL := @LWIP_URL@
|
||||||
|
|
||||||
|
GRUB_VERSION := @GRUB_VERSION@
|
||||||
|
GRUB_URL := @GRUB_URL@
|
||||||
|
|
||||||
|
OCAML_VERSION := @OCAML_VERSION@
|
||||||
|
OCAML_URL := @OCAML_URL@
|
||||||
|
|
||||||
|
GMP_VERSION := @GMP_VERSION@
|
||||||
|
GMP_URL := @GMP_URL@
|
||||||
|
|
||||||
|
POLARSSL_VERSION := @POLARSSL_VERSION@
|
||||||
|
POLARSSL_URL := @POLARSSL_URL@
|
||||||
|
|
||||||
|
TPMEMU_VERSION := @TPMEMU_VERSION@
|
||||||
|
TPMEMU_URL := @TPMEMU_URL@
|
||||||
+17
-17
@@ -20,7 +20,7 @@ chain of trust rooted in the hardware TPM to virtual machines in Xen. Each
|
|||||||
major component of vTPM is implemented as a separate domain, providing secure
|
major component of vTPM is implemented as a separate domain, providing secure
|
||||||
separation guaranteed by the hypervisor. The vTPM domains are implemented in
|
separation guaranteed by the hypervisor. The vTPM domains are implemented in
|
||||||
mini-os to reduce memory and processor overhead.
|
mini-os to reduce memory and processor overhead.
|
||||||
|
|
||||||
This mini-os vTPM subsystem was built on top of the previous vTPM
|
This mini-os vTPM subsystem was built on top of the previous vTPM
|
||||||
work done by IBM and Intel corporation.
|
work done by IBM and Intel corporation.
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ The architecture of vTPM is described below:
|
|||||||
| mini-os/tpmback |
|
| mini-os/tpmback |
|
||||||
| | ^ |
|
| | ^ |
|
||||||
| v | |
|
| v | |
|
||||||
| vtpmmgrdom |
|
| vtpmmgr-stubdom |
|
||||||
| | ^ |
|
| | ^ |
|
||||||
| v | |
|
| v | |
|
||||||
| mini-os/tpm_tis |
|
| mini-os/tpm_tis |
|
||||||
@@ -72,7 +72,7 @@ The architecture of vTPM is described below:
|
|||||||
* mini-os/tpmback: Mini-os TPM backend driver. The Linux frontend driver
|
* mini-os/tpmback: Mini-os TPM backend driver. The Linux frontend driver
|
||||||
connects to this backend driver to facilitate
|
connects to this backend driver to facilitate
|
||||||
communications between the Linux DomU and its vTPM. This
|
communications between the Linux DomU and its vTPM. This
|
||||||
driver is also used by vtpmmgrdom to communicate with
|
driver is also used by vtpmmgr-stubdom to communicate with
|
||||||
vtpm-stubdom.
|
vtpm-stubdom.
|
||||||
|
|
||||||
* vtpm-stubdom: A mini-os stub domain that implements a vTPM. There is a
|
* vtpm-stubdom: A mini-os stub domain that implements a vTPM. There is a
|
||||||
@@ -82,20 +82,20 @@ The architecture of vTPM is described below:
|
|||||||
|
|
||||||
* mini-os/tpmfront: Mini-os TPM frontend driver. The vTPM mini-os domain
|
* mini-os/tpmfront: Mini-os TPM frontend driver. The vTPM mini-os domain
|
||||||
vtpm-stubdom uses this driver to communicate with
|
vtpm-stubdom uses this driver to communicate with
|
||||||
vtpmmgrdom. This driver could also be used separately to
|
vtpmmgr-stubdom. This driver could also be used separately to
|
||||||
implement a mini-os domain that wishes to use a vTPM of
|
implement a mini-os domain that wishes to use a vTPM of
|
||||||
its own.
|
its own.
|
||||||
|
|
||||||
* vtpmmgrdom: A mini-os domain that implements the vTPM manager.
|
* vtpmmgr-stubdom: A mini-os domain that implements the vTPM manager.
|
||||||
There is only one vTPM manager and it should be running during
|
There is only one vTPM manager and it should be running during
|
||||||
the entire lifetime of the machine. This domain regulates
|
the entire lifetime of the machine. This domain regulates
|
||||||
access to the physical TPM on the system and secures the
|
access to the physical TPM on the system and secures the
|
||||||
persistent state of each vTPM.
|
persistent state of each vTPM.
|
||||||
|
|
||||||
* mini-os/tpm_tis: Mini-os TPM version 1.2 TPM Interface Specification (TIS)
|
* mini-os/tpm_tis: Mini-os TPM version 1.2 TPM Interface Specification (TIS)
|
||||||
driver. This driver used by vtpmmgrdom to talk directly to
|
driver. This driver used by vtpmmgr-stubdom to talk directly to
|
||||||
the hardware TPM. Communication is facilitated by mapping
|
the hardware TPM. Communication is facilitated by mapping
|
||||||
hardware memory pages into vtpmmgrdom.
|
hardware memory pages into vtpmmgr-stubdom.
|
||||||
|
|
||||||
* Hardware TPM: The physical TPM that is soldered onto the motherboard.
|
* Hardware TPM: The physical TPM that is soldered onto the motherboard.
|
||||||
|
|
||||||
@@ -143,21 +143,21 @@ encrypted data. The image does not require a filesystem
|
|||||||
and can live anywhere on the host disk. The image does not need
|
and can live anywhere on the host disk. The image does not need
|
||||||
to be large. 8 to 16 Mb should be sufficient.
|
to be large. 8 to 16 Mb should be sufficient.
|
||||||
|
|
||||||
# dd if=/dev/zero of=/var/vtpmmgrdom.img bs=16M count=1
|
# dd if=/dev/zero of=/var/vtpmmgr-stubdom.img bs=16M count=1
|
||||||
|
|
||||||
Manager config file:
|
Manager config file:
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
The vTPM Manager domain (vtpmmgrdom) must be started like
|
The vTPM Manager domain (vtpmmgr-stubdom) must be started like
|
||||||
any other Xen virtual machine and requires a config file.
|
any other Xen virtual machine and requires a config file.
|
||||||
The manager requires a disk image for storage and permission
|
The manager requires a disk image for storage and permission
|
||||||
to access the hardware memory pages for the TPM. An
|
to access the hardware memory pages for the TPM. An
|
||||||
example configuration looks like the following.
|
example configuration looks like the following.
|
||||||
|
|
||||||
kernel="/usr/lib/xen/boot/vtpmmgrdom.gz"
|
kernel="/usr/lib/xen/boot/vtpmmgr-stubdom.gz"
|
||||||
memory=16
|
memory=16
|
||||||
disk=["file:/var/vtpmmgrdom.img,hda,w"]
|
disk=["file:/var/vtpmmgr-stubdom.img,hda,w"]
|
||||||
name="vtpmmgrdom"
|
name="vtpmmgr"
|
||||||
iomem=["fed40,5"]
|
iomem=["fed40,5"]
|
||||||
|
|
||||||
The iomem line tells xl to allow access to the TPM
|
The iomem line tells xl to allow access to the TPM
|
||||||
@@ -170,7 +170,7 @@ Starting and stopping the manager:
|
|||||||
The vTPM manager should be started at boot, you may wish to
|
The vTPM manager should be started at boot, you may wish to
|
||||||
create an init script to do this.
|
create an init script to do this.
|
||||||
|
|
||||||
# xl create -c vtpmmgrdom.cfg
|
# xl create -c vtpmmgr-stubdom.cfg
|
||||||
|
|
||||||
Once initialization is complete you should see the following:
|
Once initialization is complete you should see the following:
|
||||||
INFO[VTPM]: Waiting for commands from vTPM's:
|
INFO[VTPM]: Waiting for commands from vTPM's:
|
||||||
@@ -179,7 +179,7 @@ To shutdown the manager you must destroy it. To avoid data corruption,
|
|||||||
only destroy the manager when you see the above "Waiting for commands"
|
only destroy the manager when you see the above "Waiting for commands"
|
||||||
message. This ensures the disk is in a consistent state.
|
message. This ensures the disk is in a consistent state.
|
||||||
|
|
||||||
# xl destroy vtpmmgrdom
|
# xl destroy vtpmmgr-stubdom
|
||||||
|
|
||||||
------------------------------
|
------------------------------
|
||||||
VTPM AND LINUX PVM SETUP
|
VTPM AND LINUX PVM SETUP
|
||||||
@@ -211,10 +211,10 @@ kernel="/usr/lib/xen/boot/vtpm-stubdom.gz"
|
|||||||
memory=8
|
memory=8
|
||||||
disk=["file:/home/user/domu/vtpm.img,hda,w"]
|
disk=["file:/home/user/domu/vtpm.img,hda,w"]
|
||||||
name="domu-vtpm"
|
name="domu-vtpm"
|
||||||
vtpm=["backend=vtpmmgrdom,uuid=ac0a5b9e-cbe2-4c07-b43b-1d69e46fb839"]
|
vtpm=["backend=vtpmmgr,uuid=ac0a5b9e-cbe2-4c07-b43b-1d69e46fb839"]
|
||||||
|
|
||||||
The vtpm= line sets up the tpm frontend driver. The backend must set
|
The vtpm= line sets up the tpm frontend driver. The backend must set
|
||||||
to vtpmmgrdom. You are required to generate a uuid for this vtpm.
|
to vtpmmgr. You are required to generate a uuid for this vtpm.
|
||||||
You can use the uuidgen unix program or some other method to create a
|
You can use the uuidgen unix program or some other method to create a
|
||||||
uuid. The uuid uniquely identifies this vtpm to manager.
|
uuid. The uuid uniquely identifies this vtpm to manager.
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ The version command should return the following:
|
|||||||
|
|
||||||
You should also see the command being sent to the vtpm console as well
|
You should also see the command being sent to the vtpm console as well
|
||||||
as the vtpm saving its state. You should see the vtpm key being
|
as the vtpm saving its state. You should see the vtpm key being
|
||||||
encrypted and stored on the vtpmmgrdom console.
|
encrypted and stored on the vtpmmgr console.
|
||||||
|
|
||||||
To shutdown the guest and its vtpm, you just have to shutdown the guest
|
To shutdown the guest and its vtpm, you just have to shutdown the guest
|
||||||
normally. As soon as the guest vm disconnects, the vtpm will shut itself
|
normally. As soon as the guest vm disconnects, the vtpm will shut itself
|
||||||
|
|||||||
File renamed without changes.
@@ -0,0 +1,15 @@
|
|||||||
|
|
||||||
|
AC_DEFUN([AX_DEPENDS_PATH_PROG], [
|
||||||
|
AS_IF([test "x$$1" = "xy"], [AX_PATH_PROG_OR_FAIL([$2], [$3])], [
|
||||||
|
AS_IF([test "x$$1" = "xn"], [
|
||||||
|
$2="/$3-disabled-in-configure-script"
|
||||||
|
], [
|
||||||
|
AC_PATH_PROG([$2], [$3], [no])
|
||||||
|
AS_IF([test x"${$2}" = "xno"], [
|
||||||
|
$1=n
|
||||||
|
$2="/$3-disabled-in-configure-script"
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
AC_SUBST($2)
|
||||||
|
])
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,96 @@
|
|||||||
|
AC_DEFUN([AX_STUBDOM_DEFAULT_ENABLE], [
|
||||||
|
AC_ARG_ENABLE([$1],
|
||||||
|
AS_HELP_STRING([--disable-$1], [Build and install $1 (default is ENABLED)]),[
|
||||||
|
AX_STUBDOM_INTERNAL([$1], [$2])
|
||||||
|
],[
|
||||||
|
AX_ENABLE_STUBDOM([$1], [$2])
|
||||||
|
])
|
||||||
|
AC_SUBST([$2])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_STUBDOM_DEFAULT_DISABLE], [
|
||||||
|
AC_ARG_ENABLE([$1],
|
||||||
|
AS_HELP_STRING([--enable-$1], [Build and install $1 (default is DISABLED)]),[
|
||||||
|
AX_STUBDOM_INTERNAL([$1], [$2])
|
||||||
|
],[
|
||||||
|
AX_DISABLE_STUBDOM([$1], [$2])
|
||||||
|
])
|
||||||
|
AC_SUBST([$2])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_STUBDOM_CONDITIONAL], [
|
||||||
|
AC_ARG_ENABLE([$1],
|
||||||
|
AS_HELP_STRING([--enable-$1], [Build and install $1]),[
|
||||||
|
AX_STUBDOM_INTERNAL([$1], [$2])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_STUBDOM_CONDITIONAL_FINISH], [
|
||||||
|
AS_IF([test "x$$2" = "xy" || test "x$$2" = "x"], [
|
||||||
|
AX_ENABLE_STUBDOM([$1],[$2])
|
||||||
|
],[
|
||||||
|
AX_DISABLE_STUBDOM([$1],[$2])
|
||||||
|
])
|
||||||
|
AC_SUBST([$2])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_STUBDOM_AUTO_DEPENDS], [
|
||||||
|
AS_IF([test "x$$1" = "x" && test "x$$2" = "xn"], [
|
||||||
|
$1="n"
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
AC_DEFUN([AX_ENABLE_STUBDOM], [
|
||||||
|
$2=y
|
||||||
|
STUBDOM_TARGETS="$STUBDOM_TARGETS $2"
|
||||||
|
STUBDOM_BUILD="$STUBDOM_BUILD $1"
|
||||||
|
STUBDOM_INSTALL="$STUBDOM_INSTALL install-$2"
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_DISABLE_STUBDOM], [
|
||||||
|
$2=n
|
||||||
|
])
|
||||||
|
|
||||||
|
dnl Don't call this outside of this file
|
||||||
|
AC_DEFUN([AX_STUBDOM_INTERNAL], [
|
||||||
|
AS_IF([test "x$enableval" = "xyes"], [
|
||||||
|
AX_ENABLE_STUBDOM([$1], [$2])
|
||||||
|
],[
|
||||||
|
AS_IF([test "x$enableval" = "xno"],[
|
||||||
|
AX_DISABLE_STUBDOM([$1], [$2])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_STUBDOM_FINISH], [
|
||||||
|
AC_SUBST(STUBDOM_TARGETS)
|
||||||
|
AC_SUBST(STUBDOM_BUILD)
|
||||||
|
AC_SUBST(STUBDOM_INSTALL)
|
||||||
|
echo "Will build the following stub domains:"
|
||||||
|
for x in $STUBDOM_BUILD; do
|
||||||
|
echo " $x"
|
||||||
|
done
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_STUBDOM_LIB], [
|
||||||
|
AC_ARG_VAR([$1_URL], [Download url for $2])
|
||||||
|
AS_IF([test "x$$1_URL" = "x"], [
|
||||||
|
AS_IF([test "x$extfiles" = "xy"],
|
||||||
|
[$1_URL=\@S|@\@{:@XEN_EXTFILES_URL\@:}@],
|
||||||
|
[$1_URL="$4"])
|
||||||
|
])
|
||||||
|
$1_VERSION="$3"
|
||||||
|
AC_SUBST($1_URL)
|
||||||
|
AC_SUBST($1_VERSION)
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_DEFUN([AX_STUBDOM_LIB_NOEXT], [
|
||||||
|
AC_ARG_VAR([$1_URL], [Download url for $2])
|
||||||
|
AS_IF([test "x$$1_URL" = "x"], [
|
||||||
|
$1_URL="$4"
|
||||||
|
])
|
||||||
|
$1_VERSION="$3"
|
||||||
|
AC_SUBST($1_URL)
|
||||||
|
AC_SUBST($1_VERSION)
|
||||||
|
])
|
||||||
File renamed without changes.
+18
-46
@@ -6,44 +6,7 @@ export XEN_OS=MiniOS
|
|||||||
export stubdom=y
|
export stubdom=y
|
||||||
export debug=y
|
export debug=y
|
||||||
include $(XEN_ROOT)/Config.mk
|
include $(XEN_ROOT)/Config.mk
|
||||||
|
-include $(XEN_ROOT)/config/Stubdom.mk
|
||||||
#ZLIB_URL?=http://www.zlib.net
|
|
||||||
ZLIB_URL=$(XEN_EXTFILES_URL)
|
|
||||||
ZLIB_VERSION=1.2.3
|
|
||||||
|
|
||||||
#LIBPCI_URL?=http://www.kernel.org/pub/software/utils/pciutils
|
|
||||||
LIBPCI_URL?=$(XEN_EXTFILES_URL)
|
|
||||||
LIBPCI_VERSION=2.2.9
|
|
||||||
|
|
||||||
#NEWLIB_URL?=ftp://sources.redhat.com/pub/newlib
|
|
||||||
NEWLIB_URL?=$(XEN_EXTFILES_URL)
|
|
||||||
NEWLIB_VERSION=1.16.0
|
|
||||||
|
|
||||||
#LWIP_URL?=http://download.savannah.gnu.org/releases/lwip
|
|
||||||
LWIP_URL?=$(XEN_EXTFILES_URL)
|
|
||||||
LWIP_VERSION=1.3.0
|
|
||||||
|
|
||||||
#GRUB_URL?=http://alpha.gnu.org/gnu/grub
|
|
||||||
GRUB_URL?=$(XEN_EXTFILES_URL)
|
|
||||||
GRUB_VERSION=0.97
|
|
||||||
|
|
||||||
#OCAML_URL?=$(XEN_EXTFILES_URL)
|
|
||||||
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)
|
GNU_TARGET_ARCH:=$(XEN_TARGET_ARCH)
|
||||||
ifeq ($(XEN_TARGET_ARCH),x86_32)
|
ifeq ($(XEN_TARGET_ARCH),x86_32)
|
||||||
@@ -86,12 +49,12 @@ TARGET_CPPFLAGS += -I$(XEN_ROOT)/xen/include
|
|||||||
|
|
||||||
TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
|
TARGET_LDFLAGS += -nostdlib -L$(CROSS_PREFIX)/$(GNU_TARGET_ARCH)-xen-elf/lib
|
||||||
|
|
||||||
TARGETS=ioemu c caml grub xenstore vtpm vtpmmgr
|
TARGETS=$(STUBDOM_TARGETS)
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: build
|
all: build
|
||||||
ifeq ($(STUBDOM_SUPPORTED),1)
|
ifeq ($(STUBDOM_SUPPORTED),1)
|
||||||
build: genpath ioemu-stubdom c-stubdom pv-grub xenstore-stubdom
|
build: genpath $(STUBDOM_BUILD)
|
||||||
else
|
else
|
||||||
build: genpath
|
build: genpath
|
||||||
endif
|
endif
|
||||||
@@ -241,11 +204,12 @@ tpm_emulator-$(TPMEMU_VERSION).tar.gz:
|
|||||||
$(WGET) $(TPMEMU_URL)/$@
|
$(WGET) $(TPMEMU_URL)/$@
|
||||||
|
|
||||||
tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz
|
tpm_emulator-$(XEN_TARGET_ARCH): tpm_emulator-$(TPMEMU_VERSION).tar.gz
|
||||||
|
@if [ ! -f "$(CMAKE)" ]; then echo "cmake not installed! Install it and then rerun ./configure!"; false; fi
|
||||||
tar xzf $<
|
tar xzf $<
|
||||||
mv tpm_emulator-$(TPMEMU_VERSION) $@
|
mv tpm_emulator-$(TPMEMU_VERSION) $@
|
||||||
patch -d $@ -p1 < tpmemu-$(TPMEMU_VERSION).patch;
|
patch -d $@ -p1 < tpmemu-$(TPMEMU_VERSION).patch;
|
||||||
mkdir $@/build
|
mkdir $@/build
|
||||||
cd $@/build; CC=${CC} cmake .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
|
cd $@/build; CC=${CC} $(CMAKE) .. -DCMAKE_C_FLAGS:STRING="-std=c99 -DTPM_NO_EXTERN $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) -Wno-declaration-after-statement"
|
||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
TPMEMU_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm.a
|
TPMEMU_STAMPFILE=$(CROSS_ROOT)/$(GNU_TARGET_ARCH)-xen-elf/lib/libtpm.a
|
||||||
@@ -466,8 +430,8 @@ c-stubdom: mini-os-$(XEN_TARGET_ARCH)-c lwip-$(XEN_TARGET_ARCH) libxc c
|
|||||||
vtpm-stubdom: mini-os-$(XEN_TARGET_ARCH)-vtpm vtpm
|
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"
|
||||||
|
|
||||||
.PHONY: vtpmmgrdom
|
.PHONY: vtpmmgr-stubdom
|
||||||
vtpmmgrdom: mini-os-$(XEN_TARGET_ARCH)-vtpmmgr vtpmmgr
|
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"
|
||||||
|
|
||||||
.PHONY: pv-grub
|
.PHONY: pv-grub
|
||||||
@@ -483,7 +447,7 @@ xenstore-stubdom: mini-os-$(XEN_TARGET_ARCH)-xenstore libxc xenstore
|
|||||||
#########
|
#########
|
||||||
|
|
||||||
ifeq ($(STUBDOM_SUPPORTED),1)
|
ifeq ($(STUBDOM_SUPPORTED),1)
|
||||||
install: genpath install-readme install-ioemu install-grub install-xenstore
|
install: genpath install-readme $(STUBDOM_INSTALL)
|
||||||
else
|
else
|
||||||
install: genpath
|
install: genpath
|
||||||
endif
|
endif
|
||||||
@@ -503,6 +467,8 @@ install-grub: pv-grub
|
|||||||
$(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
|
$(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
|
||||||
$(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-grub/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/pv-grub-$(XEN_TARGET_ARCH).gz"
|
$(INSTALL_DATA) mini-os-$(XEN_TARGET_ARCH)-grub/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/pv-grub-$(XEN_TARGET_ARCH).gz"
|
||||||
|
|
||||||
|
install-caml: caml-stubdom
|
||||||
|
|
||||||
install-xenstore: xenstore-stubdom
|
install-xenstore: xenstore-stubdom
|
||||||
$(INSTALL_DIR) "$(DESTDIR)/usr/lib/xen/boot"
|
$(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_DATA) mini-os-$(XEN_TARGET_ARCH)-xenstore/mini-os.gz "$(DESTDIR)/usr/lib/xen/boot/xenstore-stubdom.gz"
|
||||||
@@ -511,9 +477,9 @@ install-vtpm: vtpm-stubdom
|
|||||||
$(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
|
$(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
|
||||||
$(INSTALL_PROG) mini-os-$(XEN_TARGET_ARCH)-vtpm/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/vtpm-stubdom.gz"
|
$(INSTALL_PROG) mini-os-$(XEN_TARGET_ARCH)-vtpm/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/vtpm-stubdom.gz"
|
||||||
|
|
||||||
install-vtpmmgr: vtpm-stubdom
|
install-vtpmmgr: vtpmmgr-stubdom
|
||||||
$(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
|
$(INSTALL_DIR) "$(DESTDIR)$(XENFIRMWAREDIR)"
|
||||||
$(INSTALL_PROG) mini-os-$(XEN_TARGET_ARCH)-vtpmmgr/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/vtpmmgrdom.gz"
|
$(INSTALL_PROG) mini-os-$(XEN_TARGET_ARCH)-vtpmmgr/mini-os.gz "$(DESTDIR)$(XENFIRMWAREDIR)/vtpmmgr-stubdom.gz"
|
||||||
|
|
||||||
#######
|
#######
|
||||||
# clean
|
# clean
|
||||||
@@ -581,3 +547,9 @@ downloadclean: patchclean
|
|||||||
|
|
||||||
.PHONY: distclean
|
.PHONY: distclean
|
||||||
distclean: downloadclean
|
distclean: downloadclean
|
||||||
|
-rm ../config/Stubdom.mk
|
||||||
|
|
||||||
|
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
|
||||||
|
$(XEN_ROOT)/config/Stubdom.mk:
|
||||||
|
$(error You have to run ./configure before building or installing stubdom)
|
||||||
|
endif
|
||||||
+4616
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,61 @@
|
|||||||
|
# -*- Autoconf -*-
|
||||||
|
# Process this file with autoconf to produce a configure script.
|
||||||
|
|
||||||
|
AC_PREREQ([2.67])
|
||||||
|
AC_INIT([Xen Hypervisor Stub Domains], m4_esyscmd([../version.sh ../xen/Makefile]),
|
||||||
|
[xen-devel@lists.xen.org], [xen], [http://www.xen.org/])
|
||||||
|
AC_CONFIG_SRCDIR([../extras/mini-os/kernel.c])
|
||||||
|
AC_CONFIG_FILES([../config/Stubdom.mk])
|
||||||
|
AC_PREFIX_DEFAULT([/usr])
|
||||||
|
AC_CONFIG_AUX_DIR([../])
|
||||||
|
|
||||||
|
# M4 Macro includes
|
||||||
|
m4_include([../m4/stubdom.m4])
|
||||||
|
m4_include([../m4/features.m4])
|
||||||
|
m4_include([../m4/path_or_fail.m4])
|
||||||
|
m4_include([../m4/depends.m4])
|
||||||
|
|
||||||
|
# Enable/disable stub domains
|
||||||
|
AX_STUBDOM_DEFAULT_ENABLE([ioemu-stubdom], [ioemu])
|
||||||
|
AX_STUBDOM_DEFAULT_DISABLE([c-stubdom], [c])
|
||||||
|
AX_STUBDOM_DEFAULT_DISABLE([caml-stubdom], [caml])
|
||||||
|
AX_STUBDOM_DEFAULT_ENABLE([pv-grub], [grub])
|
||||||
|
AX_STUBDOM_DEFAULT_ENABLE([xenstore-stubdom], [xenstore])
|
||||||
|
AX_STUBDOM_CONDITIONAL([vtpm-stubdom], [vtpm])
|
||||||
|
AX_STUBDOM_CONDITIONAL([vtpmmgr-stubdom], [vtpmmgr])
|
||||||
|
|
||||||
|
AX_ARG_DEFAULT_ENABLE([debug], [Disable debug build of stubdom])
|
||||||
|
AX_ARG_DEFAULT_ENABLE([extfiles], [Use xen extfiles repository for libraries])
|
||||||
|
|
||||||
|
AC_ARG_VAR([CMAKE], [Path to the cmake program])
|
||||||
|
AC_ARG_VAR([WGET], [Path to wget program])
|
||||||
|
|
||||||
|
# Checks for programs.
|
||||||
|
AC_PROG_CC
|
||||||
|
AC_PROG_MAKE_SET
|
||||||
|
AC_PROG_INSTALL
|
||||||
|
AX_PATH_PROG_OR_FAIL([WGET], [wget])
|
||||||
|
|
||||||
|
# Checks for programs that depend on a feature
|
||||||
|
AX_DEPENDS_PATH_PROG([vtpm], [CMAKE], [cmake])
|
||||||
|
|
||||||
|
# Stubdom libraries version and url setup
|
||||||
|
AX_STUBDOM_LIB([ZLIB], [zlib], [1.2.3], [http://www.zlib.net])
|
||||||
|
AX_STUBDOM_LIB([LIBPCI], [libpci], [2.2.9], [http://www.kernel.org/pub/software/utils/pciutils])
|
||||||
|
AX_STUBDOM_LIB([NEWLIB], [newlib], [1.16.0], [ftp://sources.redhat.com/pub/newlib])
|
||||||
|
AX_STUBDOM_LIB([LWIP], [lwip], [1.3.0], [http://download.savannah.gnu.org/releases/lwip])
|
||||||
|
AX_STUBDOM_LIB([GRUB], [grub], [0.97], [http://alpha.gnu.org/gnu/grub])
|
||||||
|
AX_STUBDOM_LIB_NOEXT([OCAML], [ocaml], [3.11.0], [http://caml.inria.fr/pub/distrib/ocaml-3.11])
|
||||||
|
AX_STUBDOM_LIB([GMP], [libgmp], [4.3.2], [ftp://ftp.gmplib.org/pub/gmp-4.3.2])
|
||||||
|
AX_STUBDOM_LIB([POLARSSL], [polarssl], [1.1.4], [http://polarssl.org/code/releases])
|
||||||
|
AX_STUBDOM_LIB([TPMEMU], [berlios tpm emulator], [0.7.4], [http://download.berlios.de/tpm-emulator])
|
||||||
|
|
||||||
|
#These stubdoms should be enabled if the dependent one is
|
||||||
|
AX_STUBDOM_AUTO_DEPENDS([vtpmmgr], [vtpm])
|
||||||
|
|
||||||
|
#Conditionally enable these stubdoms based on the presense of dependencies
|
||||||
|
AX_STUBDOM_CONDITIONAL_FINISH([vtpm-stubdom], [vtpm])
|
||||||
|
AX_STUBDOM_CONDITIONAL_FINISH([vtpmmgr-stubdom], [vtpmmgr])
|
||||||
|
|
||||||
|
AX_STUBDOM_FINISH
|
||||||
|
AC_OUTPUT()
|
||||||
@@ -4,7 +4,7 @@ November 12 2012
|
|||||||
Authors: Matthew Fioravante (JHUAPL),
|
Authors: Matthew Fioravante (JHUAPL),
|
||||||
|
|
||||||
This document describes the operation and command line interface
|
This document describes the operation and command line interface
|
||||||
of vtpmmgrdom. See docs/misc/vtpm.txt for details on the
|
of vtpmmgr-stubdom. See docs/misc/vtpm.txt for details on the
|
||||||
vTPM subsystem as a whole.
|
vTPM subsystem as a whole.
|
||||||
|
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ vTPM subsystem as a whole.
|
|||||||
OPERATION
|
OPERATION
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|
||||||
The vtpmmgrdom implements a vTPM manager who has two major functions:
|
The vtpmmgr-stubdom implements a vTPM manager who has two major functions:
|
||||||
|
|
||||||
- Securely store encryption keys for each of the vTPMS
|
- Securely store encryption keys for each of the vTPMS
|
||||||
- Regulate access to the hardware TPM for the entire system
|
- Regulate access to the hardware TPM for the entire system
|
||||||
|
|||||||
+14
-14
@@ -22,20 +22,20 @@ APPEND_INCLUDES and APPEND_LIB instead when possible.])
|
|||||||
AC_CANONICAL_HOST
|
AC_CANONICAL_HOST
|
||||||
|
|
||||||
# M4 Macro includes
|
# M4 Macro includes
|
||||||
m4_include([m4/savevar.m4])
|
m4_include([../m4/savevar.m4])
|
||||||
m4_include([m4/features.m4])
|
m4_include([../m4/features.m4])
|
||||||
m4_include([m4/path_or_fail.m4])
|
m4_include([../m4/path_or_fail.m4])
|
||||||
m4_include([m4/python_version.m4])
|
m4_include([../m4/python_version.m4])
|
||||||
m4_include([m4/python_devel.m4])
|
m4_include([../m4/python_devel.m4])
|
||||||
m4_include([m4/ocaml.m4])
|
m4_include([../m4/ocaml.m4])
|
||||||
m4_include([m4/set_cflags_ldflags.m4])
|
m4_include([../m4/set_cflags_ldflags.m4])
|
||||||
m4_include([m4/uuid.m4])
|
m4_include([../m4/uuid.m4])
|
||||||
m4_include([m4/pkg.m4])
|
m4_include([../m4/pkg.m4])
|
||||||
m4_include([m4/curses.m4])
|
m4_include([../m4/curses.m4])
|
||||||
m4_include([m4/pthread.m4])
|
m4_include([../m4/pthread.m4])
|
||||||
m4_include([m4/ptyfuncs.m4])
|
m4_include([../m4/ptyfuncs.m4])
|
||||||
m4_include([m4/extfs.m4])
|
m4_include([../m4/extfs.m4])
|
||||||
m4_include([m4/fetcher.m4])
|
m4_include([../m4/fetcher.m4])
|
||||||
|
|
||||||
# Enable/disable options
|
# Enable/disable options
|
||||||
AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
|
AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP])
|
||||||
|
|||||||