ia64/xen-unstable

view tools/vtpm/Makefile @ 19731:01748ccc4da3

Intel VT-d: fix Stoakley boot issue with iommu=1

Signed-off-by: Weidong Han <Weidong.han@intel.com>
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Jun 05 09:25:50 2009 +0100 (2009-06-05)
parents 59d511c4a8d8
children
line source
1 XEN_ROOT = ../..
3 # Base definitions and rules
4 include $(XEN_ROOT)/tools/vtpm/Rules.mk
6 # Dir name for emulator (as dom0 tpm driver)
7 TPM_EMULATOR_DIR = tpm_emulator
8 # Dir name for vtpm instance
9 VTPM_DIR = vtpm
10 ORIG_DIR = orig
12 # Emulator tarball name
13 TPM_EMULATOR_NAME = tpm_emulator-0.4
14 TPM_EMULATOR_TARFILE = $(TPM_EMULATOR_NAME).tar.gz
16 GMP_HEADER = /usr/include/gmp.h
18 .PHONY: all
19 all: build
21 .PHONY: build
22 build: $(VTPM_DIR) $(TPM_EMULATOR_DIR) build_sub
24 .PHONY: install
25 install: build
26 if [ "$(BUILD_EMULATOR)" = "y" ]; then \
27 $(MAKE) -C $(TPM_EMULATOR_DIR) $@ ;\
28 fi
29 $(MAKE) -C $(VTPM_DIR) $@
31 .PHONY: clean
32 clean:
33 @if [ -d $(TPM_EMULATOR_DIR) ]; \
34 then $(MAKE) -C $(TPM_EMULATOR_DIR) clean; \
35 fi
36 @if [ -d $(VTPM_DIR) ]; \
37 then $(MAKE) -C $(VTPM_DIR) clean; \
38 fi
40 .PHONY: mrproper
41 mrproper:
42 rm -f $(TPM_EMULATOR_TARFILE) tpm_emulator.patch.old vtpm.patch.old
43 rm -rf $(TPM_EMULATOR_DIR) $(VTPM_DIR) $(ORIG_DIR)
45 # Download Swiss emulator
46 $(TPM_EMULATOR_TARFILE):
47 wget http://download.berlios.de/tpm-emulator/$(TPM_EMULATOR_TARFILE)
49 # Create vtpm and TPM emulator dirs
50 # apply patches for 1) used as dom0 tpm driver 2) used as vtpm device instance
51 $(TPM_EMULATOR_DIR): $(TPM_EMULATOR_TARFILE) tpm_emulator.patch
52 set -e; if [ "$(BUILD_EMULATOR)" = "y" ]; then \
53 rm -rf $(TPM_EMULATOR_DIR); \
54 tar -xzf $(TPM_EMULATOR_TARFILE); \
55 mv $(TPM_EMULATOR_NAME) $(TPM_EMULATOR_DIR); \
56 cd $(TPM_EMULATOR_DIR); \
57 patch -p1 <../tpm_emulator.patch; \
58 fi
60 $(VTPM_DIR): $(TPM_EMULATOR_TARFILE) vtpm.patch
61 rm -rf $(VTPM_DIR)
62 tar -xzf $(TPM_EMULATOR_TARFILE)
63 mv $(TPM_EMULATOR_NAME) $(VTPM_DIR)
65 set -e; cd $(VTPM_DIR); \
66 patch -p1 < ../tpm_emulator.patch; \
67 patch -p1 < ../vtpm.patch
69 orig: $(TPM_EMULATOR_TARFILE)
70 mkdir $(ORIG_DIR);
71 set -e; cd $(ORIG_DIR); \
72 tar -xzf ../$(TPM_EMULATOR_TARFILE);
74 updatepatches: clean orig
75 set -e; if [ "$(BUILD_EMULATOR)" = "y" ]; then \
76 find $(TPM_EMULATOR_DIR) -name "*.orig" -print | xargs rm -f; \
77 mv tpm_emulator.patch tpm_emulator.patch.old; \
78 diff -uprN orig/$(TPM_EMULATOR_NAME) $(TPM_EMULATOR_DIR) > tpm_emulator.patch || true; \
79 fi;
80 find $(VTPM_DIR) -name "*.orig" -print | xargs rm -f;
81 mv vtpm.patch vtpm.patch.old;
82 diff -uprN $(TPM_EMULATOR_DIR) $(VTPM_DIR) > vtpm.patch || true;
84 .PHONY: build_sub
85 build_sub:
86 set -e; if [ -e $(GMP_HEADER) ]; then \
87 $(MAKE) -C $(VTPM_DIR); \
88 if [ "$(BUILD_EMULATOR)" = "y" ]; then \
89 $(MAKE) -C $(TPM_EMULATOR_DIR); \
90 fi \
91 else \
92 echo "=== Unable to build VTPMs. libgmp could not be found."; \
93 fi