Changeset 59300 in vbox for trunk/src/VBox/ValidationKit/bootsectors
- Timestamp:
- Jan 8, 2016 9:19:45 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104957
- Location:
- trunk/src/VBox/ValidationKit/bootsectors
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/ValidationKit/bootsectors/Makefile.kmk
r58593 r59300 27 27 SUB_DEPTH = ../../../.. 28 28 include $(KBUILD_PATH)/subheader.kmk 29 30 31 # 32 # Make sure our Config.kmk gets included when kmk is running from a parent directory. 33 # 34 ifndef VBOX_VALIDATIONKIT_CONFIG_KMK_INCLUDED 35 include $(PATH_SUB_CURRENT)/Config.kmk 36 endif 37 38 39 # 40 # Include sub-makefile. 41 # 42 if defined(VBOX_WITH_OPEN_WATCOM) && "$(USER)" == "bird" 43 if1of ($(KBUILD_TARGET), win) ## requires patched NASM. 44 include $(PATH_SUB_CURRENT)/bs3kit/Makefile.kmk 45 endif 46 endif 29 47 30 48 -
trunk/src/VBox/ValidationKit/bootsectors/bs3kit/Makefile.kmk
r59287 r59300 29 29 30 30 31 # 32 # ----- Config.kmk: start ----- 33 # 34 35 # The bs3kit source directory. 36 VBOX_PATH_BS3KIT_SRC = $(VBOX_PATH_VALIDATIONKIT_SRC)/bootsectors/bs3kit 37 38 # Boot Sector post-link tool used below. 31 32 # Boot Sector post-link tool (used via the parent Config.kmk). 39 33 BLDPROGS += VBoxBs3Linker 40 34 VBoxBs3Linker_TEMPLATE = VBoxBldProg 41 35 VBoxBs3Linker_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3Linker.cpp 42 36 43 # 64-bit relocation conversion tool 37 38 # 64-bit relocation conversion tool (used via the parent Config.kmk). 44 39 BLDPROGS += VBoxBs3ObjConverter 45 40 VBoxBs3ObjConverter_TEMPLATE = VBoxBldProg 46 41 VBoxBs3ObjConverter_SOURCES = $(VBOX_PATH_BS3KIT_SRC)/VBoxBs3ObjConverter.cpp 47 48 # Dummy CP "linker" tool.49 TOOL_VBoxBsCpLd = Dummy copy linker.50 TOOL_VBoxBsCpLd_LINK_MISCBIN_OUTPUT =51 TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPEND =52 TOOL_VBoxBsCpLd_LINK_MISCBIN_DEPORD =53 define TOOL_VBoxBsCpLd_LINK_MISCBIN_CMDS54 $(CP) -- $(objs) $(othersrc) "$(out)"55 endef56 57 # Dummy exit 1 "linker" tool.58 TOOL_VBoxBsUnusedLd = Dummy unused linker.59 TOOL_VBoxBsUnusedLd_LINK_MISCBIN_OUTPUT =60 TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPEND =61 TOOL_VBoxBsUnusedLd_LINK_MISCBIN_DEPORD =62 define TOOL_VBoxBsUnusedLd_LINK_MISCBIN_CMDS63 echo "cannot use this template for linking"64 exit 165 endef66 67 #68 # ELF 64-bit compiler tool with object conversion.69 #70 # Mac needs cross compiler: sudo port install x86_64-elf-gcc71 #72 TOOL_Bs3Gcc64Elf64 := AMD64/ELF64 gcc/g++ (cross) compiler.73 ifeq ($(KBUILD_HOST),darwin)74 TOOL_Bs3Gcc64Elf64_CC ?= x86_64-elf-gcc$(HOSTSUFF_EXE) -m6475 TOOL_Bs3Gcc64Elf64_CXX ?= x86_64-elf-g++$(HOSTSUFF_EXE) -m6476 else77 TOOL_Bs3Gcc64Elf64_CC ?= gcc$(HOSTSUFF_EXE) -m6478 TOOL_Bs3Gcc64Elf64_CXX ?= g++$(HOSTSUFF_EXE) -m6479 endif80 ifdef SLKRUNS81 TOOL_Bs3Gcc64Elf64_CC += -fmessage-length=082 TOOL_Bs3Gcc64Elf64_CXX += -fmessage-length=083 endif84 TOOL_Bs3Gcc64Elf64_COBJSUFF ?= .o85 TOOL_Bs3Gcc64Elf64_CFLAGS ?=86 TOOL_Bs3Gcc64Elf64_CFLAGS.debug ?= -g87 TOOL_Bs3Gcc64Elf64_CFLAGS.profile ?= -O2 #-g -pg88 TOOL_Bs3Gcc64Elf64_CFLAGS.release ?= -O289 TOOL_Bs3Gcc64Elf64_CINCS ?=90 TOOL_Bs3Gcc64Elf64_CDEFS ?=91 TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)92 TOOL_Bs3Gcc64Elf64_COMPILE_C_DEPORD =93 TOOL_Bs3Gcc64Elf64_COMPILE_C_OUTPUT =94 define TOOL_Bs3Gcc64Elf64_COMPILE_C_CMDS95 $(QUIET)$(TOOL_Bs3Gcc64Elf64_CC) -c\96 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\97 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\98 -o $(obj)\99 $(abspath $(source))100 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"101 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""102 endef103 104 TOOL_Bs3Gcc64Elf64_CXXOBJSUFF ?= .o105 TOOL_Bs3Gcc64Elf64_CXXOBJSUFF ?= .o106 TOOL_Bs3Gcc64Elf64_CXXFLAGS ?=107 TOOL_Bs3Gcc64Elf64_CXXFLAGS.debug ?= -g0 # no debug info, thank you108 TOOL_Bs3Gcc64Elf64_CXXFLAGS.profile ?= -O2 #-g -pg109 TOOL_Bs3Gcc64Elf64_CXXFLAGS.release ?= -O2110 TOOL_Bs3Gcc64Elf64_CXXINCS ?=111 TOOL_Bs3Gcc64Elf64_CXXDEFS ?=112 TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPEND = $(VBoxBs3ObjConverter_1_TARGET)113 TOOL_Bs3Gcc64Elf64_COMPILE_CXX_DEPORD =114 TOOL_Bs3Gcc64Elf64_COMPILE_CXX_OUTPUT =115 define TOOL_Bs3Gcc64Elf64_COMPILE_CXX_CMDS116 $(QUIET)$(TOOL_Bs3Gcc64Elf64_CXX) -c\117 $(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\118 -Wp,-MD,$(dep) -Wp,-MT,$(obj) -Wp,-MP\119 -o $(obj)\120 $(abspath $(source))121 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"122 $(QUIET)$(APPEND) -n "$(dep)" "" "$(source):" ""123 endef124 125 #126 # Visual C++ tool variant that runs the object converter afterwards.127 #128 TOOL_Bs3Vcc64 := Visual C++ 64-bit129 TOOL_Bs3Vcc64_CC = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CC)130 TOOL_Bs3Vcc64_CXX = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXX)131 TOOL_Bs3Vcc64_COBJSUFF = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COBJSUFF)132 TOOL_Bs3Vcc64_CFLAGS = $(filter-out -TC,$(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CFLAGS)) -TP # compile as C++133 TOOL_Bs3Vcc64_CFLAGS.debug =134 TOOL_Bs3Vcc64_CFLAGS.dbgopt = -O1135 TOOL_Bs3Vcc64_CFLAGS.profile = -O1136 TOOL_Bs3Vcc64_CFLAGS.release = -O1137 TOOL_Bs3Vcc64_CINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)138 TOOL_Bs3Vcc64_CDEFS =139 TOOL_Bs3Vcc64_COMPILE_C_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)140 TOOL_Bs3Vcc64_COMPILE_C_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_DEPORD)141 TOOL_Bs3Vcc64_COMPILE_C_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT)142 TOOL_Bs3Vcc64_COMPILE_C_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_OUTPUT_MAYBE)143 define TOOL_Bs3Vcc64_COMPILE_C_CMDS144 $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_C_CMDS)145 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"146 endef147 148 TOOL_Bs3Vcc64_CXXOBJSUFF = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXOBJSUFF)149 TOOL_Bs3Vcc64_CXXFLAGS = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_CXXFLAGS)150 TOOL_Bs3Vcc64_CXXFLAGS.debug =151 TOOL_Bs3Vcc64_CXXFLAGS.dbgopt = -O1152 TOOL_Bs3Vcc64_CXXFLAGS.profile = -O1153 TOOL_Bs3Vcc64_CXXFLAGS.release = -O1154 TOOL_Bs3Vcc64_CXXINCS = $(PATH_TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_INC)155 TOOL_Bs3Vcc64_CXXDEFS =156 TOOL_Bs3Vcc64_COMPILE_CXX_DEPEND = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)157 TOOL_Bs3Vcc64_COMPILE_CXX_DEPORD = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_DEPORD)158 TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT)159 TOOL_Bs3Vcc64_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_OUTPUT_MAYBE)160 define TOOL_Bs3Vcc64_COMPILE_CXX_CMDS161 $(TOOL_$(VBOX_VCC_TOOL_STEM)AMD64_COMPILE_CXX_CMDS)162 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"163 endef164 165 #166 # 32-bit OpenWatcom C/C++ tool variant that runs the object converter afterwards167 # to rename intrinsic functions so they don't clash with the 16-bit compiler.168 #169 TOOL_Bs3Ow32 := OpenWatcom C/C++ 32-bit with object convertsion170 TOOL_Bs3Ow32_CC = $(TOOL_OPENWATCOM_CC)171 TOOL_Bs3Ow32_CXX = $(TOOL_OPENWATCOM_CXX)172 TOOL_Bs3Ow32_COBJSUFF = $(TOOL_OPENWATCOM_COBJSUFF)173 TOOL_Bs3Ow32_CFLAGS = $(TOOL_OPENWATCOM_CFLAGS)174 # -adfs \ - This is too complicated and it doesn't support stubbing files (svn rename fun.h pain.h). Use kDepObj instead.175 # -ad=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dep)) \176 # -adt=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(obj)) \177 # -add=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(abspath $(source))) \178 # -adhp=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dir $(abspath $(source))))179 TOOL_Bs3Ow32_CFLAGS.debug = $(TOOL_OPENWATCOM_CFLAGS.debug)180 TOOL_Bs3Ow32_CFLAGS.dbgopt = $(TOOL_OPENWATCOM_CFLAGS.dbgopt)181 TOOL_Bs3Ow32_CFLAGS.profile = $(TOOL_OPENWATCOM_CFLAGS.profile)182 TOOL_Bs3Ow32_CFLAGS.release = $(TOOL_OPENWATCOM_CFLAGS.release)183 TOOL_Bs3Ow32_CINCS = $(TOOL_OPENWATCOM_CINCS)184 TOOL_Bs3Ow32_CDEFS =185 TOOL_Bs3Ow32_COMPILE_C_DEPEND = $(TOOL_OPENWATCOM_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)186 TOOL_Bs3Ow32_COMPILE_C_DEPORD = $(TOOL_OPENWATCOM_COMPILE_C_DEPORD)187 TOOL_Bs3Ow32_COMPILE_C_OUTPUT = $(TOOL_OPENWATCOM_COMPILE_C_OUTPUT)188 TOOL_Bs3Ow32_COMPILE_C_OUTPUT_MAYBE = $(TOOL_OPENWATCOM_COMPILE_C_OUTPUT_MAYBE)189 define TOOL_Bs3Ow32_COMPILE_C_CMDS190 $(TOOL_OPENWATCOM_COMPILE_C_CMDS)191 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"192 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"193 endef194 195 TOOL_Bs3Ow32_CXXOBJSUFF = $(TOOL_OPENWATCOM_CXXOBJSUFF)196 TOOL_Bs3Ow32_CXXFLAGS = $(TOOL_OPENWATCOM_CXXFLAGS) -ad=$(call TOOL_OPENWATCOM_FIX_SLASHES,$(dep)) -adfs197 TOOL_Bs3Ow32_CXXFLAGS.debug = $(TOOL_OPENWATCOM_CXXFLAGS.debug)198 TOOL_Bs3Ow32_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM_CXXFLAGS.dbgopt)199 TOOL_Bs3Ow32_CXXFLAGS.profile = $(TOOL_OPENWATCOM_CXXFLAGS.profile)200 TOOL_Bs3Ow32_CXXFLAGS.release = $(TOOL_OPENWATCOM_CXXFLAGS.release)201 TOOL_Bs3Ow32_CXXINCS = $(TOOL_OPENWATCOM_CXXINCS)202 TOOL_Bs3Ow32_CXXDEFS =203 TOOL_Bs3Ow32_COMPILE_CXX_DEPEND = $(TOOL_OPENWATCOM_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)204 TOOL_Bs3Ow32_COMPILE_CXX_DEPORD = $(TOOL_OPENWATCOM_COMPILE_CXX_DEPORD)205 TOOL_Bs3Ow32_COMPILE_CXX_OUTPUT = $(TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT)206 TOOL_Bs3Ow32_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_OPENWATCOM_COMPILE_CXX_OUTPUT_MAYBE)207 define TOOL_Bs3Ow32_COMPILE_CXX_CMDS208 $(TOOL_OPENWATCOM_COMPILE_CXX_CMDS)209 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"210 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"211 endef212 213 214 #215 # 16-bit OpenWatcom C/C++ tool variant that runs the object converter afterwards216 # to rename intrinsic functions so they don't clash with the 16-bit compiler.217 #218 TOOL_Bs3Ow16 := OpenWatcom C/C++ 16-bit with object convertsion219 TOOL_Bs3Ow16_CC = $(TOOL_OPENWATCOM-16_CC)220 TOOL_Bs3Ow16_CXX = $(TOOL_OPENWATCOM-16_CXX)221 TOOL_Bs3Ow16_COBJSUFF = $(TOOL_OPENWATCOM-16_COBJSUFF)222 TOOL_Bs3Ow16_CFLAGS = $(TOOL_OPENWATCOM-16_CFLAGS)223 TOOL_Bs3Ow16_CFLAGS.debug = $(TOOL_OPENWATCOM-16_CFLAGS.debug)224 TOOL_Bs3Ow16_CFLAGS.dbgopt = $(TOOL_OPENWATCOM-16_CFLAGS.dbgopt)225 TOOL_Bs3Ow16_CFLAGS.profile = $(TOOL_OPENWATCOM-16_CFLAGS.profile)226 TOOL_Bs3Ow16_CFLAGS.release = $(TOOL_OPENWATCOM-16_CFLAGS.release)227 TOOL_Bs3Ow16_CINCS = $(TOOL_OPENWATCOM-16_CINCS)228 TOOL_Bs3Ow16_CDEFS =229 TOOL_Bs3Ow16_COMPILE_C_DEPEND = $(TOOL_OPENWATCOM-16_COMPILE_C_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)230 TOOL_Bs3Ow16_COMPILE_C_DEPORD = $(TOOL_OPENWATCOM-16_COMPILE_C_DEPORD)231 TOOL_Bs3Ow16_COMPILE_C_OUTPUT = $(TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT)232 TOOL_Bs3Ow16_COMPILE_C_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-16_COMPILE_C_OUTPUT_MAYBE)233 define TOOL_Bs3Ow16_COMPILE_C_CMDS234 $(TOOL_OPENWATCOM-16_COMPILE_C_CMDS)235 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"236 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"237 endef238 239 TOOL_Bs3Ow16_CXXOBJSUFF = $(TOOL_OPENWATCOM-16_CXXOBJSUFF)240 TOOL_Bs3Ow16_CXXFLAGS = $(TOOL_OPENWATCOM-16_CXXFLAGS)241 TOOL_Bs3Ow16_CXXFLAGS.debug = $(TOOL_OPENWATCOM-16_CXXFLAGS.debug)242 TOOL_Bs3Ow16_CXXFLAGS.dbgopt = $(TOOL_OPENWATCOM-16_CXXFLAGS.dbgopt)243 TOOL_Bs3Ow16_CXXFLAGS.profile = $(TOOL_OPENWATCOM-16_CXXFLAGS.profile)244 TOOL_Bs3Ow16_CXXFLAGS.release = $(TOOL_OPENWATCOM-16_CXXFLAGS.release)245 TOOL_Bs3Ow16_CXXINCS = $(TOOL_OPENWATCOM-16_CXXINCS)246 TOOL_Bs3Ow16_CXXDEFS =247 TOOL_Bs3Ow16_COMPILE_CXX_DEPEND = $(TOOL_OPENWATCOM-16_COMPILE_CXX_DEPEND) $(VBoxBs3ObjConverter_1_TARGET)248 TOOL_Bs3Ow16_COMPILE_CXX_DEPORD = $(TOOL_OPENWATCOM-16_COMPILE_CXX_DEPORD)249 TOOL_Bs3Ow16_COMPILE_CXX_OUTPUT = $(TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT)250 TOOL_Bs3Ow16_COMPILE_CXX_OUTPUT_MAYBE = $(TOOL_OPENWATCOM-16_COMPILE_CXX_OUTPUT_MAYBE)251 define TOOL_Bs3Ow16_COMPILE_CXX_CMDS252 $(TOOL_OPENWATCOM-16_COMPILE_CXX_CMDS)253 $(QUIET)$(VBoxBs3ObjConverter_1_TARGET) "$(obj)"254 $(QUIET)$(REDIRECT) -wo /dev/null -- $(KBUILD_BIN_PATH)/kDepObj$(HOSTSUFF_EXE) -s -f -q -o "$(dep)" -t "$(obj)" "$(obj)"255 endef256 257 # Debug info format depends on what we use for 64-bit.258 if1of ($(KBUILD_HOST), win)259 BS3_OW_DBG_OPT = -hc260 BS3_OW_DBG_LDOPT = codeview261 else262 BS3_OW_DBG_OPT = -hd263 BS3_OW_DBG_LDOPT = dwarf264 endif265 266 #267 # BS3Kit template for assembly and 16-bit code.268 #269 # Note! Using -d1 as -d1+ and -d2 causes suboptimal code to be generated (strlen270 # reloading string pointer argument all the time).271 # Note! Optimization options should come after debug stuff as -d2 for instance272 # disables all optimziations.273 #274 # Compiler options explained:275 # -nt=xxxx Sets the text segment name.276 # -nc=xxxx Sets the text segment class name.277 # -nd=xxxx Sets the data segment name.278 # -ecc Sets the default calling convension to __cdecl279 # Update: We don't use this in 16-bit code as it causes unfavorable reloading of DS before calling280 # inlined functions (e.g. iprt/asm.h). Instead we use -ecw and __cdecl where needed.281 # -ecw Sets the default calling convension to __watcall ()282 # -q Quiet, no logos or stuff.283 # -3 Use 386 instruction set (16-bit only).284 # -wx Maxium warning level.285 # -zl Don't emit default library information.286 # -zu Assume SS != DS.287 # -mc Compact memory model, far data, small code.288 # -mf Flat memory model (32-bit).289 # -d1 Debug info: Globals and line numbers.290 # -s No stack overflow checks.291 # -oa Relaxed aliasing constraints.292 # -ob Branch prediction.293 # -of Generate stack frames when needed.294 # -oi Inline instrinsics functions.295 # -ol Loop optimizations.296 # -or Reorder for best pipeline.297 # -os Favor size over speed.298 #299 TEMPLATE_VBoxBS3KitImg = Template for building BS3Kit test images.300 TEMPLATE_VBoxBS3KitImg_BLD_TRG = os-agnostic301 TEMPLATE_VBoxBS3KitImg_BLD_TRG_ARCH = x86302 TEMPLATE_VBoxBS3KitImg_INST = $(INST_VALIDATIONKIT)bootsectors/303 TEMPLATE_VBoxBS3KitImg_BINSUFF = .img304 TEMPLATE_VBoxBS3KitImg_MODE = 0644305 TEMPLATE_VBoxBS3KitImg_ASTOOL = NASM306 TEMPLATE_VBoxBS3KitImg_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels307 TEMPLATE_VBoxBS3KitImg_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__308 TEMPLATE_VBoxBS3KitImg_DEFS = ARCH_BITS=16 IN_BS3KIT309 TEMPLATE_VBoxBS3KitImg_DEFS.debug = BS3_STRICT310 TEMPLATE_VBoxBS3KitImg_ARTOOL = OPENWATCOM-16311 TEMPLATE_VBoxBS3KitImg_CTOOL = Bs3Ow16312 TEMPLATE_VBoxBS3KitImg_CXXTOOL = Bs3Ow16313 TEMPLATE_VBoxBS3KitImg_CFLAGS = \314 -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 -os315 TEMPLATE_VBoxBS3KitImg_CXXFLAGS = \316 -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 -os317 TEMPLATE_VBoxBS3KitImg_INCS = $(VBOX_PATH_BS3KIT_SRC) .318 TEMPLATE_VBoxBS3KitImg_LDTOOL = OPENWATCOM-WL319 # option quiet, nofarcalls\320 # disable 1014, 1023, 2120, 1080321 322 # linker options:323 # system dos: Link a 16-bit DOS binary.324 # output raw ...: Produce a raw DOS binary for loading at flat address 10000h.325 # The following is for ordering segments.326 # option start=_start: The start symbol in bs3-first-xxx.asm.327 # debug codeview/dwarf all: Full debug information either in codeview or dwarf.328 # option symfile: Produce a separate symbol file with the debug info.329 # option map: Produce a map file.330 # option statics: ?331 # option verbose: Verbose map file?332 # option disable 1014: Disable warning about333 # option disable 1080: Disable warning about334 # option disable 1150: Disable warning about335 #336 # Note! We're pushing DATA16 to 0x20000 because it's impossible to force wlink337 # to give us a real-mode + GDT compatible alignment (0ffffff80h), i.e.338 # real-mode address on the form 0fff8:0000.339 TEMPLATE_VBoxBS3KitImg_LDFLAGS = system dos \340 debug $(BS3_OW_DBG_LDOPT) all \341 option quiet, map, statics, verbose, symfile, start=_start \342 disable 1014, 1080, 1150 \343 \344 output raw offset=0x10000 \345 order \346 clname BS3FLAT segaddr=0x0000 \347 segment BS3FLAT segaddr=0x0000 \348 clname BS3CODE16 segaddr=0x1000 \349 segment BS3TEXT16 \350 segment BS3TEXT16_END \351 clname BS3SYSTEM16 segaddr=0x2000 \352 segment BS3SYSTEM16 \353 clname FAR_DATA \354 segment BS3DATA16 segaddr=0x2700 \355 segment BS3DATA16CONST \356 segment BS3DATA16CONST2 \357 segment BS3DATA16_DATA \358 segment BS3DATA16_END \359 segment BS3DATA32 \360 segment BS3DATA32_CONST \361 segment BS3DATA32_CONST2 \362 segment BS3DATA32_DATA \363 segment DATA32 \364 clname BS3CODE32 \365 segment BS3TEXT32 \366 segment TEXT32 \367 clname CODE \368 segment BS3TEXT64 \369 segment TEXT64 \370 segment .text \371 segment .rdata \372 clname DATA \373 segment BS3DATA64 \374 segment DATA64 \375 segment .data \376 segment .pdata \377 segment .xdata \378 379 TEMPLATE_VBoxBS3KitImg_DEPS = \380 $(bs3-bootsector_1_TARGET) \381 $(VBoxBs3Linker_1_TARGET)382 TEMPLATE_VBoxBS3KitImg_POST_CMDS = $(if $(eq $(tool_do),LINK_LIBRARY)\383 ,,$(QUIET)$(MV_EXT) -f -- "$(out)" "$(out).tmp" \384 $$(NLTAB)$(QUIET)$(VBoxBs3Linker_1_TARGET) -o $(out) $(bs3-bootsector_1_TARGET) $(out).tmp \385 $$(NLTAB)$(QUIET)$(RM_EXT) -f -- "$(out).tmp")386 387 TEMPLATE_VBoxBS3KitImg_LIBS = \388 $(PATH_OBJ)/bs3kit-common-16/bs3kit-common-16.lib \389 $(PATH_OBJ)/bs3kit-common-32/bs3kit-common-32.lib \390 $(PATH_OBJ)/bs3kit-common-64-asm/bs3kit-common-64-asm.lib \391 $(PATH_OBJ)/bs3kit-common-64-c/bs3kit-common-64-c.lib \392 \393 $(PATH_OBJ)/bs3kit-rm/bs3kit-rm.lib \394 $(PATH_OBJ)/bs3kit-pe16/bs3kit-pe16.lib \395 $(PATH_OBJ)/bs3kit-pe32/bs3kit-pe32.lib \396 $(PATH_OBJ)/bs3kit-pev86/bs3kit-pev86.lib \397 $(PATH_OBJ)/bs3kit-pp16/bs3kit-pp16.lib \398 $(PATH_OBJ)/bs3kit-pp32/bs3kit-pp32.lib \399 $(PATH_OBJ)/bs3kit-ppv86/bs3kit-ppv86.lib \400 $(PATH_OBJ)/bs3kit-pae16/bs3kit-pae16.lib \401 $(PATH_OBJ)/bs3kit-pae32/bs3kit-pae32.lib \402 $(PATH_OBJ)/bs3kit-paev86/bs3kit-paev86.lib \403 $(PATH_OBJ)/bs3kit-lm16/bs3kit-lm16.lib \404 $(PATH_OBJ)/bs3kit-lm32/bs3kit-lm32.lib \405 $(PATH_OBJ)/bs3kit-lm64-asm/bs3kit-lm64-asm.lib \406 $(PATH_OBJ)/bs3kit-lm64-c/bs3kit-lm64-c.lib407 408 # BS3Kit template for 32-bit code.409 TEMPLATE_VBoxBS3KitImg32 = Template for building BS3Kit test images.410 TEMPLATE_VBoxBS3KitImg32_BLD_TRG = os-agnostic411 TEMPLATE_VBoxBS3KitImg32_BLD_TRG_ARCH = x86412 TEMPLATE_VBoxBS3KitImg32_INSTTYPE = none413 TEMPLATE_VBoxBS3KitImg32_ASTOOL = NASM414 TEMPLATE_VBoxBS3KitImg32_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels415 TEMPLATE_VBoxBS3KitImg32_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__416 TEMPLATE_VBoxBS3KitImg32_DEFS = ARCH_BITS=32 IN_BS3KIT417 TEMPLATE_VBoxBS3KitImg32_DEFS.debug = BS3_STRICT418 TEMPLATE_VBoxBS3KitImg32_ARTOOL = OPENWATCOM419 TEMPLATE_VBoxBS3KitImg32_CTOOL = Bs3Ow32420 TEMPLATE_VBoxBS3KitImg32_CXXTOOL = Bs3Ow32421 TEMPLATE_VBoxBS3KitImg32_CFLAGS = \422 -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CODE32 -ecc -q -wx -zl -mf $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os423 TEMPLATE_VBoxBS3KitImg32_CXXFLAGS = \424 -nt=BS3TEXT32 -nd=BS3DATA32 -nc=BS3CODE32 -ecc -q -wx -zl -mf $(BS3_OW_DBG_OPT) -d1 -s -oa -ob -of -oi -ol -or -os425 TEMPLATE_VBoxBS3KitImg32_INCS = $(VBOX_PATH_BS3KIT_SRC) .426 TEMPLATE_VBoxBS3KitImg32_LDTOOL = VBoxBsUnusedLd427 428 # BS3Kit template for 64-bit code.429 TEMPLATE_VBoxBS3KitImg64 = Template for building BS3Kit test images.430 TEMPLATE_VBoxBS3KitImg64_BLD_TRG = os-agnostic431 TEMPLATE_VBoxBS3KitImg64_BLD_TRG_ARCH = amd64432 TEMPLATE_VBoxBS3KitImg64_INSTTYPE = none433 TEMPLATE_VBoxBS3KitImg64_ASTOOL = NASM434 TEMPLATE_VBoxBS3KitImg64_ASFLAGS = -f obj -g --allow-64bit-code-anywhere -w+orphan-labels435 TEMPLATE_VBoxBS3KitImg64_ASDEFS = ASM_FORMAT_OMF RT_NOINC_SEGMENTS __NASM__436 TEMPLATE_VBoxBS3KitImg64_DEFS = IN_BS3KIT ARCH_BITS=64437 TEMPLATE_VBoxBS3KitImg64_DEFS.debug = BS3_STRICT438 TEMPLATE_VBoxBS3KitImg64_ARTOOL = OPENWATCOM439 TEMPLATE_VBoxBS3KitImg64_INCS = $(VBOX_PATH_BS3KIT_SRC) .440 if1of ($(KBUILD_HOST), win)441 TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Vcc64442 TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Vcc64443 TEMPLATE_VBoxBS3KitImg64_CFLAGS = -Zi -O1 -Oi -GF -GS- -Gy -Gs65536444 TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -Zi -O1 -Oi -GF -GS- -Gy -Gs65536445 else446 TEMPLATE_VBoxBS3KitImg64_CTOOL := Bs3Gcc64Elf64447 TEMPLATE_VBoxBS3KitImg64_CXXTOOL := Bs3Gcc64Elf64448 # Note! -mx32 would be exactly what we needed here, however it causes internal compiler errors with 4.8.4 on gentoo.449 TEMPLATE_VBoxBS3KitImg64_CFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_WARN_PEDANTIC_C)450 TEMPLATE_VBoxBS3KitImg64_CXXFLAGS = -m64 -maccumulate-outgoing-args -g -Os -fno-omit-frame-pointer $(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_WARN_PEDANTIC_CXX)451 endif452 TEMPLATE_VBoxBS3KitImg64_LDTOOL = VBoxBsUnusedLd453 454 # BS3Kit template for the bootsector.455 TEMPLATE_VBoxBS3KitBS = Template for building BS3Kit test images.456 TEMPLATE_VBoxBS3KitBS_BLD_TRG = os-agnostic457 TEMPLATE_VBoxBS3KitBS_BLD_TRG_ARCH = x86458 TEMPLATE_VBoxBS3KitBS_INST = $(INST_VALIDATIONKIT)bootsectors/459 TEMPLATE_VBoxBS3KitBS_INSTTYPE = none460 TEMPLATE_VBoxBS3KitBS_BINSUFF = .img461 TEMPLATE_VBoxBS3KitBS_MODE = 0644462 TEMPLATE_VBoxBS3KitBS_ASTOOL = YASM463 TEMPLATE_VBoxBS3KitBS_ASFLAGS = -f bin --mapfile464 TEMPLATE_VBoxBS3KitBS_ASDEFS = ASM_FORMAT_BIN RT_NOINC_SEGMENTS ARCH_BITS=16 __YASM__465 TEMPLATE_VBoxBS3KitBS_INCS = $(VBOX_PATH_BS3KIT_SRC) .466 TEMPLATE_VBoxBS3KitBS_LDTOOL = VBoxBsCpLd467 468 #469 # ----- Config.kmk: end -----470 #471 42 472 43 … … 475 46 bs3-bootsector_TEMPLATE = VBoxBS3KitBS 476 47 bs3-bootsector_SOURCES = bs3-bootsector.asm 48 477 49 478 50 #
Note:
See TracChangeset
for help on using the changeset viewer.