VirtualBox

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

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

bootsectors/Makefile.kmk: build fix.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 7.4 KB
Line 
1# $Id: Makefile.kmk 59303 2016-01-09 21:51:13Z vboxsync $
2## @file
3# VirtualBox Validation Kit - Bootsector Tests for Test Drivers or standalone testing.
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# Make sure our Config.kmk gets included when kmk is running from a parent directory.
33#
34ifndef VBOX_BOOTSECTORS_CONFIG_KMK_INCLUDED
35 include $(PATH_SUB_CURRENT)/Config.kmk
36endif
37
38
39#
40# Include sub-makefile.
41#
42if defined(VBOX_WITH_OPEN_WATCOM)
43 if1of ($(KBUILD_TARGET), win) # requires patched NASM.
44 include $(PATH_SUB_CURRENT)/bs3kit/Makefile.kmk
45 endif
46endif
47
48
49#
50# Boot Sector "Linker" tool.
51#
52TOOL_VBoxBootSectorLd = Joins one or more BS2 object files into a floppy img.
53TOOL_VBoxBootSectorLd_LINK_MISCBIN_OUTPUT =
54TOOL_VBoxBootSectorLd_LINK_MISCBIN_DEPEND =
55TOOL_VBoxBootSectorLd_LINK_MISCBIN_DEPORD = $(VBoxBs2Linker_1_TARGET)
56define TOOL_VBoxBootSectorLd_LINK_MISCBIN_CMDS
57 $(VBoxBs2Linker_1_TARGET) -o $(out) $(objs) $(othersrc)
58endef
59
60BLDPROGS += VBoxBs2Linker
61VBoxBs2Linker_TEMPLATE = VBoxBldProg
62VBoxBs2Linker_SOURCES = VBoxBs2Linker.cpp
63
64
65#
66# Makes a boot sector test image.
67#
68TEMPLATE_VBoxBsTestImg = kBuild tool config for building boot sector stuff.
69TEMPLATE_VBoxBsTestImg_INST = $(INST_VALIDATIONKIT)bootsectors/
70TEMPLATE_VBoxBsTestImg_BINSUFF = .img
71TEMPLATE_VBoxBsTestImg_MODE = 0644
72TEMPLATE_VBoxBsTestImg_ASTOOL = YASM
73TEMPLATE_VBoxBsTestImg_ASFLAGS:= -f bin -P $(PATH_SUB_CURRENT)/bootsector2-first.mac $(VBOX_YASM_Wno-segreg-in-64bit) --mapfile
74TEMPLATE_VBoxBsTestImg_ASDEFS = ASM_FORMAT_BIN
75TEMPLATE_VBoxBsTestImg_INCS = \
76 . \
77 ../../VMM/testcase/Instructions
78TEMPLATE_VBoxBsTestImg_LDTOOL = VBoxBootSectorLd
79
80
81#
82# The boot sector tests.
83#
84MISCBINS += bootsector-shutdown
85bootsector-shutdown_TEMPLATE = VBoxBsTestImg
86bootsector-shutdown_SOURCES = bootsector-shutdown.asm
87
88MISCBINS += bootsector-pae
89bootsector-pae_TEMPLATE = VBoxBsTestImg
90bootsector-pae_SOURCES = bootsector-pae.asm
91
92MISCBINS += bootsector-empty
93bootsector-empty_TEMPLATE = VBoxBsTestImg
94bootsector-empty_SOURCES = bootsector-empty.asm
95
96MISCBINS += bootsector2-test1
97bootsector2-test1_TEMPLATE = VBoxBsTestImg
98bootsector2-test1_SOURCES = bootsector2-test1.asm
99
100MISCBINS += bootsector2-cpu-hidden-regs-1
101bootsector2-cpu-hidden-regs-1_TEMPLATE = VBoxBsTestImg
102bootsector2-cpu-hidden-regs-1_SOURCES = bootsector2-cpu-hidden-regs-1.asm
103
104MISCBINS += bootsector2-cpu-instr-1
105bootsector2-cpu-instr-1_TEMPLATE = VBoxBsTestImg
106bootsector2-cpu-instr-1_SOURCES = bootsector2-cpu-instr-1.asm
107
108MISCBINS += bootsector2-cpu-pf-1
109bootsector2-cpu-pf-1_TEMPLATE = VBoxBsTestImg
110bootsector2-cpu-pf-1_SOURCES = bootsector2-cpu-pf-1.asm
111
112MISCBINS += bootsector2-cpu-xcpt-1
113bootsector2-cpu-xcpt-1_TEMPLATE = VBoxBsTestImg
114bootsector2-cpu-xcpt-1_SOURCES = bootsector2-cpu-xcpt-1.asm
115
116MISCBINS += bootsector2-cpu-xcpt-2
117bootsector2-cpu-xcpt-2_TEMPLATE = VBoxBsTestImg
118bootsector2-cpu-xcpt-2_SOURCES = bootsector2-cpu-xcpt-2.asm
119
120MISCBINS += bootsector2-cpu-a20-1
121bootsector2-cpu-a20-1_TEMPLATE = VBoxBsTestImg
122bootsector2-cpu-a20-1_SOURCES = bootsector2-cpu-a20-1.asm
123
124MISCBINS += bootsector2-cpu-basic-1
125bootsector2-cpu-basic-1_TEMPLATE = VBoxBsTestImg
126bootsector2-cpu-basic-1_SOURCES = bootsector2-cpu-basic-1.asm
127
128MISCBINS += bootsector2-boot-registers-1
129bootsector2-boot-registers-1_TEMPLATE = VBoxBsTestImg
130bootsector2-boot-registers-1_SOURCES = bootsector2-boot-registers-1.asm
131
132MISCBINS += bootsector2-triple-fault-1
133bootsector2-triple-fault-1_TEMPLATE = VBoxBsTestImg
134bootsector2-triple-fault-1_SOURCES = bootsector2-triple-fault-1.asm
135
136
137ifeq ($(USERNAME),birdxx)
138 if1of ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64)
139#
140# Generated instruction tests (work in progress).
141#
142
143VBOX_PATH_VBINSTST = $(PATH_ROOT)/src/VBox/VMM/testcase/Instructions
144VBOX_VBINSTST_GEN = $(VBOX_PATH_VBINSTST)/InstructionTestGen.py
145VBOX_BOOTSECTOR2_VBINSTST_AMD64_GEN = $(VBOX_BLD_PYTHON) $(VBOX_VBINSTST_GEN) \
146 --split 3 --target bs2-r0-64 --output-base $(bootsectors_0_OUTDIR)/VBInsTst-64 --test-size tiny
147VBOX_BOOTSECTOR2_VBINSTST_AMD64_FILES = $(shell $(VBOX_BOOTSECTOR2_VBINSTST_AMD64_GEN) --makefile-mode)
148
149#$$(bootsectors_0_OUTDIR)/VBInsTst.ts + $$(VBOX_BOOTSECTOR2_VBINSTST_AMD64_FILES): $(VBOX_VBINSTST_GEN) | $$(dir $$@)
150# $(VBOX_BOOTSECTOR2_VBINSTST_AMD64_GEN)
151# $(APPEND) -t $@
152#
153#bootsectors_SOURCES += $(bootsectors_0_OUTDIR)/bootsector2-vbinstst-1.img
154#bootsectors_CLEAN += $(VBOX_BOOTSECTOR2_VBINSTST_AMD64_FILES)
155#
156#$$(bootsectors_0_OUTDIR)/bootsector2-vbinstst-1.img: \
157# $(PATH_SUB_CURRENT)/bootsector2-vbinstst-64-1.asm \
158# $$(bootsectors_0_OUTDIR)/VBInsTst-64.asm
159# $(TOOL_$(VBOX_ASTOOL)_AS) -f bin -D ASM_FORMAT_BIN -I $(dir $@) -I $(PATH_ROOT)/include -I $(VBOX_PATH_VBINSTST) -o $@ -L nasm -l [email protected] $<
160
161MISCBINS += bootsector2-vbinstst-kernel
162bootsector2-vbinstst-kernel_TEMPLATE = VBoxBsTestImg
163bootsector2-vbinstst-kernel_SOURCES = \
164 bootsector2-vbinstst-kernel.asm
165
166
167MISCBINS += bootsector2-vbinstst-64-1
168bootsector2-vbinstst-64-1_TEMPLATE = VBoxBsTestImg
169bootsector2-vbinstst-64-1_DEFS = \
170 BS2_BIG_IMAGE_LM64 \
171 BS2_BIG_IMAGE_GEN_SOURCE_FILE=bs2-vbinstst-64-1.asm \
172 BS2_BIG_IMAGE_GEN_TEST_NAME=\"bs2-vbinstst-64-1\"
173bootsector2-vbinstst-64-1_INCS = $(bootsector2-vbinstst-64-1_0_OUTDIR)/
174bootsector2-vbinstst-64-1_SOURCES = \
175 bootsector2-vbinstst-kernel.asm \
176 bootsector2-vbinstst-big-template.asm
177bootsector2-vbinstst-64-1_INTERMEDIATES = \
178 $(bootsector2-vbinstst-64-1_0_OUTDIR)/bs2-vbinstst-64-1.asm
179bootsector2-vbinstst-64-1_CLEAN = \
180 $(bootsector2-vbinstst-64-1_0_OUTDIR)/bs2-vbinstst-64-1.asm
181
182$$(bootsector2-vbinstst-64-1_0_OUTDIR)/bs2-vbinstst-64-1.asm: $(VBOX_VBINSTST_GEN) | $$(dir $$@)
183 $(VBOX_BLD_PYTHON) $(VBOX_VBINSTST_GEN) --target bs2-r0-64-big --output-base $(basename $@) --test-size medium
184
185MISCBINS += bootsector2-vbinstst-32-1
186bootsector2-vbinstst-32-1_TEMPLATE = VBoxBsTestImg
187bootsector2-vbinstst-32-1_DEFS = \
188 BS2_BIG_IMAGE_PP32 \
189 BS2_BIG_IMAGE_GEN_SOURCE_FILE=bs2-vbinstst-32-1.asm \
190 BS2_BIG_IMAGE_GEN_TEST_NAME=\"bs2-vbinstst-32-1\"
191bootsector2-vbinstst-32-1_INCS = $(bootsector2-vbinstst-32-1_0_OUTDIR)/
192bootsector2-vbinstst-32-1_SOURCES = \
193 bootsector2-vbinstst-kernel.asm \
194 bootsector2-vbinstst-big-template.asm
195bootsector2-vbinstst-32-1_INTERMEDIATES = \
196 $(bootsector2-vbinstst-32-1_0_OUTDIR)/bs2-vbinstst-32-1.asm
197bootsector2-vbinstst-32-1_CLEAN = \
198 $(bootsector2-vbinstst-32-1_0_OUTDIR)/bs2-vbinstst-32-1.asm
199
200$$(bootsector2-vbinstst-32-1_0_OUTDIR)/bs2-vbinstst-32-1.asm: $(VBOX_VBINSTST_GEN) | $$(dir $$@)
201 $(VBOX_BLD_PYTHON) $(VBOX_VBINSTST_GEN) --target bs2-r0-32-big --output-base $(basename $@) --test-size medium
202
203 endif
204endif # bird-only
205
206
207include $(FILE_KBUILD_SUB_FOOTER)
208
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