VirtualBox

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

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

Rule for updating the alternative bios source.

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