VirtualBox

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

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

build prog prep.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 KB
Line 
1# $Id: Makefile.kmk 41657 2012-06-11 22:20:59Z 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
22ifdef VBOX_WITH_OPEN_WATCOM
23
24 #
25 # VBoxBios - Template for building the BIOS bits.
26 #
27 TEMPLATE_VBoxBios = PXE ROM
28 TEMPLATE_VBoxBios_TOOL = OPENWATCOM-16
29 TEMPLATE_VBoxBios_LDTOOL = OPENWATCOM-WL
30 TEMPLATE_VBoxBios_ASTOOL = OPENWATCOM-16
31 TEMPLATE_VBoxBios_BLD_TRG = os-agnostic
32 TEMPLATE_VBoxBios_BLD_TRG_ARCH = x86
33 TEMPLATE_VBoxBios_BINSUFF = .rom
34 TEMPLATE_VBoxBios_INCS = .
35 TEMPLATE_VBoxBios_ASFLAGS = -q -wx
36 TEMPLATE_VBoxBios_CFLAGS = -q -3 -wx -zl -zu -s -oas -d1+ -ms
37 TEMPLATE_VBoxBios_DEFS = \
38 VBOX_PC_BIOS \
39 VBOX_LANBOOT_SEG=0xE200 \
40 VBOX_VERSION_STRING=\"$(VBOX_VERSION_STRING)\" \
41 VBOX_WITH_SCSI \
42 VBOX_WITH_AHCI
43 TEMPLATE_VBoxBios_LDFLAGS = system dos \
44 debug all \
45 option quiet, nofarcalls, map, verbose, statics, symfile \
46 output raw offset=0xF0000 order \
47 clname DATA segaddr=0xF000 segment _DATA \
48 clname CODE \
49 segment _TEXT segaddr=0xF000 offset=0x1600 \
50 segment BIOS32 segaddr=0xF000 offset=0xDE00 \
51 segment BIOSSEG segaddr=0xF000 offset=0xE000 \
52 disable 1014, 1023, 2120
53 TEMPLATE_VBoxBios_LNK_DEPS = $(VBOX_BIOSSUMS)
54 TEMPLATE_VBoxBios_POST_CMDS = \
55 $(QUIET)$(MV_EXT) -f $(out) $(out).tmp \
56 && $(VBOX_BIOSSUMS) $(out).tmp $(out) \
57 && $(RM_EXT) -f $(out).tmp
58
59
60 #
61 # VBoxPcBios - The PC BIOS.
62 #
63 MISCBINS += VBoxPcBios
64 VBoxPcBios_TEMPLATE = VBoxBios
65 VBoxPcBios_SOURCES = \
66 bios.c \
67 print.c \
68 ata.c \
69 floppy.c \
70 eltorito.c \
71 boot.c \
72 keyboard.c \
73 disk.c \
74 serial.c \
75 system.c \
76 timepci.c \
77 ps2mouse.c \
78 parallel.c \
79 logo.c \
80 scsi.c \
81 ahci.c \
82 pciutil.c \
83 vds.c \
84 support.asm \
85 pcibio32.asm \
86 orgs.asm
87
88 #
89 # Updates the alternative source file.
90 #
91 update-bios-source | $(PATH_SUB_CURRENT)/VBoxBiosAlternative.asm $(PATH_SUB_CURRENT)/VBoxBiosAlternative.md5sum: \
92 $$(VBoxPcBios_1_TARGET) \
93 $$(MakeDebianBiosAssembly_1_TARGET)
94 if1of ($(KBUILD_TYPE), release)
95 $(MakeDebianBiosAssembly_1_TARGET) \
96 --bios-image $< \
97 --bios-map $(basename $<).map \
98 --bios-sym $(basename $<).sym \
99 --output $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm
100 $(QUIET)yasm -f bin -o $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm
101 $(CMP) -l -- $< $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin
102 $(CP) --changed -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm $(PATH_ROOT)/src/VBox/Devices/PC/BIOS-new/VBoxBiosAlternative.asm
103 $(REDIRECT) -C $(dir $(VBoxPcBios_1_TARGET)) -- \
104 $(MD5SUM_EXT) -bo $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.md5sum $(notdir $(VBoxPcBios_1_TARGET))
105 $(CP) --changed -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.md5sum $(PATH_ROOT)/src/VBox/Devices/PC/BIOS-new/VBoxBiosAlternative.md5sum
106 $(RM) -f -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.md5sum
107 else
108 $(QUIET)$(ECHO) "Fatal error: Can only update VBoxBiosAlternative.asm/md5sum with a release build."
109 $(QUIET)exit 1
110 endif
111
112endif # VBOX_WITH_OPEN_WATCOM
113
114
115#
116# The library containing the PC BIOS image.
117#
118LIBRARIES += PcBiosBin
119PcBiosBin_TEMPLATE = VBOXR3
120PcBiosBin_DEFS = IN_VBOXDD2
121PcBiosBin_SOURCES = $(PcBiosBin_0_OUTDIR)/PcBiosBin.c
122PcBiosBin_CLEAN = $(PcBiosBin_0_OUTDIR)/PcBiosBin.c
123
124ifdef VBOX_WITH_OPEN_WATCOM
125 $$(PcBiosBin_0_OUTDIR)/PcBiosBin.c: $$(VBoxPcBios_1_TARGET) $(VBOX_BIN2C) | $$(dir $$@)
126 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
127 $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $< $@
128else
129 PcBiosBin_CLEAN += $(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom
130
131 $$(PcBiosBin_0_OUTDIR)/PcBiosBin.c + $$(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom: \
132 $(PATH_SUB_CURRENT)/VBoxBiosAlternative.asm \
133 $(PATH_SUB_CURRENT)/VBoxBiosAlternative.md5sum \
134 $(VBOX_BIN2C) | $$(dir $$@)
135 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
136 $(QUIET)yasm -f bin -o $(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom $<
137 $(QUIET)$(REDIRECT) -C $(PcBiosBin_0_OUTDIR) -- \
138 $(MD5SUM_EXT) -c $(basename $<).md5sum
139 $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom $@
140 $(QUIET)$(RM) -f -- $$(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom
141endif
142
143
144#
145# MakeDebianBiosAssembly - For distros without OpenWatcom.
146#
147ifdef TODO_LATER
148BLDPROGS += MakeDebianBiosAssembly
149MakeDebianBiosAssembly_TEMPLATE = VBoxAdvBldProg
150MakeDebianBiosAssembly_DEFS = IN_DIS
151MakeDebianBiosAssembly_SOURCES = MakeDebianBiosAssembly.cpp
152MakeDebianBiosAssembly_LIBS = \
153 $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB)
154ifdef IPRT_WITH_KSTUFF
155MakeDebianBiosAssembly_LIBS += \
156 $(PATH_STAGE_LIB)/VBox-kStuff$(VBOX_SUFF_LIB)
157endif
158else
159PROGRAMS += MakeDebianBiosAssembly ## TODO this is build program, really. later.
160MakeDebianBiosAssembly_TEMPLATE = VBOXR3EXE
161MakeDebianBiosAssembly_DEFS = IN_DIS
162MakeDebianBiosAssembly_SOURCES = MakeDebianBiosAssembly.cpp
163MakeDebianBiosAssembly_LIBS = \
164 $(PATH_STAGE_LIB)/DisasmR3$(VBOX_SUFF_LIB) \
165 $(LIB_RUNTIME)
166endif
167
168include $(FILE_KBUILD_SUB_FOOTER)
169
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