2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public License as
4 * published by the Free Software Foundation; either version 2, or (at
5 * your option) any later version.
8 FILE_LICENCE ( GPL2_OR_LATER );
10 #include <config/general.h>
11 #include <config/console.h>
12 #include <config/sideband.h>
13 #include <config/settings.h>
17 * Configuration options
19 * This file contains macros that pull various objects into the link
20 * based on definitions in configuration header files. Ideally it
21 * should be the only place in iPXE where one might need to use #ifdef
22 * for compile-time options.
24 * In the fairly common case where an object should only be considered
25 * for inclusion if the subsystem it depends on is present, its
26 * configuration macros should be placed in a file named
27 * <tt>config_<i>subsystem</i>.c</tt>, where @e subsystem is the
28 * object basename of the main source file for that subsystem. The
29 * build system will pull in that file if @c subsystem.c is included
30 * in the final iPXE executable built.
34 * Build ID string calculations
39 #define XSTR(s) STR(s)
43 #include "config/.buildserial.h"
44 #define BUILD_SERIAL_STR " #" XSTR(BUILD_SERIAL_NUM)
46 #define BUILD_SERIAL_STR ""
50 #define BUILD_ID_STR " " BUILD_ID
52 #define BUILD_ID_STR ""
55 #if defined(BUILD_ID) || defined(BUILD_SERIAL)
56 #define BUILD_STRING " [build" BUILD_ID_STR BUILD_SERIAL_STR "]"
58 #define BUILD_STRING ""
62 * Drag in all requested console types
67 REQUIRE_OBJECT ( bios_console );
70 REQUIRE_OBJECT ( serial_console );
72 #ifdef CONSOLE_DIRECT_VGA
73 REQUIRE_OBJECT ( video_subr );
76 REQUIRE_OBJECT ( pc_kbd );
79 REQUIRE_OBJECT ( syslog );
81 #ifdef CONSOLE_SYSLOGS
82 REQUIRE_OBJECT ( syslogs );
85 REQUIRE_OBJECT ( efi_console );
88 REQUIRE_OBJECT ( linux_console );
91 REQUIRE_OBJECT ( vmconsole );
93 #ifdef CONSOLE_DEBUGCON
94 REQUIRE_OBJECT ( debugcon );
97 REQUIRE_OBJECT ( vesafb );
101 * Drag in all requested network protocols
104 #ifdef NET_PROTO_IPV4
105 REQUIRE_OBJECT ( ipv4 );
107 #ifdef NET_PROTO_IPV6
108 REQUIRE_OBJECT ( ipv6 );
112 * Drag in all requested PXE support
116 REQUIRE_OBJECT ( pxemenu );
119 REQUIRE_OBJECT ( pxe_call );
123 * Drag in all requested download protocols
126 #ifdef DOWNLOAD_PROTO_TFTP
127 REQUIRE_OBJECT ( tftp );
129 #ifdef DOWNLOAD_PROTO_HTTP
130 REQUIRE_OBJECT ( http );
132 #ifdef DOWNLOAD_PROTO_HTTPS
133 REQUIRE_OBJECT ( https );
135 #ifdef DOWNLOAD_PROTO_FTP
136 REQUIRE_OBJECT ( ftp );
138 #ifdef DOWNLOAD_PROTO_NFS
139 REQUIRE_OBJECT ( nfs_open );
141 #ifdef DOWNLOAD_PROTO_SLAM
142 REQUIRE_OBJECT ( slam );
146 * Drag in all requested SAN boot protocols
149 #ifdef SANBOOT_PROTO_ISCSI
150 REQUIRE_OBJECT ( iscsi );
154 * Drag in all requested resolvers
158 REQUIRE_OBJECT ( dns );
162 * Drag in all requested image formats
166 REQUIRE_OBJECT ( nbi );
169 REQUIRE_OBJECT ( elfboot );
171 #ifdef IMAGE_MULTIBOOT
172 REQUIRE_OBJECT ( multiboot );
175 REQUIRE_OBJECT ( pxe_image );
178 REQUIRE_OBJECT ( script );
181 REQUIRE_OBJECT ( bzimage );
183 #ifdef IMAGE_ELTORITO
184 REQUIRE_OBJECT ( eltorito );
187 REQUIRE_OBJECT ( comboot );
188 REQUIRE_OBJECT ( com32 );
189 REQUIRE_OBJECT ( comboot_call );
190 REQUIRE_OBJECT ( com32_call );
191 REQUIRE_OBJECT ( com32_wrapper );
192 REQUIRE_OBJECT ( comboot_resolv );
195 REQUIRE_OBJECT ( efi_image );
198 REQUIRE_OBJECT ( sdi );
201 REQUIRE_OBJECT ( pnm );
204 REQUIRE_OBJECT ( png );
208 * Drag in all requested commands
212 REQUIRE_OBJECT ( autoboot_cmd );
215 REQUIRE_OBJECT ( nvo_cmd );
218 REQUIRE_OBJECT ( config_cmd );
221 REQUIRE_OBJECT ( ifmgmt_cmd );
223 /* IWMGMT_CMD is brought in by net80211.c if requested */
225 REQUIRE_OBJECT ( route_cmd );
228 REQUIRE_OBJECT ( image_cmd );
230 #ifdef IMAGE_TRUST_CMD
231 REQUIRE_OBJECT ( image_trust_cmd );
234 REQUIRE_OBJECT ( dhcp_cmd );
237 REQUIRE_OBJECT ( sanboot_cmd );
240 REQUIRE_OBJECT ( menu_cmd );
243 REQUIRE_OBJECT ( login_cmd );
246 REQUIRE_OBJECT ( time_cmd );
249 REQUIRE_OBJECT ( digest_cmd );
252 REQUIRE_OBJECT ( pxe_cmd );
255 REQUIRE_OBJECT ( lotest_cmd );
258 REQUIRE_OBJECT ( vlan_cmd );
261 REQUIRE_OBJECT ( poweroff_cmd );
264 REQUIRE_OBJECT ( reboot_cmd );
267 REQUIRE_OBJECT ( cpuid_cmd );
270 REQUIRE_OBJECT ( sync_cmd );
273 REQUIRE_OBJECT ( nslookup_cmd );
276 REQUIRE_OBJECT ( pci_cmd );
279 REQUIRE_OBJECT ( param_cmd );
282 REQUIRE_OBJECT ( neighbour_cmd );
285 REQUIRE_OBJECT ( ping_cmd );
288 REQUIRE_OBJECT ( console_cmd );
291 REQUIRE_OBJECT ( ipstat_cmd );
294 REQUIRE_OBJECT ( profstat_cmd );
298 * Drag in miscellaneous objects
302 REQUIRE_OBJECT ( nulltrap );
305 REQUIRE_OBJECT ( gdbidt );
306 REQUIRE_OBJECT ( gdbserial );
307 REQUIRE_OBJECT ( gdbstub_cmd );
310 REQUIRE_OBJECT ( gdbidt );
311 REQUIRE_OBJECT ( gdbudp );
312 REQUIRE_OBJECT ( gdbstub_cmd );
316 * Drag in objects that are always required, but not dragged in via
317 * symbol dependencies.
320 REQUIRE_OBJECT ( device );
321 REQUIRE_OBJECT ( embedded );
323 /* linux drivers aren't picked up by the parserom utility so drag them in here */
325 REQUIRE_OBJECT ( tap );
329 * Drag in relevant sideband entry points
333 REQUIRE_OBJECT ( efi_bofm );
334 #endif /* BOFM_EFI */
335 #endif /* CONFIG_BOFM */
338 * Drag in relevant settings sources
341 REQUIRE_OBJECT ( pci_settings );
343 #ifdef VMWARE_SETTINGS
344 REQUIRE_OBJECT ( guestinfo );
346 #ifdef CPUID_SETTINGS
347 REQUIRE_OBJECT ( cpuid_settings );
349 #ifdef MEMMAP_SETTINGS
350 REQUIRE_OBJECT ( memmap_settings );
354 * Drag in selected keyboard map
356 #define REQUIRE_KEYMAP_OBJECT( _map ) REQUIRE_OBJECT ( keymap_ ## _map )
357 #define REQUIRE_KEYMAP( _map ) REQUIRE_KEYMAP_OBJECT ( _map )
358 REQUIRE_KEYMAP ( KEYBOARD_MAP );