VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/BIOS-new/Makefile.kmk@ 41503

Last change on this file since 41503 was 41503, checked in by vboxsync, 13 years ago

Makefile.kmk: Header fix and if hack.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1# $Id: Makefile.kmk 41503 2012-05-30 17:58:34Z vboxsync $
2## @file
3# Sub-Makefile for the New BIOS ROM.
4#
5
6#
7# Copyright (C) 2012 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
18SUB_DEPTH = ../../../../..
19include $(KBUILD_PATH)/subheader.kmk
20
21## @todo move to Config.kmk.
22ifndef VBOX_WITHOUT_OPEN_WATCOM
23 if1of ($(KBUILD_TARGET), os2 win linux)
24 VBOX_WITH_OPEN_WATCOM := 1
25 endif
26endif
27
28
29ifdef VBOX_WITH_OPEN_WATCOM
30
31 #
32 # VBoxBios - Template for building the BIOS bits.
33 #
34 TEMPLATE_VBoxBios = PXE ROM
35 TEMPLATE_VBoxBios_TOOL = OPENWATCOM-16
36 TEMPLATE_VBoxBios_LDTOOL = OPENWATCOM-WL
37 TEMPLATE_VBoxBios_ASTOOL = OPENWATCOM-16
38 TEMPLATE_VBoxBios_BLD_TRG = os-agnostic
39 TEMPLATE_VBoxBios_BLD_TRG_ARCH = x86
40 TEMPLATE_VBoxBios_BINSUFF = .rom
41 TEMPLATE_VBoxBios_INCS = .
42 TEMPLATE_VBoxBios_ASFLAGS = -q -0 -wx
43 TEMPLATE_VBoxBios_CFLAGS = -q -0 -wx -zu -s -oas -d1+ -ms
44 TEMPLATE_VBoxBios_DEFS = \
45 VBOX_PC_BIOS \
46 VBOX_LANBOOT_SEG=0xE200 \
47 VBOX_VERSION_STRING=\"0.9\" \
48 VBOX_WITH_SCSI \
49 VBOX_WITH_AHCI
50 TEMPLATE_VBoxBios_LDFLAGS = system dos \
51 debug all \
52 option quiet, nofarcalls, map, verbose, statics, symfile \
53 output raw offset=0xF0000 order \
54 clname DATA segaddr=0xF000 segment _DATA \
55 clname CODE \
56 segment _TEXT segaddr=0xF000 offset=0x1600 \
57 segment BIOS32 segaddr=0xF000 offset=0xDE00 \
58 segment BIOSSEG segaddr=0xF000 offset=0xE000 \
59 library clibs.lib \
60 disable 1014, 1023, 2120
61 TEMPLATE_VBoxBios_LNK_DEPS = $(VBOX_BIOSSUMS)
62 TEMPLATE_VBoxBios_POST_CMDS = \
63 $(QUIET)$(EXT_MV) -f $(out) $(out).tmp \
64 && $(VBOX_BIOSSUMS) $(out).tmp $(out) \
65 && $(EXT_RM) -f $(out).tmp
66
67
68 #
69 # VBoxPcBios - The PC BIOS.
70 #
71 MISCBINS += VBoxPcBios
72 VBoxPcBios_TEMPLATE = VBoxBios
73 VBoxPcBios_SOURCES = \
74 bios.c \
75 print.c \
76 ata.c \
77 floppy.c \
78 eltorito.c \
79 boot.c \
80 keyboard.c \
81 disk.c \
82 serial.c \
83 system.c \
84 timepci.c \
85 ps2mouse.c \
86 parallel.c \
87 logo.c \
88 scsi.c \
89 ahci.c \
90 pciutil.c \
91 vds.c \
92 pcibio32.asm \
93 orgs.asm
94
95 #
96 # Updates the alternative source file.
97 #
98 update-bios-source | $(PATH_SUB_CURRENT)/VBoxBiosAlternative.asm: \
99 $$(VBoxPcBios_1_TARGET) \
100 $$(MakeDebianBiosAssembly_1_TARGET)
101 $(MakeDebianBiosAssembly_1_TARGET) \
102 --bios-image $< \
103 --bios-map $(basename $<).map \
104 --bios-sym $(basename $<).sym \
105 --output $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm
106 $(QUIET)yasm -f bin -o $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm
107 $(CMP) -l -- $< $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin
108 @if $(CMP_EXT) -s -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm $(PATH_ROOT)/src/VBox/Devices/PC/BIOS-new/VBoxBiosAlternative.asm; \
109 then \
110 $(CP_EXT) -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm $(PATH_ROOT)/src/VBox/Devices/PC/BIOS-new/VBoxBiosAlternative.asm; \
111 fi
112 $(RM) -f -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin
113
114endif # VBOX_WITH_OPEN_WATCOM
115
116
117#
118# The library containing the PC BIOS image.
119#
120LIBRARIES += PcBiosBin
121PcBiosBin_TEMPLATE = VBOXR3
122PcBiosBin_DEFS = IN_VBOXDD2
123PcBiosBin_SOURCES = $(PcBiosBin_0_OUTDIR)/PcBiosBin.c
124PcBiosBin_CLEAN = $(PcBiosBin_0_OUTDIR)/PcBiosBin.c
125
126ifdef VBOX_WITH_OPEN_WATCOM
127 $$(PcBiosBin_0_OUTDIR)/PcBiosBin.c: $$(VBoxPcBios_1_TARGET) $(VBOX_BIN2C) | $$(dir $$@)
128 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
129 $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $< $@
130else
131 $$(PcBiosBin_0_OUTDIR)/PcBiosBin.c: $(PATH_SUB_CURRENT)/VBoxBiosAlternative.asm $(VBOX_BIN2C) | $$(dir $$@)
132 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
133 $(QUIET)yasm -f bin -o $(PcBiosBin_0_OUTDIR)/VBoxBiosAlternative.bin $<
134 $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $(PcBiosBin_0_OUTDIR)/VBoxBiosAlternative.bin $@
135 $(QUIET)$(RM) -f -- $$(PcBiosBin_0_OUTDIR)/VBoxBiosAlternative.bin
136endif
137
138
139#
140# MakeDebianBiosAssembly - For distros without OpenWatcom.
141#
142PROGRAMS += MakeDebianBiosAssembly ## TODO this is build program, really. later.
143MakeDebianBiosAssembly_TEMPLATE = VBOXR3EXE
144MakeDebianBiosAssembly_DEFS = IN_DIS
145MakeDebianBiosAssembly_SOURCES = MakeDebianBiosAssembly.cpp
146MakeDebianBiosAssembly_LIBS = \
147 $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
148 $(LIB_RUNTIME)
149
150
151include $(FILE_KBUILD_SUB_FOOTER)
152
Note: See TracBrowser for help on using the repository browser.

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