[efi] Add a USB host controller driver based on EFI_USB_IO_PROTOCOL
[ipxe.git] / src / config / config.c
1 /*
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.
6 *
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.
11 *
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
15 * 02110-1301, USA.
16 *
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.
20 */
21
22 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
23
24 #include <config/general.h>
25 #include <config/console.h>
26 #include <config/sideband.h>
27 #include <config/settings.h>
28
29 /** @file
30 *
31 * Configuration options
32 *
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.
37 *
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.
45 */
46
47 PROVIDE_REQUIRING_SYMBOL();
48
49 /*
50 * Drag in all requested console types
51 *
52 */
53
54 #ifdef CONSOLE_PCBIOS
55 REQUIRE_OBJECT ( bios_console );
56 #endif
57 #ifdef CONSOLE_SERIAL
58 REQUIRE_OBJECT ( serial );
59 #endif
60 #ifdef CONSOLE_DIRECT_VGA
61 REQUIRE_OBJECT ( video_subr );
62 #endif
63 #ifdef CONSOLE_PC_KBD
64 REQUIRE_OBJECT ( pc_kbd );
65 #endif
66 #ifdef CONSOLE_SYSLOG
67 REQUIRE_OBJECT ( syslog );
68 #endif
69 #ifdef CONSOLE_SYSLOGS
70 REQUIRE_OBJECT ( syslogs );
71 #endif
72 #ifdef CONSOLE_EFI
73 REQUIRE_OBJECT ( efi_console );
74 #endif
75 #ifdef CONSOLE_LINUX
76 REQUIRE_OBJECT ( linux_console );
77 #endif
78 #ifdef CONSOLE_VMWARE
79 REQUIRE_OBJECT ( vmconsole );
80 #endif
81 #ifdef CONSOLE_DEBUGCON
82 REQUIRE_OBJECT ( debugcon );
83 #endif
84 #ifdef CONSOLE_VESAFB
85 REQUIRE_OBJECT ( vesafb );
86 #endif
87 #ifdef CONSOLE_INT13
88 REQUIRE_OBJECT ( int13con );
89 #endif
90
91 /*
92 * Drag in all requested network protocols
93 *
94 */
95 #ifdef NET_PROTO_IPV4
96 REQUIRE_OBJECT ( ipv4 );
97 #endif
98 #ifdef NET_PROTO_IPV6
99 REQUIRE_OBJECT ( ipv6 );
100 #endif
101
102 /*
103 * Drag in all requested PXE support
104 *
105 */
106 #ifdef PXE_MENU
107 REQUIRE_OBJECT ( pxemenu );
108 #endif
109 #ifdef PXE_STACK
110 REQUIRE_OBJECT ( pxe_call );
111 #endif
112
113 /*
114 * Drag in all requested download protocols
115 *
116 */
117 #ifdef DOWNLOAD_PROTO_TFTP
118 REQUIRE_OBJECT ( tftp );
119 #endif
120 #ifdef DOWNLOAD_PROTO_HTTP
121 REQUIRE_OBJECT ( http );
122 #endif
123 #ifdef DOWNLOAD_PROTO_HTTPS
124 REQUIRE_OBJECT ( https );
125 #endif
126 #ifdef DOWNLOAD_PROTO_FTP
127 REQUIRE_OBJECT ( ftp );
128 #endif
129 #ifdef DOWNLOAD_PROTO_NFS
130 REQUIRE_OBJECT ( nfs_open );
131 #endif
132 #ifdef DOWNLOAD_PROTO_SLAM
133 REQUIRE_OBJECT ( slam );
134 #endif
135
136 /*
137 * Drag in all requested SAN boot protocols
138 *
139 */
140 #ifdef SANBOOT_PROTO_ISCSI
141 REQUIRE_OBJECT ( iscsi );
142 #endif
143 #ifdef SANBOOT_PROTO_HTTP
144 REQUIRE_OBJECT ( httpblock );
145 #endif
146
147 /*
148 * Drag in all requested resolvers
149 *
150 */
151 #ifdef DNS_RESOLVER
152 REQUIRE_OBJECT ( dns );
153 #endif
154
155 /*
156 * Drag in all requested image formats
157 *
158 */
159 #ifdef IMAGE_NBI
160 REQUIRE_OBJECT ( nbi );
161 #endif
162 #ifdef IMAGE_ELF
163 REQUIRE_OBJECT ( elfboot );
164 #endif
165 #ifdef IMAGE_MULTIBOOT
166 REQUIRE_OBJECT ( multiboot );
167 #endif
168 #ifdef IMAGE_PXE
169 REQUIRE_OBJECT ( pxe_image );
170 #endif
171 #ifdef IMAGE_SCRIPT
172 REQUIRE_OBJECT ( script );
173 #endif
174 #ifdef IMAGE_BZIMAGE
175 REQUIRE_OBJECT ( bzimage );
176 #endif
177 #ifdef IMAGE_ELTORITO
178 REQUIRE_OBJECT ( eltorito );
179 #endif
180 #ifdef IMAGE_COMBOOT
181 REQUIRE_OBJECT ( comboot );
182 REQUIRE_OBJECT ( com32 );
183 REQUIRE_OBJECT ( comboot_call );
184 REQUIRE_OBJECT ( com32_call );
185 REQUIRE_OBJECT ( com32_wrapper );
186 REQUIRE_OBJECT ( comboot_resolv );
187 #endif
188 #ifdef IMAGE_EFI
189 REQUIRE_OBJECT ( efi_image );
190 #endif
191 #ifdef IMAGE_SDI
192 REQUIRE_OBJECT ( sdi );
193 #endif
194 #ifdef IMAGE_PNM
195 REQUIRE_OBJECT ( pnm );
196 #endif
197 #ifdef IMAGE_PNG
198 REQUIRE_OBJECT ( png );
199 #endif
200
201 /*
202 * Drag in all requested commands
203 *
204 */
205 #ifdef AUTOBOOT_CMD
206 REQUIRE_OBJECT ( autoboot_cmd );
207 #endif
208 #ifdef NVO_CMD
209 REQUIRE_OBJECT ( nvo_cmd );
210 #endif
211 #ifdef CONFIG_CMD
212 REQUIRE_OBJECT ( config_cmd );
213 #endif
214 #ifdef IFMGMT_CMD
215 REQUIRE_OBJECT ( ifmgmt_cmd );
216 #endif
217 /* IWMGMT_CMD is brought in by net80211.c if requested */
218 #ifdef ROUTE_CMD
219 REQUIRE_OBJECT ( route_cmd );
220 #endif
221 #ifdef IMAGE_CMD
222 REQUIRE_OBJECT ( image_cmd );
223 #endif
224 #ifdef IMAGE_TRUST_CMD
225 REQUIRE_OBJECT ( image_trust_cmd );
226 #endif
227 #ifdef DHCP_CMD
228 REQUIRE_OBJECT ( dhcp_cmd );
229 #endif
230 #ifdef SANBOOT_CMD
231 REQUIRE_OBJECT ( sanboot_cmd );
232 #endif
233 #ifdef MENU_CMD
234 REQUIRE_OBJECT ( menu_cmd );
235 #endif
236 #ifdef LOGIN_CMD
237 REQUIRE_OBJECT ( login_cmd );
238 #endif
239 #ifdef TIME_CMD
240 REQUIRE_OBJECT ( time_cmd );
241 #endif
242 #ifdef DIGEST_CMD
243 REQUIRE_OBJECT ( digest_cmd );
244 #endif
245 #ifdef PXE_CMD
246 REQUIRE_OBJECT ( pxe_cmd );
247 #endif
248 #ifdef LOTEST_CMD
249 REQUIRE_OBJECT ( lotest_cmd );
250 #endif
251 #ifdef VLAN_CMD
252 REQUIRE_OBJECT ( vlan_cmd );
253 #endif
254 #ifdef POWEROFF_CMD
255 REQUIRE_OBJECT ( poweroff_cmd );
256 #endif
257 #ifdef REBOOT_CMD
258 REQUIRE_OBJECT ( reboot_cmd );
259 #endif
260 #ifdef CPUID_CMD
261 REQUIRE_OBJECT ( cpuid_cmd );
262 #endif
263 #ifdef SYNC_CMD
264 REQUIRE_OBJECT ( sync_cmd );
265 #endif
266 #ifdef NSLOOKUP_CMD
267 REQUIRE_OBJECT ( nslookup_cmd );
268 #endif
269 #ifdef PCI_CMD
270 REQUIRE_OBJECT ( pci_cmd );
271 #endif
272 #ifdef PARAM_CMD
273 REQUIRE_OBJECT ( param_cmd );
274 #endif
275 #ifdef NEIGHBOUR_CMD
276 REQUIRE_OBJECT ( neighbour_cmd );
277 #endif
278 #ifdef PING_CMD
279 REQUIRE_OBJECT ( ping_cmd );
280 #endif
281 #ifdef CONSOLE_CMD
282 REQUIRE_OBJECT ( console_cmd );
283 #endif
284 #ifdef IPSTAT_CMD
285 REQUIRE_OBJECT ( ipstat_cmd );
286 #endif
287 #ifdef PROFSTAT_CMD
288 REQUIRE_OBJECT ( profstat_cmd );
289 #endif
290
291 /*
292 * Drag in miscellaneous objects
293 *
294 */
295 #ifdef NULL_TRAP
296 REQUIRE_OBJECT ( nulltrap );
297 #endif
298 #ifdef GDBSERIAL
299 REQUIRE_OBJECT ( gdbidt );
300 REQUIRE_OBJECT ( gdbserial );
301 REQUIRE_OBJECT ( gdbstub_cmd );
302 #endif
303 #ifdef GDBUDP
304 REQUIRE_OBJECT ( gdbidt );
305 REQUIRE_OBJECT ( gdbudp );
306 REQUIRE_OBJECT ( gdbstub_cmd );
307 #endif
308
309 /*
310 * Drag in objects that are always required, but not dragged in via
311 * symbol dependencies.
312 *
313 */
314 REQUIRE_OBJECT ( device );
315 REQUIRE_OBJECT ( embedded );
316
317 /* linux drivers aren't picked up by the parserom utility so drag them in here */
318 #ifdef DRIVERS_LINUX
319 REQUIRE_OBJECT ( tap );
320 #endif
321
322 /*
323 * Drag in relevant sideband entry points
324 */
325 #ifdef CONFIG_BOFM
326 #ifdef BOFM_EFI
327 REQUIRE_OBJECT ( efi_bofm );
328 #endif /* BOFM_EFI */
329 #endif /* CONFIG_BOFM */
330
331 /*
332 * Drag in relevant settings sources
333 */
334 #ifdef PCI_SETTINGS
335 REQUIRE_OBJECT ( pci_settings );
336 #endif
337 #ifdef VMWARE_SETTINGS
338 REQUIRE_OBJECT ( guestinfo );
339 #endif
340 #ifdef CPUID_SETTINGS
341 REQUIRE_OBJECT ( cpuid_settings );
342 #endif
343 #ifdef MEMMAP_SETTINGS
344 REQUIRE_OBJECT ( memmap_settings );
345 #endif
346 #ifdef VRAM_SETTINGS
347 REQUIRE_OBJECT ( vram_settings );
348 #endif
349
350 /*
351 * Drag in selected keyboard map
352 */
353 #define REQUIRE_KEYMAP_OBJECT( _map ) REQUIRE_OBJECT ( keymap_ ## _map )
354 #define REQUIRE_KEYMAP( _map ) REQUIRE_KEYMAP_OBJECT ( _map )
355 REQUIRE_KEYMAP ( KEYBOARD_MAP );