Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


added seastar memory mapping
[palacios.git] / build / Makefile
1 # Top level Makefile for V3Vee
2 #
3 #  Northwestern University 
4 # (c) 2008, Jack Lange <jarusl@cs.northwestern.edu>
5 # (c) 2008, Peter Dinda <pdinda@northwestern.edu> 
6 # (c) 2008, Lei Xia <xiaxlei@gmail.com>
7 # (c) 2008, The V3VEE Project <http://www.v3vee.org> 
8 #
9 # Required software to build V3Vee:
10 # - GNU Make (http://www.gnu.org/software/make)
11 # - nasm (http://nasm.sourceforge.net)
12 # - Perl5, AWK (any version), egrep
13 #
14
15
16
17
18
19
20 PROJECT_ROOT := ..
21 PALACIOS_BUILD_DIR := $(PROJECT_ROOT)/palacios/build
22 GEEKOS_BUILD_DIR := $(PROJECT_ROOT)/geekos/build
23 GUEST_ISO_DIR := /opt/vmm-tools/isos
24
25 # List of targets to build by default.
26 # These targets encompass everything needed to boot
27 # and run GeekOS.
28 ALL_TARGETS := geekos-full
29
30 QEMU := /usr/local/qemu/bin/qemu-system-x86_64
31
32
33
34 #when -DNDEBUG is set the kassert functions are disabled
35 #JRLDEBUG=-DNDEBUG
36
37 # DEBUG=1 means VMM_DEBUG, VMM_INFO, and VMM_TRACE are enabled
38 # as are SERIAL_PRINT_DEBUG
39
40 DEBUG_SECTIONS := DEBUG=1
41
42 ifeq ($(DEBUG_ALL),1)
43   DEBUG_SECTIONS:= $(DEBUG_SECTIONS) DEBUG_ALL=1
44 endif
45
46 ifeq ($(DEBUG_SHADOW_PAGING),1)
47 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_SHADOW_PAGING=1
48 else 
49 ifeq ($(DEBUG_SHADOW_PAGING),0) 
50 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_SHADOW_PAGING=0
51 endif
52 endif
53
54 ifeq ($(DEBUG_CTRL_REGS),1)
55 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_CTRL_REGS=1
56 else 
57 ifeq ($(DEBUG_CTRL_REGS),0) 
58 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_CTRL_REGS=0
59 endif
60 endif
61
62 ifeq ($(DEBUG_INTERRUPTS),1)
63 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_INTERRUPTS=1
64 else 
65 ifeq ($(DEBUG_INTERRUPTS),0) 
66 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_INTERRUPTS=0
67 endif
68 endif
69
70 ifeq ($(DEBUG_IO),1)
71 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_IO=1
72 else 
73 ifeq ($(DEBUG_IO),0) 
74 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_IO=0
75 endif
76 endif
77
78 ifeq ($(DEBUG_KEYBOARD),1)
79 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_KEYBOARD=1
80 else 
81 ifeq ($(DEBUG_KEYBOARD),0) 
82 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_KEYBOARD=0
83 endif
84 endif
85
86 ifeq ($(DEBUG_PIC),1)
87 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PIC=1
88 else 
89 ifeq ($(DEBUG_PIC),0) 
90 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PIC=0
91 endif
92 endif
93
94 ifeq ($(DEBUG_PIT),1)
95 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PIT=1
96 else 
97 ifeq ($(DEBUG_PIT),0) 
98 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_PIT=0
99 endif
100 endif
101
102 ifeq ($(DEBUG_NVRAM),1)
103 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_NVRAM=1
104 else 
105 ifeq ($(DEBUG_NVRAM),0) 
106 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_NVRAM=0
107 endif
108 endif
109
110 ifeq ($(DEBUG_GENERIC),1)
111 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_GENERIC=1
112 else 
113 ifeq ($(DEBUG_GENERIC),0) 
114 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_GENERIC=0
115 endif
116 endif
117
118 ifeq ($(DEBUG_EMULATOR),1)
119 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_EMULATOR=1
120 else 
121 ifeq ($(DEBUG_EMULATOR),0) 
122 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_EMULATOR=0
123 endif
124 endif
125
126 ifeq ($(DEBUG_RAMDISK),1)
127 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_RAMDISK=1
128 else 
129 ifeq ($(DEBUG_RAMDISK),0) 
130 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_RAMDISK=0
131 endif
132 endif
133
134 ifeq ($(DEBUG_XED),1)
135 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_XED=1
136 else 
137 ifeq ($(DEBUG_XED),0) 
138 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_XED=0
139 endif
140 endif
141
142 ifeq ($(DEBUG_HALT),1)
143 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_HALT=1
144 else 
145 ifeq ($(DEBUG_HALT),0) 
146 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_HALT=0
147 endif
148 endif
149
150 ifeq ($(DEBUG_DEV_MGR),1)
151 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_DEV_MGR=1
152 else 
153 ifeq ($(DEBUG_DEV_MGR),0) 
154 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_DEV_MGR=0
155 endif
156 endif
157
158 ifeq ($(DEBUG_APIC),1)
159 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_APIC=1
160 else 
161 ifeq ($(DEBUG_APIC),0) 
162 DEBUG_SECTIONS := $(DEBUG_SECTIONS) DEBUG_APIC=0
163 endif
164 endif
165
166
167 ifeq ($(PROFILE_VMM),1)
168   GEEKOS_FLAGS:= $(GEEKOS_FLAGS) PROFILE_VMM=1
169 endif
170
171 ifeq ($(INSTRUMENT_VMM),1)
172   GEEKOS_FLAGS:= $(GEEKOS_FLAGS) INSTRUMENT_VMM=1
173 endif
174
175
176
177 # ----------------------------------------------------------------------
178 # Targets -
179 #   Specifies files to be built
180 # ----------------------------------------------------------------------
181
182 # Default target - see definition of ALL_TARGETS in Configuration section
183 all : $(ALL_TARGETS)
184
185
186 palacios64:
187         (cd $(PALACIOS_BUILD_DIR) && make ARCH=64 $(DEBUG_SECTIONS))
188
189 palacios32:
190         (cd $(PALACIOS_BUILD_DIR) && make $(DEBUG_SECTIONS))
191
192
193 palacios-full32:
194         (cd $(PALACIOS_BUILD_DIR) && make $(DEBUG_SECTIONS) world)
195
196 palacios-full64:
197         (cd $(PALACIOS_BUILD_DIR) && make ARCH=64 $(DEBUG_SECTIONS) world)      
198
199 palacios-full-cray:
200         (cd $(PALACIOS_BUILD_DIR) && make V=1 ARCH=64 CRAY_XT=1 $(DEBUG_SECTIONS) world)        
201
202 palacios-lean:
203         (cd $(PALACIOS_BUILD_DIR) && make LEAN_AND_MEAN=1 world)
204
205
206
207 geekos: palacios32
208         cp $(PALACIOS_BUILD_DIR)/libv3vee.a $(GEEKOS_BUILD_DIR)/palacios/
209         cp $(PALACIOS_BUILD_DIR)/../lib/xed/libxed.a $(GEEKOS_BUILD_DIR)/palacios/
210         cp $(PALACIOS_BUILD_DIR)/vm_kernel $(GEEKOS_BUILD_DIR)/palacios/
211         (cd $(GEEKOS_BUILD_DIR) && make $(GEEKOS_FLAGS))
212
213
214 geekos-full: palacios-full32
215         cp $(PALACIOS_BUILD_DIR)/libv3vee.a $(GEEKOS_BUILD_DIR)/palacios/
216         cp $(PALACIOS_BUILD_DIR)/../lib/xed/libxed.a $(GEEKOS_BUILD_DIR)/palacios/
217         cp $(PALACIOS_BUILD_DIR)/vm_kernel $(GEEKOS_BUILD_DIR)/palacios/
218         (cd $(GEEKOS_BUILD_DIR) && make clean && make $(GEEKOS_FLAGS))
219
220
221 world: geekos-full palacios-full64
222
223 lean-and-mean: palacios-lean geekos-full
224
225
226
227 # make ready to boot over PXE
228 geekos-pxe: 
229         cp $(GEEKOS_BUILD_DIR)/vmm.img /tftpboot/vmm.img
230
231 geekos-run: 
232         $(QEMU) -m 1024 -serial file:serial.out -cdrom $(GUEST_ISO_DIR)/puppy.iso -fda $(GEEKOS_BUILD_DIR)/vmm.img 
233
234 geekos-iso: 
235         cp $(GEEKOS_BUILD_DIR)/vmm.img iso/vmm.img
236         mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -o test.iso iso
237
238
239
240 force:
241
242
243
244
245 # Clean build directories of generated files
246 clean :
247         for d in $(GEEKOS_BUILD_DIR) $(PALACIOS_BUILD_DIR); do \
248                 (cd $$d && make clean); \
249         done
250
251