VirtualBox

source: vbox/trunk/src/VBox/Devices/PC/ipxe/Makefile.kmk@ 47928

最後變更 在這個檔案從47928是 47928,由 vboxsync 提交於 11 年 前

Devices/PC: export iPXE to OSE

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 9.5 KB
 
1# $Id: Makefile.kmk 47928 2013-08-20 14:50:45Z vboxsync $
2## @file
3# Sub-makefile for iPXE.
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#
17# Globals.
18#
19VBOX_PATH_IPXE_SRC := $(PATH_SUB_CURRENT)
20
21
22#
23# iPxeBiosBin - Library containing the iPXE ROM as a data blob.
24# Will be linked into VBoxDD2.
25#
26LIBRARIES += iPxeBiosBin
27iPxeBiosBin_TEMPLATE = VBOXR3
28iPxeBiosBin_DEFS = IN_VBOXDD2
29iPxeBiosBin_SOURCES = $(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c
30iPxeBiosBin_CLEAN = \
31 $(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c \
32
33if1of ($(KBUILD_TARGET), darwin os2 solaris win)
34 $$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c: $(PATH_SUB_CURRENT)/iPxeBiosBin.rom $(VBOX_BIN2C) | $$(dir $$@)
35 $(call MSG_TOOL,bin2c,iPxeBiosBin,$<,$@)
36 $(QUIET)$(VBOX_BIN2C) -min 32 -max 56 -mask 0x1ff -export NetBiosBinary $< $@
37
38else
39 iPxeBiosBin_CLEAN += \
40 $(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.rom \
41 $(iPxeBiosBin_0_OUTDIR)/iPxeBaseBin.rom.bin \
42 $(iPxeBiosBin_0_OUTDIR)/iPxeBaseBin.rom.zinfo
43
44 $$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.c: $$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.rom $(VBOX_BIN2C)
45 $(call MSG_TOOL,bin2c,iPxeBiosBin,$<,$@)
46 $(QUIET)$(VBOX_BIN2C) -min 32 -max 56 -mask 0x1ff -export NetBiosBinary $< $@
47
48
49 $$(iPxeBiosBin_0_OUTDIR)/iPxeBiosBin.rom: \
50 $$(iPxeBaseBin_1_TARGET) \
51 $$(ipxezbin_1_TARGET) \
52 $(VBOX_PATH_IPXE_SRC)/src/util/padimg.pl \
53 $(VBOX_PATH_IPXE_SRC)/src/util/fixrom.pl \
54 | $$(dir $$@)
55 $(call MSG_TOOL,zbin,iPxeBiosBin,$<,$@)
56 $(TOOL_$(VBOX_GCC32_TOOL)_OBJCOPY) -O binary -R .zinfo $< $(iPxeBiosBin_0_OUTDIR)/iPxeBaseBin.rom.bin
57 $(TOOL_$(VBOX_GCC32_TOOL)_OBJCOPY) -O binary -j .zinfo $< $(iPxeBiosBin_0_OUTDIR)/iPxeBaseBin.rom.zinfo
58 $(ipxezbin_1_TARGET) \
59 $(iPxeBiosBin_0_OUTDIR)/iPxeBaseBin.rom.bin \
60 $(iPxeBiosBin_0_OUTDIR)/iPxeBaseBin.rom.zinfo \
61 > $@
62 perl $(VBOX_PATH_IPXE_SRC)/src/util/padimg.pl --blksize=512 --byte=0xff $@
63 perl $(VBOX_PATH_IPXE_SRC)/src/util/fixrom.pl $@
64 $(RM) -- \
65 $(iPxeBiosBin_0_OUTDIR)/iPxeBaseBin.rom.bin \
66 $(iPxeBiosBin_0_OUTDIR)/iPxeBaseBin.rom.zinfo
67
68 #
69 # iPxeLinker - Linker tool used to link the ROM binary.
70 #
71 TOOL_iPxeLinker = iPXE LD tool.
72 TOOL_iPxeLinker_LINK_PROGRAM_OUTPUT =
73 TOOL_iPxeLinker_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map
74 TOOL_iPxeLinker_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).debug
75 TOOL_iPxeLinker_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).debug=>$(basename $(3)).debug
76 TOOL_iPxeLinker_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib)))\
77 $(filter %.def, $(othersrc))
78 TOOL_iPxeLinker_LINK_PROGRAM_DEPORD =
79 define TOOL_iPxeLinker_LINK_PROGRAM_CMDS
80 $(QUIET)ld $(flags) -o $(out) $(objs)\
81 $(foreach p,$(libpath), -L$(p))\
82 $(foreach lib,$(libs), $(if $(findstring $(lib),$(subst /,x,$(lib))), -l$(patsubst lib%,%,$(lib)), $(lib)))
83 endef
84
85 #
86 # iPXE - Template used to build the ROM binary.
87 #
88 TEMPLATE_iPxe = iPXE code
89 TEMPLATE_iPxe_TOOL = $(VBOX_GCC32_TOOL)
90 TEMPLATE_iPxe_LDTOOL = iPxeLinker
91 TEMPLATE_iPxe_LDFLAGS = \
92 -N \
93 --no-check-sections \
94 --gc-sections \
95 -T $(VBOX_PATH_IPXE_SRC)/src/arch/i386/scripts/i386.lds \
96 -u _rom_start --defsym check__rom_start=_rom_start \
97 -u obj_config --defsym check_obj_config=obj_config \
98 --defsym pci_vendor_id=0x8086 \
99 --defsym pci_device_id=0x100E \
100 -e _rom_start
101ifeq ($(KBUILD_TARGET), freebsd)
102 TEMPLATE_iPxe_LDFLAGS += -m elf_i386_fbsd
103else
104 TEMPLATE_iPxe_LDFLAGS += -m elf_i386
105endif
106 TEMPLATE_iPxe_LNK_DEPS = $(VBOX_PATH_IPXE_SRC)/src/arch/i386/scripts/i386.lds
107 TEMPLATE_iPxe_CFLAGS = \
108 -ffreestanding \
109 -ffunction-sections \
110 -march=i386 \
111 -fomit-frame-pointer \
112 -fstrength-reduce \
113 -falign-jumps=1 \
114 -falign-loops=1 \
115 -Os \
116 -falign-functions=1 \
117 -mpreferred-stack-boundary=2 \
118 -mregparm=3 \
119 -mrtd \
120 -freg-struct-return \
121 -fshort-wchar \
122 -Ui386 \
123 -Ulinux \
124 -include compiler.h \
125 -Wall \
126 -W \
127 -Wformat-nonliteral \
128 $(VBOX_GCC_fno-stack-protector) \
129 $(VBOX_GCC_fno-dwarf2-cfi-asm) \
130 $(VBOX_GCC_Wno-address)
131 TEMPLATE_iPxe_ASFLAGS = \
132 -ffreestanding \
133 -ffunction-sections \
134 -march=i386 \
135 -fomit-frame-pointer \
136 -fstrength-reduce \
137 -falign-jumps=1 \
138 -falign-loops=1 \
139 -falign-functions=1 \
140 -mpreferred-stack-boundary=2 \
141 -mregparm=3 \
142 -mrtd \
143 -freg-struct-return \
144 -fshort-wchar \
145 -Ui386 \
146 -Ulinux \
147 -include compiler.h \
148 -Wall \
149 -W \
150 -Wformat-nonliteral \
151 $(VBOX_GCC_fno-stack-protector) \
152 $(VBOX_GCC_fno-dwarf2-cfi-asm) \
153 $(VBOX_GCC_Wno-address) \
154 -DASSEMBLY
155 TEMPLATE_iPxe_DEFS = \
156 ARCH=i386 \
157 PLATFORM=pcbios \
158 VERSION_MAJOR=1 \
159 VERSION_MINOR=0 \
160 VERSION_PATCH=0 \
161 VERSION=\"1.0.0+\" \
162 _build_id=0xaffeaffe
163
164
165 #
166 # iPxeBaseBin - The iPXE ROM base binary.
167 #
168 PROGRAMS += iPxeBaseBin
169
170 iPxeBaseBin_TEMPLATE = iPxe
171
172 iPxeBaseBin_INCS = \
173 src \
174 src/include \
175 src/arch/x86/include \
176 src/arch/i386/include \
177 src/arch/i386/include/pcbios
178
179 iPxeBaseBin_SOURCES = \
180 src/arch/i386/core/basemem_packet.c \
181 src/arch/i386/core/relocate.c \
182 src/arch/i386/core/timer2.c \
183 src/arch/i386/firmware/pcbios/basemem.c \
184 src/arch/i386/firmware/pcbios/bios_console.c \
185 src/arch/i386/firmware/pcbios/hidemem.c \
186 src/arch/i386/firmware/pcbios/memmap.c \
187 src/arch/i386/hci/commands/reboot_cmd.c \
188 src/arch/i386/image/bootsector.c \
189 src/arch/i386/image/pxe_image.c \
190 src/arch/i386/interface/pcbios/bios_nap.c \
191 src/arch/i386/interface/pcbios/bios_smbios.c \
192 src/arch/i386/interface/pcbios/bios_timer.c \
193 src/arch/i386/interface/pcbios/biosint.c \
194 src/arch/i386/interface/pcbios/int13.c \
195 src/arch/i386/interface/pcbios/memtop_umalloc.c \
196 src/arch/i386/interface/pcbios/pcibios.c \
197 src/arch/i386/interface/pxe/pxe_call.c \
198 src/arch/i386/interface/pxe/pxe_file.c \
199 src/arch/i386/interface/pxe/pxe_loader.c \
200 src/arch/i386/interface/pxe/pxe_preboot.c \
201 src/arch/i386/interface/pxe/pxe_tftp.c \
202 src/arch/i386/interface/pxe/pxe_udp.c \
203 src/arch/i386/interface/pxe/pxe_undi.c \
204 src/arch/x86/core/x86_string.c \
205 src/config/config.c \
206 src/config/config_romprefix.c \
207 src/core/acpi.c \
208 src/core/ansiesc.c \
209 src/core/asprintf.c \
210 src/core/base16.c \
211 src/core/base64.c \
212 src/core/basename.c \
213 src/core/bitmap.c \
214 src/core/blockdev.c \
215 src/core/console.c \
216 src/core/ctype.c \
217 src/core/cwuri.c \
218 src/core/device.c \
219 src/core/downloader.c \
220 src/core/edd.c \
221 src/core/exec.c \
222 src/core/getkey.c \
223 src/core/getopt.c \
224 src/core/image.c \
225 src/core/init.c \
226 src/core/interface.c \
227 src/core/iobuf.c \
228 src/core/job.c \
229 src/core/linebuf.c \
230 src/core/main.c \
231 src/core/malloc.c \
232 src/core/menu.c \
233 src/core/misc.c \
234 src/core/monojob.c \
235 src/core/nvo.c \
236 src/core/open.c \
237 src/core/parseopt.c \
238 src/core/posix_io.c \
239 src/core/process.c \
240 src/core/random.c \
241 src/core/refcnt.c \
242 src/core/resolv.c \
243 src/core/settings.c \
244 src/core/string.c \
245 src/core/time.c \
246 src/core/timer.c \
247 src/core/uri.c \
248 src/core/uuid.c \
249 src/core/vsprintf.c \
250 src/core/xfer.c \
251 src/crypto/chap.c \
252 src/crypto/md5.c \
253 src/drivers/bitbash/bitbash.c \
254 src/drivers/bitbash/spi_bit.c \
255 src/drivers/block/ata.c \
256 src/drivers/block/ibft.c \
257 src/drivers/block/scsi.c \
258 src/drivers/bus/pci.c \
259 src/drivers/bus/virtio-ring.c \
260 src/drivers/bus/virtio-pci.c \
261 src/drivers/net/mii.c \
262 src/drivers/net/ne.c \
263 src/drivers/net/intel.c \
264 src/drivers/net/pcnet32.c \
265 src/drivers/net/virtio-net.c \
266 src/drivers/nvs/nvs.c \
267 src/drivers/nvs/spi.c \
268 src/drivers/nvs/threewire.c \
269 src/hci/commands/autoboot_cmd.c \
270 src/hci/commands/config_cmd.c \
271 src/hci/commands/dhcp_cmd.c \
272 src/hci/commands/ifmgmt_cmd.c \
273 src/hci/commands/image_cmd.c \
274 src/hci/commands/login_cmd.c \
275 src/hci/commands/menu_cmd.c \
276 src/hci/commands/nvo_cmd.c \
277 src/hci/commands/route_cmd.c \
278 src/hci/editstring.c \
279 src/hci/keymap/keymap_us.c \
280 src/hci/mucurses/ansi_screen.c \
281 src/hci/mucurses/clear.c \
282 src/hci/mucurses/colour.c \
283 src/hci/mucurses/mucurses.c \
284 src/hci/mucurses/print.c \
285 src/hci/mucurses/widgets/editbox.c \
286 src/hci/mucurses/winattrs.c \
287 src/hci/mucurses/wininit.c \
288 src/hci/readline.c \
289 src/hci/shell.c \
290 src/hci/strerror.c \
291 src/hci/tui/login_ui.c \
292 src/hci/tui/menu_ui.c \
293 src/hci/tui/settings_ui.c \
294 src/image/script.c \
295 src/image/segment.c \
296 src/interface/smbios/smbios.c \
297 src/interface/smbios/smbios_settings.c \
298 src/libgcc/memcpy.c \
299 src/net/arp.c \
300 src/net/dhcpopts.c \
301 src/net/dhcppkt.c \
302 src/net/eth_slow.c \
303 src/net/ethernet.c \
304 src/net/fakedhcp.c \
305 src/net/icmp.c \
306 src/net/iobpad.c \
307 src/net/ipv4.c \
308 src/net/netdev_settings.c \
309 src/net/netdevice.c \
310 src/net/nullnet.c \
311 src/net/rarp.c \
312 src/net/retry.c \
313 src/net/tcp.c \
314 src/net/tcpip.c \
315 src/net/udp.c \
316 src/net/udp/dhcp.c \
317 src/net/udp/dns.c \
318 src/net/udp/tftp.c \
319 src/usr/autoboot.c \
320 src/usr/dhcpmgmt.c \
321 src/usr/ifmgmt.c \
322 src/usr/imgmgmt.c \
323 src/usr/prompt.c \
324 src/usr/pxemenu.c \
325 src/usr/route.c \
326 src/arch/i386/core/patch_cf.S \
327 src/arch/i386/core/setjmp.S \
328 src/arch/i386/core/stack.S \
329 src/arch/i386/core/stack16.S \
330 src/arch/i386/core/virtaddr.S \
331 src/arch/i386/firmware/pcbios/e820mangler.S \
332 src/arch/i386/interface/pxe/pxe_entry.S \
333 src/arch/i386/prefix/libprefix.S \
334 src/arch/i386/prefix/romprefix.S \
335 src/arch/i386/prefix/undiloader.S \
336 src/arch/i386/prefix/unnrv2b.S \
337 src/arch/i386/prefix/unnrv2b16.S \
338 src/arch/i386/transitions/liba20.S \
339 src/arch/i386/transitions/librm.S
340
341 define def_iPxeBaseBinDefs
342 $(file)_DEFS += OBJECT=$(subst -,_,$(basename $(notdir $(file))))
343 endef
344
345 $(foreach file,$(iPxeBaseBin_SOURCES),$(eval $(call def_iPxeBaseBinDefs)))
346
347 #
348 # ipxezbin - Compressor?
349 #
350 BLDPROGS += ipxezbin
351 ipxezbin_TEMPLATE = VBOXBLDPROG
352 ipxezbin_CFLAGS = -Wno-format
353 ipxezbin_SOURCES = src/util/zbin.c
354
355endif
356
357
358include $(FILE_KBUILD_SUB_FOOTER)
359
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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