1 | # $Id: Makefile.kmk 46952 2013-07-03 20:45:26Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # Sub-Makefile for the New VGA 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 |
|
---|
18 | SUB_DEPTH = ../../../../..
|
---|
19 | include $(KBUILD_PATH)/subheader.kmk
|
---|
20 |
|
---|
21 |
|
---|
22 | ifdef VBOX_WITH_OPEN_WATCOM
|
---|
23 |
|
---|
24 | #
|
---|
25 | # VBoxVgaBios - The VGA BIOS.
|
---|
26 | #
|
---|
27 | MISCBINS += VBoxVgaBios
|
---|
28 | VBoxVgaBios_TEMPLATE = VBoxBios
|
---|
29 | VBoxVgaBios_ASFLAGS = -0
|
---|
30 | VBoxVgaBios_DEFS = VBE
|
---|
31 | VBoxVgaBios_SOURCES = \
|
---|
32 | vgarom.asm \
|
---|
33 | vberom.asm \
|
---|
34 | vgabios.c \
|
---|
35 | vbe.c
|
---|
36 | VBoxVgaBios_LDFLAGS = \
|
---|
37 | output raw offset=0xC0000 \
|
---|
38 | order \
|
---|
39 | clname CODE \
|
---|
40 | segment VGAROM segaddr=0xC000 \
|
---|
41 | segment _TEXT segaddr=0xC000 offset=0xA00 \
|
---|
42 | segment VBE32 segaddr=0xC000 offset=0x4600 \
|
---|
43 | clname DATA \
|
---|
44 | segment _DATA segaddr=0xC000 offset=0x4800 \
|
---|
45 |
|
---|
46 | #
|
---|
47 | # Updates the alternative source file.
|
---|
48 | #
|
---|
49 | update-vgabios-source +| $(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative.asm $(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative.md5sum: \
|
---|
50 | $$(VBoxVgaBios_1_TARGET) \
|
---|
51 | $(VBOX_MAKE_ALTERNATIVE_SOURCE) \
|
---|
52 | $(VBOX_VBOXCMP)
|
---|
53 | if1of ($(KBUILD_TYPE), release)
|
---|
54 | $(VBOX_MAKE_ALTERNATIVE_SOURCE) \
|
---|
55 | --bios-image $< \
|
---|
56 | --bios-map $(basename $<).map \
|
---|
57 | --bios-sym $(basename $<).sym \
|
---|
58 | --bios-type vga \
|
---|
59 | --output $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.asm
|
---|
60 | $(QUIET)yasm -f bin -o $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.bin $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.asm
|
---|
61 | $(VBOX_VBOXCMP) $< $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.bin
|
---|
62 | $(CP) --changed -- $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.asm $(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative.asm
|
---|
63 | $(REDIRECT) -C $(dir $(VBoxVgaBios_1_TARGET)) -- \
|
---|
64 | $(MD5SUM_EXT) -bo $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.md5sum $(notdir $(VBoxVgaBios_1_TARGET))
|
---|
65 | $(CP) --changed -- $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.md5sum $(PATH_ROOT)/src/VBox/Devices/Graphics/BIOS/VBoxVgaBiosAlternative.md5sum
|
---|
66 | $(RM) -f -- $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.asm $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.bin $(VBoxVgaBios_0_OUTDIR)/VBoxVgaBiosAlternative.md5sum
|
---|
67 | else
|
---|
68 | $(QUIET)$(ECHO) "Fatal error: Can only update VBoxVgaBiosAlternative.asm/md5sum with a release build."
|
---|
69 | $(QUIET)exit 1
|
---|
70 | endif
|
---|
71 |
|
---|
72 | endif # VBOX_WITH_OPEN_WATCOM
|
---|
73 |
|
---|
74 |
|
---|
75 | #
|
---|
76 | # The library containing the VGA BIOS image.
|
---|
77 | #
|
---|
78 | LIBRARIES += VgaBiosBin
|
---|
79 | VgaBiosBin_TEMPLATE = VBOXR3
|
---|
80 | VgaBiosBin_DEFS = IN_VBOXDD2
|
---|
81 | VgaBiosBin_SOURCES = \
|
---|
82 | $(VgaBiosBin_0_OUTDIR)/VgaBiosBin.c
|
---|
83 | VgaBiosBin_DEPS = \
|
---|
84 | $(VgaBiosBin_0_OUTDIR)/vbetables.h
|
---|
85 | VgaBiosBin_CLEAN = \
|
---|
86 | $(VgaBiosBin_0_OUTDIR)/VgaBiosBin.c \
|
---|
87 | $(VgaBiosBin_0_OUTDIR)/vbetables.h
|
---|
88 |
|
---|
89 | ifdef VBOX_WITH_OPEN_WATCOM
|
---|
90 | $$(VgaBiosBin_0_OUTDIR)/VgaBiosBin.c: $$(VBoxVgaBios_1_TARGET) $(VBOX_BIN2C) | $$(dir $$@)
|
---|
91 | $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
|
---|
92 | $(QUIET)$(VBOX_BIN2C) -min 32 -max 36 -mask 0x0fff -ascii -export VgaBiosBinary $< $@
|
---|
93 | else
|
---|
94 | VgaBiosBin_CLEAN += $(VgaBiosBin_0_OUTDIR)/VBoxVgaBios.rom
|
---|
95 |
|
---|
96 | $$(VgaBiosBin_0_OUTDIR)/VgaBiosBin.c + $$(VgaBiosBin_0_OUTDIR)/VBoxVgaBios.rom: \
|
---|
97 | $(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative.asm \
|
---|
98 | $(PATH_SUB_CURRENT)/VBoxVgaBiosAlternative.md5sum \
|
---|
99 | $(VBOX_BIN2C) | $$(dir $$@)
|
---|
100 | $(call MSG_TOOL,bin2c,VgaBiosBin,$<,$@)
|
---|
101 | $(QUIET)yasm -f bin -o $(VgaBiosBin_0_OUTDIR)/VBoxVgaBios.rom $<
|
---|
102 | $(QUIET)$(REDIRECT) -C $(VgaBiosBin_0_OUTDIR) -- \
|
---|
103 | $(MD5SUM_EXT) -c $(basename $<).md5sum
|
---|
104 | $(QUIET)$(VBOX_BIN2C) -min 32 -max 36 -mask 0x0fff -ascii -export VgaBiosBinary $(VgaBiosBin_0_OUTDIR)/VBoxVgaBios.rom $@
|
---|
105 | $(QUIET)$(RM) -f -- $$(VgaBiosBin_0_OUTDIR)/VBoxVgaBios.rom
|
---|
106 | endif
|
---|
107 |
|
---|
108 |
|
---|
109 | # Rule for making the vbetables.h that DevVGA uses.
|
---|
110 | $$(VgaBiosBin_0_OUTDIR)/vbetables.h: $(MAKEFILE_CURRENT) $$(vbetables-gen_1_TARGET) | $$(dir $$@)
|
---|
111 | $(QUIET)$(REDIRECT) -wo $@ -- $(vbetables-gen_1_TARGET)
|
---|
112 |
|
---|
113 |
|
---|
114 | #
|
---|
115 | # The VBE tables.
|
---|
116 | #
|
---|
117 | BLDPROGS += vbetables-gen
|
---|
118 | vbetables-gen_TEMPLATE = VBOXBLDPROG
|
---|
119 | vbetables-gen_SOURCES = vbetables-gen.c
|
---|
120 | vbetables-gen_CLEAN = $(vbetables-gen)
|
---|
121 |
|
---|
122 |
|
---|
123 | #
|
---|
124 | # The VGA BIOS Logo.
|
---|
125 | #
|
---|
126 | LIBRARIES += VgaDefBiosLogo
|
---|
127 | VgaDefBiosLogo_TEMPLATE = VBOXR3
|
---|
128 | VgaDefBiosLogo_INCS = $(VBOX_PATH_DEVICES_SRC)
|
---|
129 | VgaDefBiosLogo_SOURCES = $(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogo.c
|
---|
130 | VgaDefBiosLogo_CLEAN = $(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogo.c
|
---|
131 |
|
---|
132 | # Rule for making the bios logo.
|
---|
133 | $$(VgaDefBiosLogo_0_OUTDIR)/VgaDefBiosLogo.c: $(VBOX_BRAND_BIOS_LOGO) $(VBOX_BIN2C) | $$(dir $$@)
|
---|
134 | $(call MSG_TOOL,bin2c,VgaDefBiosLogo,$<,$@)
|
---|
135 | $(QUIET)$(VBOX_BIN2C) VgaDefBiosLogo $< $@
|
---|
136 |
|
---|
137 |
|
---|
138 | ifdef VBOX_WITH_OPEN_WATCOM
|
---|
139 | #
|
---|
140 | # Install the symbol file for the BIOS.
|
---|
141 | #
|
---|
142 | INSTALLS += VBoxVgaBiosSym
|
---|
143 | VBoxVgaBiosSym_TEMPLATE = VBoxDbgSyms
|
---|
144 | VBoxVgaBiosSym_SOURCES = $(basename $(VBoxVgaBios_1_TARGET)).sym
|
---|
145 | endif
|
---|
146 |
|
---|
147 | include $(FILE_KBUILD_SUB_FOOTER)
|
---|
148 |
|
---|