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>
16 * Configuration options
18 * This file contains macros that pull various objects into the link
19 * based on definitions in configuration header files. Ideally it
20 * should be the only place in iPXE where one might need to use #ifdef
21 * for compile-time options.
23 * In the fairly common case where an object should only be considered
24 * for inclusion if the subsystem it depends on is present, its
25 * configuration macros should be placed in a file named
26 * <tt>config_<i>subsystem</i>.c</tt>, where @e subsystem is the
27 * object basename of the main source file for that subsystem. The
28 * build system will pull in that file if @c subsystem.c is included
29 * in the final iPXE executable built.
33 * Build ID string calculations
38 #define XSTR(s) STR(s)
42 #include "config/.buildserial.h"
43 #define BUILD_SERIAL_STR " #" XSTR(BUILD_SERIAL_NUM)
45 #define BUILD_SERIAL_STR ""
49 #define BUILD_ID_STR " " BUILD_ID
51 #define BUILD_ID_STR ""
54 #if defined(BUILD_ID) || defined(BUILD_SERIAL)
55 #define BUILD_STRING " [build" BUILD_ID_STR BUILD_SERIAL_STR "]"
57 #define BUILD_STRING ""
61 * Drag in all requested console types
66 REQUIRE_OBJECT ( bios_console );
69 REQUIRE_OBJECT ( serial_console );
71 #ifdef CONSOLE_DIRECT_VGA
72 REQUIRE_OBJECT ( video_subr );
75 REQUIRE_OBJECT ( pc_kbd );
78 REQUIRE_OBJECT ( syslog );
80 #ifdef CONSOLE_SYSLOGS
81 REQUIRE_OBJECT ( syslogs );
84 REQUIRE_OBJECT ( efi_console );
87 REQUIRE_OBJECT ( linux_console );
90 REQUIRE_OBJECT ( vmconsole );
92 #ifdef CONSOLE_DEBUGCON
93 REQUIRE_OBJECT ( debugcon );
97 * Drag in all requested network protocols
100 #ifdef NET_PROTO_IPV4
101 REQUIRE_OBJECT ( ipv4 );
105 * Drag in all requested PXE support
109 REQUIRE_OBJECT ( pxemenu );
112 REQUIRE_OBJECT ( pxe_call );
116 * Drag in all requested download protocols
119 #ifdef DOWNLOAD_PROTO_TFTP
120 REQUIRE_OBJECT ( tftp );
122 #ifdef DOWNLOAD_PROTO_HTTP
123 REQUIRE_OBJECT ( http );
125 #ifdef DOWNLOAD_PROTO_HTTPS
126 REQUIRE_OBJECT ( https );
128 #ifdef DOWNLOAD_PROTO_FTP
129 REQUIRE_OBJECT ( ftp );
131 #ifdef DOWNLOAD_PROTO_SLAM
132 REQUIRE_OBJECT ( slam );
136 * Drag in all requested SAN boot protocols
139 #ifdef SANBOOT_PROTO_ISCSI
140 REQUIRE_OBJECT ( iscsi );
144 * Drag in all requested resolvers
148 REQUIRE_OBJECT ( dns );
152 * Drag in all requested image formats
156 REQUIRE_OBJECT ( nbi );
159 REQUIRE_OBJECT ( elfboot );
161 #ifdef IMAGE_MULTIBOOT
162 REQUIRE_OBJECT ( multiboot );
165 REQUIRE_OBJECT ( pxe_image );
168 REQUIRE_OBJECT ( script );
171 REQUIRE_OBJECT ( bzimage );
173 #ifdef IMAGE_ELTORITO
174 REQUIRE_OBJECT ( eltorito );
177 REQUIRE_OBJECT ( comboot );
178 REQUIRE_OBJECT ( com32 );
179 REQUIRE_OBJECT ( comboot_call );
180 REQUIRE_OBJECT ( com32_call );
181 REQUIRE_OBJECT ( com32_wrapper );
182 REQUIRE_OBJECT ( comboot_resolv );
185 REQUIRE_OBJECT ( efi_image );
188 REQUIRE_OBJECT ( sdi );
192 * Drag in all requested commands
196 REQUIRE_OBJECT ( autoboot_cmd );
199 REQUIRE_OBJECT ( nvo_cmd );
202 REQUIRE_OBJECT ( config_cmd );
205 REQUIRE_OBJECT ( ifmgmt_cmd );
207 /* IWMGMT_CMD is brought in by net80211.c if requested */
209 REQUIRE_OBJECT ( route_cmd );
212 REQUIRE_OBJECT ( image_cmd );
214 #ifdef IMAGE_TRUST_CMD
215 REQUIRE_OBJECT ( image_trust_cmd );
218 REQUIRE_OBJECT ( dhcp_cmd );
221 REQUIRE_OBJECT ( sanboot_cmd );
224 REQUIRE_OBJECT ( menu_cmd );
227 REQUIRE_OBJECT ( login_cmd );
230 REQUIRE_OBJECT ( time_cmd );
233 REQUIRE_OBJECT ( digest_cmd );
236 REQUIRE_OBJECT ( pxe_cmd );
239 REQUIRE_OBJECT ( lotest_cmd );
242 REQUIRE_OBJECT ( vlan_cmd );
245 REQUIRE_OBJECT ( reboot_cmd );
248 REQUIRE_OBJECT ( cpuid_cmd );
251 REQUIRE_OBJECT ( sync_cmd );
254 REQUIRE_OBJECT ( nslookup_cmd );
258 * Drag in miscellaneous objects
262 REQUIRE_OBJECT ( nulltrap );
265 REQUIRE_OBJECT ( gdbidt );
266 REQUIRE_OBJECT ( gdbserial );
267 REQUIRE_OBJECT ( gdbstub_cmd );
270 REQUIRE_OBJECT ( gdbidt );
271 REQUIRE_OBJECT ( gdbudp );
272 REQUIRE_OBJECT ( gdbstub_cmd );
276 * Drag in objects that are always required, but not dragged in via
277 * symbol dependencies.
280 REQUIRE_OBJECT ( device );
281 REQUIRE_OBJECT ( embedded );
283 /* linux drivers aren't picked up by the parserom utility so drag them in here */
285 REQUIRE_OBJECT ( tap );
289 * Drag in relevant sideband entry points
293 REQUIRE_OBJECT ( efi_bofm );
294 #endif /* BOFM_EFI */
295 #endif /* CONFIG_BOFM */
296 #ifdef VMWARE_SETTINGS
297 REQUIRE_OBJECT ( guestinfo );
298 #endif /* VMWARE_SETTINGS */
301 * Drag in selected keyboard map
303 #define REQUIRE_KEYMAP_OBJECT( _map ) REQUIRE_OBJECT ( keymap_ ## _map )
304 #define REQUIRE_KEYMAP( _map ) REQUIRE_KEYMAP_OBJECT ( _map )
305 REQUIRE_KEYMAP ( KEYBOARD_MAP );