VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk@ 60231

Last change on this file since 60231 was 60231, checked in by vboxsync, 9 years ago

bs3kit: updates

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 13.6 KB
Line 
1# $Id: Makefile.kmk 60231 2016-03-28 22:50:57Z vboxsync $
2## @file
3# VirtualBox Validation Kit - Bootsector Kit v3
4#
5
6#
7# Copyright (C) 2006-2016 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17# The contents of this file may alternatively be used under the terms
18# of the Common Development and Distribution License Version 1.0
19# (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20# VirtualBox OSE distribution, in which case the provisions of the
21# CDDL are applicable instead of those of the GPL.
22#
23# You may elect to license modified versions of this file under the
24# terms and conditions of either the GPL or the CDDL or both.
25#
26
27SUB_DEPTH = ../../../../..
28include $(KBUILD_PATH)/subheader.kmk
29
30
31
32# Boot Sector post-link tool (used via the parent Config.kmk).
33BLDPROGS += VBoxBs3Linker
34VBoxBs3Linker_TEMPLATE = VBoxBldProg
35VBoxBs3Linker_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3Linker.cpp
36
37
38# 64-bit relocation conversion tool (used via the parent Config.kmk).
39BLDPROGS += VBoxBs3ObjConverter
40VBoxBs3ObjConverter_TEMPLATE = VBoxAdvBldProg
41VBoxBs3ObjConverter_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3ObjConverter.cpp
42
43
44# The boot sector.
45MISCBINS += bs3-bootsector
46bs3-bootsector_TEMPLATE = VBoxBS3KitBS
47bs3-bootsector_SOURCES = bs3-bootsector.asm
48
49
50#
51# Common sources to be compiled into _p16, _p32 and _p64 versions.
52#
53VBOX_BS3KIT_COMMON_SOURCES = \
54 bs3-cmn-A20Disable.asm \
55 bs3-cmn-A20Enable.asm \
56 bs3-cmn-KbdRead.asm \
57 bs3-cmn-KbdWait.asm \
58 bs3-cmn-KbdWrite.asm \
59 bs3-cmn-Shutdown.asm \
60 bs3-cmn-Panic.asm \
61 bs3-cmn-PrintChr.asm \
62 bs3-cmn-Printf.c \
63 bs3-cmn-PrintU32.asm \
64 bs3-cmn-PrintX32.asm \
65 bs3-cmn-PrintStr.c \
66 bs3-cmn-PrintStrColonSpaces.asm \
67 bs3-cmn-PrintStrSpacesColonSpace.c \
68 bs3-cmn-StrFormatV.c \
69 bs3-cmn-StrPrintf.c \
70 bs3-cmn-StrLen.c \
71 bs3-cmn-StrNLen.c \
72 bs3-cmn-StrCpy.c \
73 bs3-cmn-MemCpy.c \
74 bs3-cmn-MemPCpy.c \
75 bs3-cmn-MemMove.c \
76 bs3-cmn-MemZero.asm \
77 bs3-cmn-MemAlloc.c \
78 bs3-cmn-MemAllocZ.c \
79 bs3-cmn-MemFree.c \
80 bs3-cmn-PagingData.c \
81 bs3-cmn-PagingInitRootForPP.c \
82 bs3-cmn-PagingInitRootForPAE.c \
83 bs3-cmn-PagingInitRootForLM.c \
84 bs3-cmn-PagingProtect.c \
85 bs3-cmn-RegCtxRestore.asm \
86 bs3-cmn-RegCtxConvertToRingX.c \
87 bs3-cmn-RegCtxPrint.c \
88 bs3-cmn-RegCtxSave.asm \
89 bs3-cmn-SelFar32ToFlat32.c \
90 bs3-cmn-SelProtFar32ToFlat32.c \
91 bs3-cmn-SlabInit.c \
92 bs3-cmn-SlabAlloc.c \
93 bs3-cmn-SlabAllocEx.c \
94 bs3-cmn-SlabFree.c \
95 bs3-cmn-SlabListInit.c \
96 bs3-cmn-SlabListAdd.c \
97 bs3-cmn-SlabListAlloc.c \
98 bs3-cmn-SlabListAllocEx.c \
99 bs3-cmn-SlabListFree.c \
100 bs3-cmn-SwitchToRing0.asm \
101 bs3-cmn-SwitchToRing1.asm \
102 bs3-cmn-SwitchToRing2.asm \
103 bs3-cmn-SwitchToRing3.asm \
104 bs3-cmn-SwitchToRingX.asm \
105 bs3-cmn-SwitchTo16Bit.asm \
106 bs3-cmn-SwitchTo16BitV86.asm \
107 bs3-cmn-SwitchTo32Bit.asm \
108 bs3-cmn-SwitchTo64Bit.asm \
109 bs3-cmn-Syscall.asm \
110 bs3-cmn-TestData.c \
111 bs3-cmn-TestInit.c \
112 bs3-cmn-TestFailed.c \
113 bs3-cmn-TestSkipped.c \
114 bs3-cmn-TestSub.c \
115 bs3-cmn-TestSubDone.c \
116 bs3-cmn-TestSubErrorCount.c \
117 bs3-cmn-TestTerm.c \
118 bs3-cmn-TestSendCmdWithStr.asm \
119 bs3-cmn-TestSendCmdWithU32.asm \
120 bs3-cmn-TestIsVmmDevTestingPresent.asm \
121 bs3-cmn-TestCheckRegCtxEx.c \
122 bs3-cmn-TestPrintf.c \
123 bs3-cmn-Trap16Init.c \
124 bs3-cmn-Trap16SetGate.c \
125 bs3-cmn-Trap32Init.c \
126 bs3-cmn-Trap32SetGate.c \
127 bs3-cmn-Trap64Init.c \
128 bs3-cmn-Trap64SetGate.c \
129 bs3-cmn-TrapDefaultHandler.c \
130 bs3-cmn-TrapPrintFrame.c \
131 bs3-cmn-TrapSetHandler.c \
132 bs3-cmn-TrapSetJmp.asm \
133 bs3-cmn-TrapSetJmpAndRestore.c \
134 bs3-cmn-TrapUnsetJmp.c \
135 ../../../Runtime/common/asm/ASMBitFirstClear.asm \
136 ../../../Runtime/common/asm/ASMBitFirstSet.asm \
137 ../../../Runtime/common/asm/ASMBitNextClear.asm \
138 ../../../Runtime/common/asm/ASMBitNextSet.asm \
139 ../../../Runtime/common/asm/ASMBitFirstSetU16.asm \
140 ../../../Runtime/common/asm/ASMBitFirstSetU32.asm \
141 ../../../Runtime/common/asm/ASMBitFirstSetU64.asm \
142 ../../../Runtime/common/asm/ASMBitLastSetU16.asm \
143 ../../../Runtime/common/asm/ASMBitLastSetU32.asm \
144 ../../../Runtime/common/asm/ASMBitLastSetU64.asm \
145 ../../../Runtime/common/asm/ASMMemFirstMismatchingU8.asm \
146 ../../../Runtime/common/asm/ASMSerializeInstruction-cpuid.asm \
147 ../../../Runtime/common/asm/ASMSerializeInstruction-iret.asm \
148 ../../../Runtime/common/asm/ASMSerializeInstruction-rdtscp.asm \
149
150# The 16-bit BS3Kit library.
151LIBRARIES += bs3kit-common-16
152bs3kit-common-16_TEMPLATE = VBoxBS3KitImg
153bs3kit-common-16_INSTTYPE = none
154bs3kit-common-16_DEFS = TMPL_PE16 BS3_CMN_ONLY
155bs3kit-common-16_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
156bs3kit-common-16_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
157 bs3-system-data.asm \
158 bs3-rm-InitAll.c \
159 bs3-rm-InitMemory.c \
160 bs3-cmn-hexdigits.c \
161 bs3-cmn-CpuDetectData.c \
162 bs3-cmn-PerCpuData.c \
163 bs3-cmn-ConvertRMStackToP16UsingCxReturnToAx.asm \
164 bs3-wc16-U8DR.asm \
165 bs3-wc16-U8DQ.asm \
166 bs3-wc16-I8DR.asm \
167 bs3-wc16-I8DQ.asm \
168 bs3-wc16-I8RS.asm \
169 bs3-wc16-U8RS.asm \
170 bs3-wc16-U8LS.asm \
171 bs3-wc16-U4D.asm \
172 bs3-wc16-I4D.asm \
173 bs3-c16-Trap16Generic.asm
174
175# The 32-bit BS3Kit library.
176LIBRARIES += bs3kit-common-32
177bs3kit-common-32_TEMPLATE = VBoxBS3KitImg32
178bs3kit-common-32_INSTTYPE = none
179bs3kit-common-32_DEFS = TMPL_PE32 BS3_CMN_ONLY
180bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
181bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
182 bs3-wc32-U8D.asm \
183 bs3-wc32-I8D.asm \
184 bs3-wc32-I8RS.asm \
185 bs3-wc32-U8RS.asm \
186 bs3-wc32-U8LS.asm \
187 bs3-c32-Trap32Generic.asm
188
189# The 64-bit BS3Kit library.
190LIBRARIES += bs3kit-common-64
191bs3kit-common-64_TEMPLATE = VBoxBS3KitImg64
192bs3kit-common-64_INSTTYPE = none
193bs3kit-common-64_DEFS = TMPL_LM64 BS3_CMN_ONLY
194bs3kit-common-64_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
195bs3kit-common-64_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
196 bs3-c64-Trap64Generic.asm \
197 ../../../Runtime/common/asm/ASMGetIdtr.asm \
198 ../../../Runtime/common/asm/ASMSetIdtr.asm \
199
200
201#
202# Common sources to be compiled for each CPU mode.
203#
204VBOX_BS3KIT_MODE_SOURCES = \
205 bs3-mode-Name.asm \
206 bs3-mode-SwitchToRM.asm \
207 bs3-mode-SwitchToPE16.asm \
208 bs3-mode-SwitchToPE16_32.asm \
209 bs3-mode-SwitchToPE16_V86.asm \
210 bs3-mode-SwitchToPE32.asm \
211 bs3-mode-SwitchToPE32_16.asm \
212 bs3-mode-SwitchToPEV86.asm \
213 bs3-mode-SwitchToPP16.asm \
214 bs3-mode-SwitchToPP16_32.asm \
215 bs3-mode-SwitchToPP16_V86.asm \
216 bs3-mode-SwitchToPP32.asm \
217 bs3-mode-SwitchToPP32_16.asm \
218 bs3-mode-SwitchToPPV86.asm \
219 bs3-mode-SwitchToPAE16.asm \
220 bs3-mode-SwitchToPAE16_32.asm \
221 bs3-mode-SwitchToPAE16_V86.asm \
222 bs3-mode-SwitchToPAE32.asm \
223 bs3-mode-SwitchToPAE32_16.asm \
224 bs3-mode-SwitchToPAEV86.asm \
225 bs3-mode-SwitchToLM64.asm \
226 bs3-mode-SwitchToLM32.asm \
227 bs3-mode-SwitchToLM16.asm \
228 bs3-mode-EnteredMode.asm \
229 bs3-mode-PagingGetRootForPP16.asm \
230 bs3-mode-PagingGetRootForPP32.asm \
231 bs3-mode-PagingGetRootForPAE16.asm \
232 bs3-mode-PagingGetRootForPAE32.asm \
233 bs3-mode-PagingGetRootForLM64.asm \
234 bs3-mode-TrapInit.c \
235 bs3-mode-TrapSystemCallHandler.asm \
236 bs3-mode-TestDoModes.c \
237 bs3-mode-TestDoModesHlp.asm \
238
239# The 16-bit real mode BS3Kit library.
240LIBRARIES += bs3kit-rm
241bs3kit-rm_TEMPLATE = VBoxBS3KitImg
242bs3kit-rm_INSTTYPE = none
243bs3kit-rm_DEFS = TMPL_MODE=BS3_MODE_RM
244bs3kit-rm_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
245 bs3-first-rm.asm \
246 bs3-mode-CpuDetect.asm
247
248
249# The 16-bit BS3Kit library for 16-bit protected kernel+tss.
250LIBRARIES += bs3kit-pe16
251bs3kit-pe16_TEMPLATE = VBoxBS3KitImg
252bs3kit-pe16_INSTTYPE = none
253bs3kit-pe16_DEFS = TMPL_MODE=BS3_MODE_PE16
254bs3kit-pe16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
255 bs3-first-pe16.asm \
256# bs3-mode-CpuDetect.asm
257
258# The 32-bit BS3Kit library for 16-bit protected kernel+tss.
259LIBRARIES += bs3kit-pe16_32
260bs3kit-pe16_32_TEMPLATE = VBoxBS3KitImg32
261bs3kit-pe16_32_INSTTYPE = none
262bs3kit-pe16_32_DEFS = TMPL_MODE=BS3_MODE_PE16_32
263bs3kit-pe16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
264
265# The v86 BS3Kit library for 16-bit protected kernel+tss.
266LIBRARIES += bs3kit-pe16_v86
267bs3kit-pe16_v86_TEMPLATE = VBoxBS3KitImg
268bs3kit-pe16_v86_INSTTYPE = none
269bs3kit-pe16_v86_DEFS = TMPL_MODE=BS3_MODE_PE16_V86
270bs3kit-pe16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
271
272# The 32-bit BS3Kit library for 32-bit protected kernel+tss.
273LIBRARIES += bs3kit-pe32
274bs3kit-pe32_TEMPLATE = VBoxBS3KitImg32
275bs3kit-pe32_INSTTYPE = none
276bs3kit-pe32_DEFS = TMPL_MODE=BS3_MODE_PE32
277bs3kit-pe32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
278
279# The 16-bit BS3Kit library for 32-bit protected kernel+tss.
280LIBRARIES += bs3kit-pe32_16
281bs3kit-pe32_16_TEMPLATE = VBoxBS3KitImg
282bs3kit-pe32_16_INSTTYPE = none
283bs3kit-pe32_16_DEFS = TMPL_MODE=BS3_MODE_PE32_16
284bs3kit-pe32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
285
286# The v8086 BS3Kit library for 32-bit protected kernel+tss.
287LIBRARIES += bs3kit-pev86
288bs3kit-pev86_TEMPLATE = VBoxBS3KitImg
289bs3kit-pev86_INSTTYPE = none
290bs3kit-pev86_DEFS = TMPL_MODE=BS3_MODE_PEV86
291bs3kit-pev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
292
293
294# The 16-bit BS3Kit library for 16-bit paged protected kernel+tss.
295LIBRARIES += bs3kit-pp16
296bs3kit-pp16_TEMPLATE = VBoxBS3KitImg
297bs3kit-pp16_INSTTYPE = none
298bs3kit-pp16_DEFS = TMPL_MODE=BS3_MODE_PP16
299bs3kit-pp16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
300 bs3-mode-CpuDetect.asm
301
302# The 32-bit BS3Kit library for 16-bit paged protected kernel+tss.
303LIBRARIES += bs3kit-pp16_32
304bs3kit-pp16_32_TEMPLATE = VBoxBS3KitImg32
305bs3kit-pp16_32_INSTTYPE = none
306bs3kit-pp16_32_DEFS = TMPL_MODE=BS3_MODE_PP16_32
307bs3kit-pp16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
308
309# The v8086 BS3Kit library for 16-bit paged protected kernel+tss.
310LIBRARIES += bs3kit-pp16_v86
311bs3kit-pp16_v86_TEMPLATE = VBoxBS3KitImg
312bs3kit-pp16_v86_INSTTYPE = none
313bs3kit-pp16_v86_DEFS = TMPL_MODE=BS3_MODE_PP16_V86
314bs3kit-pp16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
315
316# The 32-bit BS3Kit library for 32-bit paged protected kernel+tss.
317LIBRARIES += bs3kit-pp32
318bs3kit-pp32_TEMPLATE = VBoxBS3KitImg32
319bs3kit-pp32_INSTTYPE = none
320bs3kit-pp32_DEFS = TMPL_MODE=BS3_MODE_PP32
321bs3kit-pp32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
322
323# The 16-bit BS3Kit library for 32-bit paged protected kernel+tss.
324LIBRARIES += bs3kit-pp32_16
325bs3kit-pp32_16_TEMPLATE = VBoxBS3KitImg
326bs3kit-pp32_16_INSTTYPE = none
327bs3kit-pp32_16_DEFS = TMPL_MODE=BS3_MODE_PP32_16
328bs3kit-pp32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
329
330# The v8086 BS3Kit library for 32-bit paged protected kernel+tss.
331LIBRARIES += bs3kit-ppv86
332bs3kit-ppv86_TEMPLATE = VBoxBS3KitImg
333bs3kit-ppv86_INSTTYPE = none
334bs3kit-ppv86_DEFS = TMPL_MODE=BS3_MODE_PPV86
335bs3kit-ppv86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
336
337
338# The 16-bit BS3Kit library for 16-bit PAE paged protected kernel+tss.
339LIBRARIES += bs3kit-pae16
340bs3kit-pae16_TEMPLATE = VBoxBS3KitImg
341bs3kit-pae16_INSTTYPE = none
342bs3kit-pae16_DEFS = TMPL_MODE=BS3_MODE_PAE16
343bs3kit-pae16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES) \
344 bs3-mode-CpuDetect.asm
345
346# The 16-bit BS3Kit library for 16-bit PAE paged protected kernel+tss.
347LIBRARIES += bs3kit-pae16_32
348bs3kit-pae16_32_TEMPLATE = VBoxBS3KitImg32
349bs3kit-pae16_32_INSTTYPE = none
350bs3kit-pae16_32_DEFS = TMPL_MODE=BS3_MODE_PAE16_32
351bs3kit-pae16_32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
352
353# The v8086 BS3Kit library for 16-bit PAE paged protected kernel+tss.
354LIBRARIES += bs3kit-pae16_v86
355bs3kit-pae16_v86_TEMPLATE = VBoxBS3KitImg
356bs3kit-pae16_v86_INSTTYPE = none
357bs3kit-pae16_v86_DEFS = TMPL_MODE=BS3_MODE_PAE16_V86
358bs3kit-pae16_v86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
359
360# The 32-bit BS3Kit library for 32-bit PAE paged protected kernel+tss.
361LIBRARIES += bs3kit-pae32
362bs3kit-pae32_TEMPLATE = VBoxBS3KitImg32
363bs3kit-pae32_INSTTYPE = none
364bs3kit-pae32_DEFS = TMPL_MODE=BS3_MODE_PAE32
365bs3kit-pae32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
366
367# The 16-bit BS3Kit library for 32-bit PAE paged protected kernel+tss.
368LIBRARIES += bs3kit-pae32_16
369bs3kit-pae32_16_TEMPLATE = VBoxBS3KitImg
370bs3kit-pae32_16_INSTTYPE = none
371bs3kit-pae32_16_DEFS = TMPL_MODE=BS3_MODE_PAE32_16
372bs3kit-pae32_16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
373
374# The v8086 BS3Kit library for 32-bit PAE paged protected kernel+tss.
375LIBRARIES += bs3kit-paev86
376bs3kit-paev86_TEMPLATE = VBoxBS3KitImg
377bs3kit-paev86_INSTTYPE = none
378bs3kit-paev86_DEFS = TMPL_MODE=BS3_MODE_PAEV86
379bs3kit-paev86_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
380
381
382# The 16-bit long mode BS3Kit library.
383LIBRARIES += bs3kit-lm16
384bs3kit-lm16_TEMPLATE = VBoxBS3KitImg
385bs3kit-lm16_INSTTYPE = none
386bs3kit-lm16_DEFS = TMPL_MODE=BS3_MODE_LM16
387bs3kit-lm16_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
388
389# The 32-bit long mode BS3Kit library.
390LIBRARIES += bs3kit-lm32
391bs3kit-lm32_TEMPLATE = VBoxBS3KitImg32
392bs3kit-lm32_INSTTYPE = none
393bs3kit-lm32_DEFS = TMPL_MODE=BS3_MODE_LM32
394bs3kit-lm32_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
395
396# The 64-bit long mode BS3Kit library.
397LIBRARIES += bs3kit-lm64
398bs3kit-lm64_TEMPLATE = VBoxBS3KitImg64
399bs3kit-lm64_INSTTYPE = none
400bs3kit-lm64_DEFS = TMPL_MODE=BS3_MODE_LM64
401bs3kit-lm64_SOURCES = $(VBOX_BS3KIT_MODE_SOURCES)
402
403
404#
405# shutdown example.
406#
407MISCBINS += bs3-shutdown
408bs3-shutdown_TEMPLATE = VBoxBS3KitImg
409bs3-shutdown_SOURCES = \
410 bs3-first-pe16.asm \
411 bs3-shutdown.c
412
413
414include $(FILE_KBUILD_SUB_FOOTER)
415
416.PRECIOUS: $(PATH_OBJ)/bs3-shutdown/bs3-shutdown.map
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette