VirtualBox

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

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

bs3kit: Memory detection and pool init.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 17.8 KB
Line 
1# $Id: Makefile.kmk 58785 2015-11-19 23:30:50Z vboxsync $
2## @file
3# VirtualBox Validation Kit - Bootsector Kit v3
4#
5
6#
7# Copyright (C) 2006-2015 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# ----- Config.kmk: start -----
33#
34
35# The bs3kit source directory.
36VBOX_PATH_BS3KIT_SRC = $(VBOX_PATH_VALIDATIONKIT_SRC)/bootsectors/bs3kit
37
38# Boot Sector post-link tool used below.
39BLDPROGS += VBoxBs3Linker
40VBoxBs3Linker_TEMPLATE = VBoxBldProg
41VBoxBs3Linker_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3Linker.cpp
42
43# 64-bit relocation conversion tool
44BLDPROGS += VBoxBs3ObjConverter
45VBoxBs3ObjConverter_TEMPLATE = VBoxBldProg
46VBoxBs3ObjConverter_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3ObjConverter.cpp
47
48# Dummy CP "linker" tool.
49TOOL_VBoxBsCpLd = Dummy copy linker.
50TOOL_VBoxBsCpLd_LINK_MISCBIN_OUTPUT =
51TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPEND =
52TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPORD =
53define TOOL_VBoxBsCpLd_LINK_MISCBIN_CMDS
54 $(CP) -- $(objs) $(othersrc) "$(out)"
55endef
56
57# Dummy exit 1 "linker" tool.
58TOOL_VBoxBsUnusedLd = Dummy unused linker.
59TOOL_VBoxBsUnusedLd_LINK_MISCBIN_OUTPUT =
60TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPEND =
61TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPORD =
62define TOOL_VBoxBsUnusedLd_LINK_MISCBIN_CMDS
63 echo "cannot use this template for linking"
64 exit 1
65endef
66
67#
68# elf cross compiling 64-bit gcc (mac): sudo port install x86_64-elf-gcc
69#
70TOOL_Bs3Gcc64Elf64 := AMD64/ELF64 gcc/g++ cross compiler for mac.
71TOOL_Bs3Gcc64Elf64_CC ?= x86_64-elf-gcc$(HOSTSUFF_EXE) -m64
72TOOL_Bs3Gcc64Elf64_CXX ?= x86_64-elf-g++$(HOSTSUFF_EXE) -m64
73ifdef SLKRUNS
74 TOOL_Bs3Gcc64Elf64_CC += -fmessage-length=0
75 TOOL_Bs3Gcc64Elf64_CXX += -fmessage-length=0
76endif
77TOOL_Bs3Gcc64Elf64_COBJSUFF ?= .o
78TOOL_Bs3Gcc64Elf64_CFLAGS ?=
79TOOL_Bs3Gcc64Elf64_CFLAGS.debug ?= -g
80TOOL_Bs3Gcc64Elf64_CFLAGS.profile ?= -O2 #-g -pg
81TOOL_Bs3Gcc64Elf64_CFLAGS.release ?= -O2
82TOOL_Bs3Gcc64Elf64_CINCS ?=
83TOOL_Bs3Gcc64Elf64_CDEFS ?=
84TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
85TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPORD =
86TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT =
87define TOOL_Bs3Gcc64Elf64_COMPILE_C_CMDS
88 $(QUIET)$(TOOL_Bs3Gcc64Elf64_CC) -c\
89 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
90 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
91 -o $(obj)\
92 $(abspath $(source))
93 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
94 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
95endef
96
97TOOL_Bs3Gcc64Elf64_CXXOBJSUFF ?= .o
98TOOL_Bs3Gcc64Elf64_CXXOBJSUFF ?= .o
99TOOL_Bs3Gcc64Elf64_CXXFLAGS ?=
100TOOL_Bs3Gcc64Elf64_CXXFLAGS.debug ?= -g0 # no debug info, thank you
101TOOL_Bs3Gcc64Elf64_CXXFLAGS.profile ?= -O2 #-g -pg
102TOOL_Bs3Gcc64Elf64_CXXFLAGS.release ?= -O2
103TOOL_Bs3Gcc64Elf64_CXXINCS ?=
104TOOL_Bs3Gcc64Elf64_CXXDEFS ?=
105TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)
106TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPORD =
107TOOL_Bs3Gcc64Elf64_COMPILE_CXX_OUTPUT =
108define TOOL_Bs3Gcc64Elf64_COMPILE_CXX_CMDS
109 $(QUIET)$(TOOL_Bs3Gcc64Elf64_CXX) -c\
110 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\
111 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\
112 -o $(obj)\
113 $(abspath $(source))
114 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
115 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""
116endef
117
118#
119# VCC elf cross compiling 64-bit gcc (mac): sudo port install x86_64-elf-gcc
120#
121TOOL_Bs3Vcc64 := Visual C++ 64-bit
122TOOL_Bs3Vcc64_CC = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CC)
123TOOL_Bs3Vcc64_CXX = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXX)
124TOOL_Bs3Vcc64_COBJSUFF = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COBJSUFF)
125TOOL_Bs3Vcc64_CFLAGS = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CFLAGS)
126TOOL_Bs3Vcc64_CFLAGS.debug =
127TOOL_Bs3Vcc64_CFLAGS.dbgopt = -O1
128TOOL_Bs3Vcc64_CFLAGS.profile = -O1
129TOOL_Bs3Vcc64_CFLAGS.release = -O1
130TOOL_Bs3Vcc64_CINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)
131TOOL_Bs3Vcc64_CDEFS =
132TOOL_Bs3Vcc64_COMPILE_C_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
133TOOL_Bs3Vcc64_COMPILE_C_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPORD)
134TOOL_Bs3Vcc64_COMPILE_C_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT)
135TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT_MAYBE)
136define TOOL_Bs3Vcc64_COMPILE_C_CMDS
137$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_CMDS)
138 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
139endef
140
141TOOL_Bs3Vcc64_CXXOBJSUFF = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXOBJSUFF)
142TOOL_Bs3Vcc64_CXXFLAGS = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXFLAGS)
143TOOL_Bs3Vcc64_CXXFLAGS.debug =
144TOOL_Bs3Vcc64_CXXFLAGS.dbgopt = -O1
145TOOL_Bs3Vcc64_CXXFLAGS.profile = -O1
146TOOL_Bs3Vcc64_CXXFLAGS.release = -O1
147TOOL_Bs3Vcc64_CXXINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)
148TOOL_Bs3Vcc64_CXXDEFS =
149TOOL_Bs3Vcc64_COMPILE_CXX_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)
150TOOL_Bs3Vcc64_COMPILE_CXX_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPORD)
151TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT)
152TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT_MAYBE)
153define TOOL_Bs3Vcc64_COMPILE_CXX_CMDS
154$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_CMDS)
155 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"
156endef
157
158# Debug info format depends on what we use for 64-bit.
159if1of ($(KBUILD_HOST), win)
160 BS3_OW_DBG_OPT = -hc
161 BS3_OW_DBG_LDOPT = codeview
162else
163 BS3_OW_DBG_OPT = -hd
164 BS3_OW_DBG_LDOPT = dwarf
165endif
166
167#
168# BS3Kit template for assembly and 16-bit code.
169#
170# Note! Using -d1 as -d1+ and -d2 causes suboptimal code to be generated (strlen
171# reloading string pointer argument all the time).
172# Note! Optimization options should come after debug stuff as -d2 for instance
173# disables all optimziations.
174#
175# Compiler options explained:
176# -nt=xxxx Sets the text segment name.
177# -nc=xxxx Sets the text segment class name.
178# -nd=xxxx Sets the data segment name.
179# -ecc Sets the default calling convension to __cdecl
180# Update: We don't use this in 16-bit code as it causes unfavorable reloading of DS before calling
181# inlined functions (e.g. iprt/asm.h). Instead we use -ecw and __cdecl where needed.
182# -ecw Sets the default calling convension to __watcall ()
183# -q Quiet, no logos or stuff.
184# -3 Use 386 instruction set (16-bit only).
185# -wx Maxium warning level.
186# -zl Don't emit default library information.
187# -zu Assume SS != DS.
188# -mc Compact memory model, far data, small code.
189# -mf Flat memory model (32-bit).
190# -d1 Debug info: Globals and line numbers.
191# -s No stack overflow checks.
192# -oa Relaxed aliasing constraints.
193# -ob Branch prediction.
194# -of Generate stack frames when needed.
195# -oi Inline instrinsics functions.
196# -ol Loop optimizations.
197# -or Reorder for best pipeline.
198# -os Favor size over speed.
199#
200TEMPLATE_VBoxBS3KitImg = Template for building BS3Kit test images.
201TEMPLATE_VBoxBS3KitImg_BLD_TRG = os-agnostic
202TEMPLATE_VBoxBS3KitImg_BLD_TRG_ARCH = x86
203TEMPLATE_VBoxBS3KitImg_INST = $(INST_VALIDATIONKIT)bootsectors/
204TEMPLATE_VBoxBS3KitImg_BINSUFF = .img
205TEMPLATE_VBoxBS3KitImg_MODE = 0644
206TEMPLATE_VBoxBS3KitImg_ASTOOL = NASM
207TEMPLATE_VBoxBS3KitImg_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels
208TEMPLATE_VBoxBS3KitImg_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
209TEMPLATE_VBoxBS3KitImg_DEFS = ARCH_BITS=16 IN_BS3KIT
210TEMPLATE_VBoxBS3KitImg_ARTOOL = OPENWATCOM-16
211TEMPLATE_VBoxBS3KitImg_CTOOL = OPENWATCOM-16
212TEMPLATE_VBoxBS3KitImg_CXXTOOL = OPENWATCOM-16
213TEMPLATE_VBoxBS3KitImg_CFLAGS = \
214 -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecw -q -3 -wx -zl -zu -mc $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os
215TEMPLATE_VBoxBS3KitImg_CXXFLAGS = \
216 -nt=BS3TEXT16 -nd=BS3DATA16 -nc=BS3CODE16 -ecw -q -3 -wx -zl -zu -mc $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os
217TEMPLATE_VBoxBS3KitImg_INCS = $(VBOX_PATH_BS3KIT_SRC) .
218TEMPLATE_VBoxBS3KitImg_LDTOOL = OPENWATCOM-WL
219# option quiet, nofarcalls\
220# disable 1014, 1023, 2120, 1080
221
222# linker options:
223# system dos: Link a 16-bit DOS binary.
224# output raw ...: Produce a raw DOS binary for loading at flat address 10000h.
225# The following is for ordering segments.
226# option start=_start: The start symbol in bs3-first-xxx.asm.
227# debug codeview/dwarf all: Full debug information either in codeview or dwarf.
228# option symfile: Produce a separate symbol file with the debug info.
229# option map: Produce a map file.
230# option statics: ?
231# option verbose: Verbose map file?
232# option disable 1014: Disable warning about
233# option disable 1080: Disable warning about
234# option disable 1150: Disable warning about
235#
236# Note! We're pushing DATA16 to 0x20000 because it's impossible to force wlink
237# to give us a real-mode + GDT compatible alignment (0ffffff80h), i.e.
238# real-mode address on the form 0fff8:0000.
239TEMPLATE_VBoxBS3KitImg_LDFLAGS = system dos \
240 debug $(BS3_OW_DBG_LDOPT) all \
241 option quiet, map, statics, verbose, symfile, start=_start \
242 disable 1014, 1080, 1150 \
243 \
244 output raw offset=0x10000 \
245 order \
246 clname BS3CODE16 segaddr=0x1000 \
247 segment BS3TEXT16 \
248 segment BS3TEXT16_END \
249 clname BS3SYSTEM16 segaddr=0x2000 \
250 segment BS3SYSTEM16 \
251 clname FAR_DATA \
252 segment BS3DATA16 segaddr=0x2700 \
253 segment BS3DATA16CONST \
254 segment BS3DATA16CONST2 \
255 segment BS3DATA16_DATA \
256 segment BS3DATA16_END \
257 segment BS3DATA32 \
258 segment BS3DATA32_CONST \
259 segment BS3DATA32_CONST2 \
260 segment BS3DATA32_DATA \
261 segment DATA32 \
262 clname BS3CODE32 \
263 segment BS3TEXT32 \
264 segment TEXT32 \
265 clname CODE \
266 segment BS3TEXT64 \
267 segment TEXT64 \
268 segment .text \
269 segment .rdata \
270 clname DATA \
271 segment BS3DATA64 \
272 segment DATA64 \
273 segment .data
274TEMPLATE_VBoxBS3KitImg_DEPS = \
275 $(bs3-bootsector_1_TARGET) \
276 $(VBoxBs3Linker_1_TARGET)
277TEMPLATE_VBoxBS3KitImg_POST_CMDS = $(if $(eq $(tool_do),LINK_LIBRARY)\
278 ,,$(QUIET)$(MV_EXT) -f -- "$(out)" "$(out).tmp" \
279 $$(NLTAB)$(QUIET)$(VBoxBs3Linker_1_TARGET) -o $(out) $(bs3-bootsector_1_TARGET) $(out).tmp \
280 $$(NLTAB)$(QUIET)$(RM_EXT) -f -- "$(out).tmp")
281
282TEMPLATE_VBoxBS3KitImg_LIBS = \
283 $(PATH_OBJ)/bs3kit-common-16/bs3kit-common-16.lib \
284 $(PATH_OBJ)/bs3kit-common-32/bs3kit-common-32.lib \
285 $(PATH_OBJ)/bs3kit-common-64-asm/bs3kit-common-64-asm.lib \
286 $(PATH_OBJ)/bs3kit-common-64-c/bs3kit-common-64-c.lib
287
288# BS3Kit template for 32-bit code.
289TEMPLATE_VBoxBS3KitImg32 = Template for building BS3Kit test images.
290TEMPLATE_VBoxBS3KitImg32_BLD_TRG = os-agnostic
291TEMPLATE_VBoxBS3KitImg32_BLD_TRG_ARCH = x86
292TEMPLATE_VBoxBS3KitImg32_INSTTYPE = none
293TEMPLATE_VBoxBS3KitImg32_ASTOOL = NASM
294TEMPLATE_VBoxBS3KitImg32_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels
295TEMPLATE_VBoxBS3KitImg32_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
296TEMPLATE_VBoxBS3KitImg32_DEFS = ARCH_BITS=32 IN_BS3KIT
297TEMPLATE_VBoxBS3KitImg32_ARTOOL = OPENWATCOM
298TEMPLATE_VBoxBS3KitImg32_CTOOL = OPENWATCOM
299TEMPLATE_VBoxBS3KitImg32_CXXTOOL = OPENWATCOM
300TEMPLATE_VBoxBS3KitImg32_CFLAGS = \
301 -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CODE32 -ecc -q -wx -zl -mf $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os
302TEMPLATE_VBoxBS3KitImg32_CXXFLAGS = \
303 -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CODE32 -ecc -q -wx -zl -mf $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os
304TEMPLATE_VBoxBS3KitImg32_INCS = $(VBOX_PATH_BS3KIT_SRC) .
305TEMPLATE_VBoxBS3KitImg32_LDTOOL = VBoxBsUnusedLd
306
307# BS3Kit template for 64-bit code.
308TEMPLATE_VBoxBS3KitImg64 = Template for building BS3Kit test images.
309TEMPLATE_VBoxBS3KitImg64_BLD_TRG = os-agnostic
310TEMPLATE_VBoxBS3KitImg64_BLD_TRG_ARCH = amd64
311TEMPLATE_VBoxBS3KitImg64_INSTTYPE = none
312TEMPLATE_VBoxBS3KitImg64_ASTOOL = NASM
313TEMPLATE_VBoxBS3KitImg64_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels
314TEMPLATE_VBoxBS3KitImg64_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__
315TEMPLATE_VBoxBS3KitImg64_DEFS = IN_BS3KIT ARCH_BITS=64
316TEMPLATE_VBoxBS3KitImg64_ARTOOL = OPENWATCOM
317TEMPLATE_VBoxBS3KitImg64_INCS = $(VBOX_PATH_BS3KIT_SRC) .
318if1of ($(KBUILD_HOST), win)
319 TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Vcc64
320 TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Vcc64
321 TEMPLATE_VBoxBS3KitImg64_CFLAGS = -Zi -O1 -Oi -GF -GS- -Gy -Gs65536
322 TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -Zi -O1 -Oi -GF -GS- -Gy -Gs65536
323else
324 if1of ($(KBUILD_HOST), darwin)
325 TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Gcc64Elf64
326 TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Gcc64Elf64
327 else
328 TEMPLATE_VBoxBS3KitImg64_CTOOL := $(VBOX_GCC_TOOL)
329 TEMPLATE_VBoxBS3KitImg64_CXXTOOL := $(VBOX_GCC_TOOL)
330 endif
331 TEMPLATE_VBoxBS3KitImg64_CFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_WARN_PEDANTIC_C)
332 TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_WARN_PEDANTIC_CXX)
333endif
334TEMPLATE_VBoxBS3KitImg64_LDTOOL = VBoxBsUnusedLd
335
336# BS3Kit template for the bootsector.
337TEMPLATE_VBoxBS3KitBS = Template for building BS3Kit test images.
338TEMPLATE_VBoxBS3KitBS_BLD_TRG = os-agnostic
339TEMPLATE_VBoxBS3KitBS_BLD_TRG_ARCH = x86
340TEMPLATE_VBoxBS3KitBS_INST = $(INST_VALIDATIONKIT)bootsectors/
341TEMPLATE_VBoxBS3KitBS_INSTTYPE = none
342TEMPLATE_VBoxBS3KitBS_BINSUFF = .img
343TEMPLATE_VBoxBS3KitBS_MODE = 0644
344TEMPLATE_VBoxBS3KitBS_ASTOOL = YASM
345TEMPLATE_VBoxBS3KitBS_ASFLAGS = -f bin --mapfile
346TEMPLATE_VBoxBS3KitBS_ASDEFS = ASM_FORMAT_BIN RT_NOINC_SEGMENTS ARCH_BITS=16 __YASM__
347TEMPLATE_VBoxBS3KitBS_INCS = $(VBOX_PATH_BS3KIT_SRC) .
348TEMPLATE_VBoxBS3KitBS_LDTOOL = VBoxBsCpLd
349
350#
351# ----- Config.kmk: end -----
352#
353
354
355# The boot sector.
356MISCBINS += bs3-bootsector
357bs3-bootsector_TEMPLATE = VBoxBS3KitBS
358bs3-bootsector_SOURCES = bs3-bootsector.asm
359
360# Common sources to be compiled into _p16, _p32 and _p64 versions.
361VBOX_BS3KIT_COMMON_SOURCES = \
362 bs3-cmn-Shutdown.asm \
363 bs3-cmn-Panic.asm \
364 bs3-cmn-PrintChr.asm \
365 bs3-cmn-PrintU32.asm \
366 bs3-cmn-PrintStr.c \
367 bs3-cmn-PrintStrColonSpaces.asm \
368 bs3-cmn-PrintStrSpacesColonSpace.c \
369 bs3-cmn-StrLen.c \
370 bs3-cmn-StrNLen.c \
371 bs3-cmn-StrCpy.c \
372 bs3-cmn-MemCpy.c \
373 bs3-cmn-MemPCpy.c \
374 bs3-cmn-MemMove.c \
375 bs3-cmn-MemZero.asm \
376 bs3-cmn-SlabInit.c \
377 bs3-cmn-SlabFree.c \
378 bs3-cmn-SlabListInit.c \
379 bs3-cmn-SlabListAdd.c \
380 bs3-cmn-SlabListAlloc.c \
381 bs3-cmn-SlabListAllocEx.c \
382 bs3-cmn-SlabListFree.c \
383 bs3-cmn-TestData.c \
384 bs3-cmn-TestInit.c \
385 bs3-cmn-TestSendStrCmd.asm \
386 bs3-cmn-TestIsVmmDevTestingPresent.asm \
387 ../../../Runtime/common/asm/ASMBitFirstClear.asm \
388 ../../../Runtime/common/asm/ASMBitFirstSet.asm \
389 ../../../Runtime/common/asm/ASMBitNextClear.asm \
390 ../../../Runtime/common/asm/ASMBitNextSet.asm
391
392# The BS3Kit library.
393LIBRARIES += bs3kit-common-16
394bs3kit-common-16_TEMPLATE = VBoxBS3KitImg
395bs3kit-common-16_DEFS = TMPL_PE16 BS3_CMN_ONLY
396bs3kit-common-16_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
397bs3kit-common-16_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES) \
398 bs3-system-data.asm \
399 bs3-rm-InitMemory.c
400
401# The 32-bit BS3Kit library.
402LIBRARIES += bs3kit-common-32
403bs3kit-common-32_TEMPLATE = VBoxBS3KitImg32
404bs3kit-common-32_DEFS = TMPL_PE32 BS3_CMN_ONLY
405bs3kit-common-32_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
406bs3kit-common-32_SOURCES = $(VBOX_BS3KIT_COMMON_SOURCES)
407
408# The 64-bit BS3Kit library.
409LIBRARIES += bs3kit-common-64-asm
410bs3kit-common-64-asm_TEMPLATE = VBoxBS3KitImg64
411bs3kit-common-64-asm_DEFS = TMPL_LM64 BS3_CMN_ONLY
412bs3kit-common-64-asm_ASDEFS = RT_ASMDEFS_INC_FIRST_FILE
413bs3kit-common-64-asm_SOURCES = $(filter %.asm,$(VBOX_BS3KIT_COMMON_SOURCES))
414
415# The 64-bit BS3Kit library.
416LIBRARIES += bs3kit-common-64-c
417bs3kit-common-64-c_TEMPLATE = VBoxBS3KitImg64
418bs3kit-common-64-c_DEFS = TMPL_LM64 BS3_CMN_ONLY
419bs3kit-common-64-c_SOURCES = $(filter-out %.asm,$(VBOX_BS3KIT_COMMON_SOURCES))
420
421#
422# shutdown example.
423#
424MISCBINS += bs3-shutdown
425bs3-shutdown_TEMPLATE = VBoxBS3KitImg
426bs3-shutdown_SOURCES = bs3-first-rm.asm bs3-shutdown.c
427
428
429include $(FILE_KBUILD_SUB_FOOTER)
430
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