iPXE
config.c
Go to the documentation of this file.
00001 /*
00002  * This program is free software; you can redistribute it and/or
00003  * modify it under the terms of the GNU General Public License as
00004  * published by the Free Software Foundation; either version 2 of the
00005  * License, or (at your option) any later version.
00006  *
00007  * This program is distributed in the hope that it will be useful, but
00008  * WITHOUT ANY WARRANTY; without even the implied warranty of
00009  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00010  * General Public License for more details.
00011  *
00012  * You should have received a copy of the GNU General Public License
00013  * along with this program; if not, write to the Free Software
00014  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00015  * 02110-1301, USA.
00016  *
00017  * You can also choose to distribute this program under the terms of
00018  * the Unmodified Binary Distribution Licence (as given in the file
00019  * COPYING.UBDL), provided that you have satisfied its requirements.
00020  */
00021 
00022 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00023 
00024 #include <config/general.h>
00025 #include <config/console.h>
00026 #include <config/sideband.h>
00027 #include <config/settings.h>
00028 
00029 /** @file
00030  *
00031  * Configuration options
00032  *
00033  * This file contains macros that pull various objects into the link
00034  * based on definitions in configuration header files. Ideally it
00035  * should be the only place in iPXE where one might need to use #ifdef
00036  * for compile-time options.
00037  *
00038  * In the fairly common case where an object should only be considered
00039  * for inclusion if the subsystem it depends on is present, its
00040  * configuration macros should be placed in a file named
00041  * <tt>config_<i>subsystem</i>.c</tt>, where @e subsystem is the
00042  * object basename of the main source file for that subsystem. The
00043  * build system will pull in that file if @c subsystem.c is included
00044  * in the final iPXE executable built.
00045  */
00046 
00047 PROVIDE_REQUIRING_SYMBOL();
00048 
00049 /*
00050  * Drag in all requested console types
00051  *
00052  */
00053 
00054 #ifdef CONSOLE_SERIAL
00055 REQUIRE_OBJECT ( serial );
00056 #endif
00057 #ifdef CONSOLE_DIRECT_VGA
00058 REQUIRE_OBJECT ( video_subr );
00059 #endif
00060 #ifdef CONSOLE_PC_KBD
00061 REQUIRE_OBJECT ( pc_kbd );
00062 #endif
00063 #ifdef CONSOLE_SYSLOG
00064 REQUIRE_OBJECT ( syslog );
00065 #endif
00066 #ifdef CONSOLE_SYSLOGS
00067 REQUIRE_OBJECT ( syslogs );
00068 #endif
00069 #ifdef CONSOLE_EFI
00070 REQUIRE_OBJECT ( efi_console );
00071 #endif
00072 #ifdef CONSOLE_LINUX
00073 REQUIRE_OBJECT ( linux_console );
00074 #endif
00075 #ifdef CONSOLE_VMWARE
00076 REQUIRE_OBJECT ( vmconsole );
00077 #endif
00078 #ifdef CONSOLE_DEBUGCON
00079 REQUIRE_OBJECT ( debugcon );
00080 #endif
00081 
00082 /*
00083  * Drag in all requested network protocols
00084  *
00085  */
00086 #ifdef NET_PROTO_IPV4
00087 REQUIRE_OBJECT ( ipv4 );
00088 #endif
00089 #ifdef NET_PROTO_IPV6
00090 REQUIRE_OBJECT ( ipv6 );
00091 #endif
00092 
00093 /*
00094  * Drag in all requested PXE support
00095  *
00096  */
00097 #ifdef PXE_MENU
00098 REQUIRE_OBJECT ( pxemenu );
00099 #endif
00100 #ifdef PXE_STACK
00101 REQUIRE_OBJECT ( pxe_call );
00102 #endif
00103 
00104 /*
00105  * Drag in all requested download protocols
00106  *
00107  */
00108 #ifdef DOWNLOAD_PROTO_TFTP
00109 REQUIRE_OBJECT ( tftp );
00110 #endif
00111 #ifdef DOWNLOAD_PROTO_HTTP
00112 REQUIRE_OBJECT ( http );
00113 #endif
00114 #ifdef DOWNLOAD_PROTO_HTTPS
00115 REQUIRE_OBJECT ( https );
00116 #endif
00117 #ifdef DOWNLOAD_PROTO_FTP
00118 REQUIRE_OBJECT ( ftp );
00119 #endif
00120 #ifdef DOWNLOAD_PROTO_NFS
00121 REQUIRE_OBJECT ( nfs_open );
00122 #endif
00123 #ifdef DOWNLOAD_PROTO_SLAM
00124 REQUIRE_OBJECT ( slam );
00125 #endif
00126 
00127 /*
00128  * Drag in all requested SAN boot protocols
00129  *
00130  */
00131 #ifdef SANBOOT_PROTO_ISCSI
00132 REQUIRE_OBJECT ( iscsi );
00133 #endif
00134 #ifdef SANBOOT_PROTO_HTTP
00135 REQUIRE_OBJECT ( httpblock );
00136 #endif
00137 
00138 /*
00139  * Drag in all requested resolvers
00140  *
00141  */
00142 #ifdef DNS_RESOLVER
00143 REQUIRE_OBJECT ( dns );
00144 #endif
00145 
00146 /*
00147  * Drag in all requested image formats
00148  *
00149  */
00150 #ifdef IMAGE_NBI
00151 REQUIRE_OBJECT ( nbi );
00152 #endif
00153 #ifdef IMAGE_ELF
00154 REQUIRE_OBJECT ( elfboot );
00155 #endif
00156 #ifdef IMAGE_MULTIBOOT
00157 REQUIRE_OBJECT ( multiboot );
00158 #endif
00159 #ifdef IMAGE_PXE
00160 REQUIRE_OBJECT ( pxe_image );
00161 #endif
00162 #ifdef IMAGE_SCRIPT
00163 REQUIRE_OBJECT ( script );
00164 #endif
00165 #ifdef IMAGE_BZIMAGE
00166 REQUIRE_OBJECT ( bzimage );
00167 #endif
00168 #ifdef IMAGE_ELTORITO
00169 REQUIRE_OBJECT ( eltorito );
00170 #endif
00171 #ifdef IMAGE_COMBOOT
00172 REQUIRE_OBJECT ( comboot );
00173 REQUIRE_OBJECT ( com32 );
00174 REQUIRE_OBJECT ( comboot_call );
00175 REQUIRE_OBJECT ( com32_call );
00176 REQUIRE_OBJECT ( com32_wrapper );
00177 REQUIRE_OBJECT ( comboot_resolv );
00178 #endif
00179 #ifdef IMAGE_EFI
00180 REQUIRE_OBJECT ( efi_image );
00181 #endif
00182 #ifdef IMAGE_SDI
00183 REQUIRE_OBJECT ( sdi );
00184 #endif
00185 
00186 /*
00187  * Drag in all requested commands
00188  *
00189  */
00190 #ifdef AUTOBOOT_CMD
00191 REQUIRE_OBJECT ( autoboot_cmd );
00192 #endif
00193 #ifdef NVO_CMD
00194 REQUIRE_OBJECT ( nvo_cmd );
00195 #endif
00196 #ifdef CONFIG_CMD
00197 REQUIRE_OBJECT ( config_cmd );
00198 #endif
00199 #ifdef IFMGMT_CMD
00200 REQUIRE_OBJECT ( ifmgmt_cmd );
00201 #endif
00202 /* IWMGMT_CMD is brought in by net80211.c if requested */
00203 #ifdef ROUTE_CMD
00204 REQUIRE_OBJECT ( route_cmd );
00205 #endif
00206 #ifdef IMAGE_CMD
00207 REQUIRE_OBJECT ( image_cmd );
00208 #endif
00209 #ifdef IMAGE_TRUST_CMD
00210 REQUIRE_OBJECT ( image_trust_cmd );
00211 #endif
00212 #ifdef DHCP_CMD
00213 REQUIRE_OBJECT ( dhcp_cmd );
00214 #endif
00215 #ifdef SANBOOT_CMD
00216 REQUIRE_OBJECT ( sanboot_cmd );
00217 #endif
00218 #ifdef MENU_CMD
00219 REQUIRE_OBJECT ( menu_cmd );
00220 #endif
00221 #ifdef LOGIN_CMD
00222 REQUIRE_OBJECT ( login_cmd );
00223 #endif
00224 #ifdef TIME_CMD
00225 REQUIRE_OBJECT ( time_cmd );
00226 #endif
00227 #ifdef DIGEST_CMD
00228 REQUIRE_OBJECT ( digest_cmd );
00229 #endif
00230 #ifdef PXE_CMD
00231 REQUIRE_OBJECT ( pxe_cmd );
00232 #endif
00233 #ifdef LOTEST_CMD
00234 REQUIRE_OBJECT ( lotest_cmd );
00235 #endif
00236 #ifdef VLAN_CMD
00237 REQUIRE_OBJECT ( vlan_cmd );
00238 #endif
00239 #ifdef POWEROFF_CMD
00240 REQUIRE_OBJECT ( poweroff_cmd );
00241 #endif
00242 #ifdef REBOOT_CMD
00243 REQUIRE_OBJECT ( reboot_cmd );
00244 #endif
00245 #ifdef CPUID_CMD
00246 REQUIRE_OBJECT ( cpuid_cmd );
00247 #endif
00248 #ifdef SYNC_CMD
00249 REQUIRE_OBJECT ( sync_cmd );
00250 #endif
00251 #ifdef SHELL_CMD
00252 REQUIRE_OBJECT ( shell );
00253 #endif
00254 #ifdef NSLOOKUP_CMD
00255 REQUIRE_OBJECT ( nslookup_cmd );
00256 #endif
00257 #ifdef PCI_CMD
00258 REQUIRE_OBJECT ( pci_cmd );
00259 #endif
00260 #ifdef PARAM_CMD
00261 REQUIRE_OBJECT ( param_cmd );
00262 #endif
00263 #ifdef NEIGHBOUR_CMD
00264 REQUIRE_OBJECT ( neighbour_cmd );
00265 #endif
00266 #ifdef PING_CMD
00267 REQUIRE_OBJECT ( ping_cmd );
00268 #endif
00269 #ifdef CONSOLE_CMD
00270 REQUIRE_OBJECT ( console_cmd );
00271 #endif
00272 #ifdef IPSTAT_CMD
00273 REQUIRE_OBJECT ( ipstat_cmd );
00274 #endif
00275 #ifdef PROFSTAT_CMD
00276 REQUIRE_OBJECT ( profstat_cmd );
00277 #endif
00278 #ifdef NTP_CMD
00279 REQUIRE_OBJECT ( ntp_cmd );
00280 #endif
00281 #ifdef CERT_CMD
00282 REQUIRE_OBJECT ( cert_cmd );
00283 #endif
00284 
00285 /*
00286  * Drag in miscellaneous objects
00287  *
00288  */
00289 #ifdef NULL_TRAP
00290 REQUIRE_OBJECT ( nulltrap );
00291 #endif
00292 #ifdef GDBSERIAL
00293 REQUIRE_OBJECT ( gdbidt );
00294 REQUIRE_OBJECT ( gdbserial );
00295 REQUIRE_OBJECT ( gdbstub_cmd );
00296 #endif
00297 #ifdef GDBUDP
00298 REQUIRE_OBJECT ( gdbidt );
00299 REQUIRE_OBJECT ( gdbudp );
00300 REQUIRE_OBJECT ( gdbstub_cmd );
00301 #endif
00302 
00303 /*
00304  * Drag in objects that are always required, but not dragged in via
00305  * symbol dependencies.
00306  *
00307  */
00308 REQUIRE_OBJECT ( device );
00309 REQUIRE_OBJECT ( embedded );
00310 
00311 /* linux drivers aren't picked up by the parserom utility so drag them in here */
00312 #ifdef DRIVERS_LINUX
00313 REQUIRE_OBJECT ( tap );
00314 #endif
00315 
00316 /*
00317  * Drag in relevant sideband entry points
00318  */
00319 #ifdef CONFIG_BOFM
00320 #ifdef BOFM_EFI
00321 REQUIRE_OBJECT ( efi_bofm );
00322 #endif /* BOFM_EFI */
00323 #endif /* CONFIG_BOFM */
00324 
00325 /*
00326  * Drag in relevant settings sources
00327  */
00328 #ifdef PCI_SETTINGS
00329 REQUIRE_OBJECT ( pci_settings );
00330 #endif
00331 #ifdef VMWARE_SETTINGS
00332 REQUIRE_OBJECT ( guestinfo );
00333 #endif
00334 #ifdef CPUID_SETTINGS
00335 REQUIRE_OBJECT ( cpuid_settings );
00336 #endif
00337 #ifdef MEMMAP_SETTINGS
00338 REQUIRE_OBJECT ( memmap_settings );
00339 #endif
00340 #ifdef VRAM_SETTINGS
00341 REQUIRE_OBJECT ( vram_settings );
00342 #endif
00343 #ifdef ACPI_SETTINGS
00344 REQUIRE_OBJECT ( acpi_settings );
00345 #endif
00346 
00347 /*
00348  * Drag in selected keyboard map
00349  */
00350 #define REQUIRE_KEYMAP_OBJECT( _map ) REQUIRE_OBJECT ( keymap_ ## _map )
00351 #define REQUIRE_KEYMAP( _map ) REQUIRE_KEYMAP_OBJECT ( _map )
00352 REQUIRE_KEYMAP ( KEYBOARD_MAP );