VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/BIOS/Makefile.kmk@ 42357

Last change on this file since 42357 was 42357, checked in by vboxsync, 12 years ago

PCBIOS: Enabled the 32-bit pci bios code.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.1 KB
Line 
1# $Id: Makefile.kmk 42357 2012-07-24 12:29:29Z 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 # VBoxPcBios - The PC BIOS.
26 #
27 MISCBINS += VBoxPcBios
28 VBoxPcBios_TEMPLATE = VBoxBios
29 VBoxPcBios_DEFS = \
30 VBOX_PC_BIOS \
31 VBOX_LANBOOT_SEG=0xE200 \
32 VBOX_WITH_SCSI \
33 VBOX_WITH_AHCI
34 VBoxPcBios_LDFLAGS = \
35 output raw offset=0xF0000 \
36 order \
37 clname DATA segaddr=0xF000 \
38 segment _DATA \
39 clname CODE \
40 segment _TEXT segaddr=0xF000 offset=0x1600 \
41 segment BIOS32 segaddr=0xF000 offset=0xDB00 \
42 segment BIOSSEG segaddr=0xF000 offset=0xE000
43 VBoxPcBios_SOURCES = \
44 bios.c \
45 print.c \
46 ata.c \
47 floppy.c \
48 eltorito.c \
49 boot.c \
50 keyboard.c \
51 disk.c \
52 serial.c \
53 system.c \
54 timepci.c \
55 ps2mouse.c \
56 parallel.c \
57 logo.c \
58 scsi.c \
59 ahci.c \
60 pcibios.c \
61 pciutil.c \
62 vds.c \
63 ../../BiosCommonCode/support.asm \
64 pcibio32.asm \
65 $(VBoxPcBios32_1_TARGET) \
66 orgs.asm
67
68 # For 32-bit C code in PC BIOS.
69 LIBRARIES += VBoxPcBios32Lib
70 VBoxPcBios32_TEMPLATE = VBoxBios32
71 VBoxPcBios32_SOURCES = \
72 pci32.c
73
74 #
75 # Updates the alternative source file.
76 #
77 update-pcbios-source +| $(PATH_SUB_CURRENT)/VBoxBiosAlternative.asm $(PATH_SUB_CURRENT)/VBoxBiosAlternative.md5sum: \
78 $$(VBoxPcBios_1_TARGET) \
79 $(VBOX_MAKE_ALTERNATIVE_SOURCE) \
80 $(VBOX_VBOXCMP)
81 if1of ($(KBUILD_TYPE), release)
82 $(VBOX_MAKE_ALTERNATIVE_SOURCE) \
83 --bios-image $< \
84 --bios-map $(basename $<).map \
85 --bios-sym $(basename $<).sym \
86 --bios-type system \
87 --output $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm
88 $(QUIET)yasm -f bin -o $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm
89 $(VBOX_VBOXCMP) $< $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin
90 $(CP) --changed -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm $(PATH_ROOT)/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative.asm
91 $(REDIRECT) -C $(dir $(VBoxPcBios_1_TARGET)) -- \
92 $(MD5SUM_EXT) -bo $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.md5sum $(notdir $(VBoxPcBios_1_TARGET))
93 $(CP) --changed -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.md5sum $(PATH_ROOT)/src/VBox/Devices/PC/BIOS/VBoxBiosAlternative.md5sum
94 $(RM) -f -- $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.asm $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.bin $(VBoxPcBios_0_OUTDIR)/VBoxBiosAlternative.md5sum
95 else
96 $(QUIET)$(ECHO) "Fatal error: Can only update VBoxBiosAlternative.asm/md5sum with a release build."
97 $(QUIET)exit 1
98 endif
99
100endif # VBOX_WITH_OPEN_WATCOM
101
102
103#
104# The library containing the PC BIOS image.
105#
106LIBRARIES += PcBiosBin
107PcBiosBin_TEMPLATE = VBOXR3
108PcBiosBin_DEFS = IN_VBOXDD2
109PcBiosBin_SOURCES = $(PcBiosBin_0_OUTDIR)/PcBiosBin.c
110PcBiosBin_CLEAN = $(PcBiosBin_0_OUTDIR)/PcBiosBin.c
111
112ifdef VBOX_WITH_OPEN_WATCOM
113 $$(PcBiosBin_0_OUTDIR)/PcBiosBin.c: $$(VBoxPcBios_1_TARGET) $(VBOX_BIN2C) | $$(dir $$@)
114 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
115 $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $< $@
116else
117 PcBiosBin_CLEAN += $(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom
118
119 $$(PcBiosBin_0_OUTDIR)/PcBiosBin.c + $$(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom: \
120 $(PATH_SUB_CURRENT)/VBoxBiosAlternative.asm \
121 $(PATH_SUB_CURRENT)/VBoxBiosAlternative.md5sum \
122 $(VBOX_BIN2C) | $$(dir $$@)
123 $(call MSG_TOOL,bin2c,PcBiosBin,$<,$@)
124 $(QUIET)yasm -f bin -o $(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom $<
125 $(QUIET)$(REDIRECT) -C $(PcBiosBin_0_OUTDIR) -- \
126 $(MD5SUM_EXT) -c $(basename $<).md5sum
127 $(QUIET)$(VBOX_BIN2C) -min 64 -max 256 -mask 0xffff -ascii -export PcBiosBinary $(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom $@
128 $(QUIET)$(RM) -f -- $$(PcBiosBin_0_OUTDIR)/VBoxPcBios.rom
129endif
130
131include $(FILE_KBUILD_SUB_FOOTER)
132
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