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 of the
5 * License, or (at your option) any later version.
7 * This program is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program; if not, write to the Free Software
14 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * You can also choose to distribute this program under the terms of
18 * the Unmodified Binary Distribution Licence (as given in the file
19 * COPYING.UBDL), provided that you have satisfied its requirements.
22 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL
);
24 #include <config/general.h>
25 #include <config/console.h>
26 #include <config/sideband.h>
27 #include <config/settings.h>
31 * Configuration options
33 * This file contains macros that pull various objects into the link
34 * based on definitions in configuration header files. Ideally it
35 * should be the only place in iPXE where one might need to use #ifdef
36 * for compile-time options.
38 * In the fairly common case where an object should only be considered
39 * for inclusion if the subsystem it depends on is present, its
40 * configuration macros should be placed in a file named
41 * <tt>config_<i>subsystem</i>.c</tt>, where @e subsystem is the
42 * object basename of the main source file for that subsystem. The
43 * build system will pull in that file if @c subsystem.c is included
44 * in the final iPXE executable built.
47 PROVIDE_REQUIRING_SYMBOL();
50 * Drag in all requested console types
55 REQUIRE_OBJECT ( serial
);
57 #ifdef CONSOLE_DIRECT_VGA
58 REQUIRE_OBJECT ( video_subr
);
61 REQUIRE_OBJECT ( pc_kbd
);
64 REQUIRE_OBJECT ( syslog
);
66 #ifdef CONSOLE_SYSLOGS
67 REQUIRE_OBJECT ( syslogs
);
70 REQUIRE_OBJECT ( efi_console
);
73 REQUIRE_OBJECT ( linux_console
);
76 REQUIRE_OBJECT ( vmconsole
);
78 #ifdef CONSOLE_DEBUGCON
79 REQUIRE_OBJECT ( debugcon
);
83 * Drag in all requested network protocols
87 REQUIRE_OBJECT ( ipv4
);
90 REQUIRE_OBJECT ( ipv6
);
94 * Drag in all requested PXE support
98 REQUIRE_OBJECT ( pxemenu
);
101 REQUIRE_OBJECT ( pxe_call
);
105 * Drag in all requested download protocols
108 #ifdef DOWNLOAD_PROTO_TFTP
109 REQUIRE_OBJECT ( tftp
);
111 #ifdef DOWNLOAD_PROTO_HTTP
112 REQUIRE_OBJECT ( http
);
114 #ifdef DOWNLOAD_PROTO_HTTPS
115 REQUIRE_OBJECT ( https
);
117 #ifdef DOWNLOAD_PROTO_FTP
118 REQUIRE_OBJECT ( ftp
);
120 #ifdef DOWNLOAD_PROTO_NFS
121 REQUIRE_OBJECT ( nfs_open
);
123 #ifdef DOWNLOAD_PROTO_SLAM
124 REQUIRE_OBJECT ( slam
);
128 * Drag in all requested SAN boot protocols
131 #ifdef SANBOOT_PROTO_ISCSI
132 REQUIRE_OBJECT ( iscsi
);
134 #ifdef SANBOOT_PROTO_HTTP
135 REQUIRE_OBJECT ( httpblock
);
139 * Drag in all requested resolvers
143 REQUIRE_OBJECT ( dns
);
147 * Drag in all requested image formats
151 REQUIRE_OBJECT ( nbi
);
154 REQUIRE_OBJECT ( elfboot
);
156 #ifdef IMAGE_MULTIBOOT
157 REQUIRE_OBJECT ( multiboot
);
160 REQUIRE_OBJECT ( pxe_image
);
163 REQUIRE_OBJECT ( script
);
166 REQUIRE_OBJECT ( bzimage
);
168 #ifdef IMAGE_ELTORITO
169 REQUIRE_OBJECT ( eltorito
);
172 REQUIRE_OBJECT ( comboot
);
173 REQUIRE_OBJECT ( com32
);
174 REQUIRE_OBJECT ( comboot_call
);
175 REQUIRE_OBJECT ( com32_call
);
176 REQUIRE_OBJECT ( com32_wrapper
);
177 REQUIRE_OBJECT ( comboot_resolv
);
180 REQUIRE_OBJECT ( efi_image
);
183 REQUIRE_OBJECT ( sdi
);
186 REQUIRE_OBJECT ( zlib
);
189 REQUIRE_OBJECT ( gzip
);
193 * Drag in all requested commands
197 REQUIRE_OBJECT ( autoboot_cmd
);
200 REQUIRE_OBJECT ( nvo_cmd
);
203 REQUIRE_OBJECT ( config_cmd
);
206 REQUIRE_OBJECT ( ifmgmt_cmd
);
208 /* IWMGMT_CMD is brought in by net80211.c if requested */
210 REQUIRE_OBJECT ( route_cmd
);
213 REQUIRE_OBJECT ( image_cmd
);
215 #ifdef IMAGE_TRUST_CMD
216 REQUIRE_OBJECT ( image_trust_cmd
);
219 REQUIRE_OBJECT ( dhcp_cmd
);
222 REQUIRE_OBJECT ( sanboot_cmd
);
225 REQUIRE_OBJECT ( menu_cmd
);
228 REQUIRE_OBJECT ( login_cmd
);
231 REQUIRE_OBJECT ( time_cmd
);
234 REQUIRE_OBJECT ( digest_cmd
);
237 REQUIRE_OBJECT ( pxe_cmd
);
240 REQUIRE_OBJECT ( lotest_cmd
);
243 REQUIRE_OBJECT ( vlan_cmd
);
246 REQUIRE_OBJECT ( poweroff_cmd
);
249 REQUIRE_OBJECT ( reboot_cmd
);
252 REQUIRE_OBJECT ( cpuid_cmd
);
255 REQUIRE_OBJECT ( sync_cmd
);
258 REQUIRE_OBJECT ( shell
);
261 REQUIRE_OBJECT ( nslookup_cmd
);
264 REQUIRE_OBJECT ( pci_cmd
);
267 REQUIRE_OBJECT ( param_cmd
);
270 REQUIRE_OBJECT ( neighbour_cmd
);
273 REQUIRE_OBJECT ( ping_cmd
);
276 REQUIRE_OBJECT ( console_cmd
);
279 REQUIRE_OBJECT ( ipstat_cmd
);
282 REQUIRE_OBJECT ( profstat_cmd
);
285 REQUIRE_OBJECT ( ntp_cmd
);
288 REQUIRE_OBJECT ( cert_cmd
);
291 REQUIRE_OBJECT ( image_mem_cmd
);
295 * Drag in miscellaneous objects
299 REQUIRE_OBJECT ( nulltrap
);
302 REQUIRE_OBJECT ( gdbidt
);
303 REQUIRE_OBJECT ( gdbserial
);
304 REQUIRE_OBJECT ( gdbstub_cmd
);
307 REQUIRE_OBJECT ( gdbidt
);
308 REQUIRE_OBJECT ( gdbudp
);
309 REQUIRE_OBJECT ( gdbstub_cmd
);
313 * Drag in objects that are always required, but not dragged in via
314 * symbol dependencies.
317 REQUIRE_OBJECT ( device
);
318 REQUIRE_OBJECT ( embedded
);
320 /* linux drivers aren't picked up by the parserom utility so drag them in here */
322 REQUIRE_OBJECT ( tap
);
326 * Drag in relevant sideband entry points
330 REQUIRE_OBJECT ( efi_bofm
);
331 #endif /* BOFM_EFI */
332 #endif /* CONFIG_BOFM */
335 * Drag in relevant settings sources
338 REQUIRE_OBJECT ( pci_settings
);
340 #ifdef VMWARE_SETTINGS
341 REQUIRE_OBJECT ( guestinfo
);
343 #ifdef CPUID_SETTINGS
344 REQUIRE_OBJECT ( cpuid_settings
);
346 #ifdef MEMMAP_SETTINGS
347 REQUIRE_OBJECT ( memmap_settings
);
350 REQUIRE_OBJECT ( vram_settings
);
353 REQUIRE_OBJECT ( acpi_settings
);
357 * Drag in selected keyboard map
359 #define REQUIRE_KEYMAP_OBJECT( _map ) REQUIRE_OBJECT ( keymap_ ## _map )
360 #define REQUIRE_KEYMAP( _map ) REQUIRE_KEYMAP_OBJECT ( _map )
361 REQUIRE_KEYMAP ( KEYBOARD_MAP
);