2005-03-08 19:53:11 +01:00
|
|
|
/*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License as
|
2015-02-26 18:49:38 +01:00
|
|
|
* published by the Free Software Foundation; either version 2 of the
|
|
|
|
* License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
|
|
|
* 02110-1301, USA.
|
2015-03-02 14:29:46 +01:00
|
|
|
*
|
|
|
|
* You can also choose to distribute this program under the terms of
|
|
|
|
* the Unmodified Binary Distribution Licence (as given in the file
|
|
|
|
* COPYING.UBDL), provided that you have satisfied its requirements.
|
2005-03-08 19:53:11 +01:00
|
|
|
*/
|
|
|
|
|
2015-03-02 14:29:46 +01:00
|
|
|
FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
2009-05-01 16:41:06 +02:00
|
|
|
|
2008-10-12 03:30:31 +02:00
|
|
|
#include <config/general.h>
|
|
|
|
#include <config/console.h>
|
2011-02-17 01:31:38 +01:00
|
|
|
#include <config/sideband.h>
|
2013-07-09 17:01:52 +02:00
|
|
|
#include <config/settings.h>
|
2005-04-18 13:00:42 +02:00
|
|
|
|
2009-08-07 03:52:06 +02:00
|
|
|
/** @file
|
|
|
|
*
|
|
|
|
* Configuration options
|
|
|
|
*
|
|
|
|
* This file contains macros that pull various objects into the link
|
|
|
|
* based on definitions in configuration header files. Ideally it
|
2010-04-19 21:16:01 +02:00
|
|
|
* should be the only place in iPXE where one might need to use #ifdef
|
2009-08-07 03:52:06 +02:00
|
|
|
* for compile-time options.
|
|
|
|
*
|
|
|
|
* In the fairly common case where an object should only be considered
|
|
|
|
* for inclusion if the subsystem it depends on is present, its
|
|
|
|
* configuration macros should be placed in a file named
|
|
|
|
* <tt>config_<i>subsystem</i>.c</tt>, where @e subsystem is the
|
|
|
|
* object basename of the main source file for that subsystem. The
|
|
|
|
* build system will pull in that file if @c subsystem.c is included
|
2010-04-19 21:16:01 +02:00
|
|
|
* in the final iPXE executable built.
|
2009-08-07 03:52:06 +02:00
|
|
|
*/
|
|
|
|
|
2015-03-04 19:48:19 +01:00
|
|
|
PROVIDE_REQUIRING_SYMBOL();
|
|
|
|
|
2005-04-08 17:01:17 +02:00
|
|
|
/*
|
|
|
|
* Drag in all requested console types
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2005-04-18 14:43:18 +02:00
|
|
|
#ifdef CONSOLE_SERIAL
|
2015-06-29 09:43:16 +02:00
|
|
|
REQUIRE_OBJECT ( serial );
|
2005-04-08 17:01:17 +02:00
|
|
|
#endif
|
2005-04-18 14:43:18 +02:00
|
|
|
#ifdef CONSOLE_DIRECT_VGA
|
2005-04-08 17:01:17 +02:00
|
|
|
REQUIRE_OBJECT ( video_subr );
|
|
|
|
#endif
|
2005-04-18 14:43:18 +02:00
|
|
|
#ifdef CONSOLE_PC_KBD
|
2005-04-08 17:01:17 +02:00
|
|
|
REQUIRE_OBJECT ( pc_kbd );
|
|
|
|
#endif
|
2007-04-09 20:01:43 +02:00
|
|
|
#ifdef CONSOLE_SYSLOG
|
|
|
|
REQUIRE_OBJECT ( syslog );
|
|
|
|
#endif
|
2012-04-10 12:54:31 +02:00
|
|
|
#ifdef CONSOLE_SYSLOGS
|
|
|
|
REQUIRE_OBJECT ( syslogs );
|
|
|
|
#endif
|
2008-10-12 02:55:55 +02:00
|
|
|
#ifdef CONSOLE_EFI
|
|
|
|
REQUIRE_OBJECT ( efi_console );
|
|
|
|
#endif
|
2010-04-08 01:40:31 +02:00
|
|
|
#ifdef CONSOLE_LINUX
|
|
|
|
REQUIRE_OBJECT ( linux_console );
|
|
|
|
#endif
|
2012-02-29 00:09:06 +01:00
|
|
|
#ifdef CONSOLE_VMWARE
|
|
|
|
REQUIRE_OBJECT ( vmconsole );
|
|
|
|
#endif
|
2012-09-10 16:58:02 +02:00
|
|
|
#ifdef CONSOLE_DEBUGCON
|
|
|
|
REQUIRE_OBJECT ( debugcon );
|
|
|
|
#endif
|
2007-04-09 20:01:43 +02:00
|
|
|
|
2005-05-02 13:13:47 +02:00
|
|
|
/*
|
2008-03-21 01:06:28 +01:00
|
|
|
* Drag in all requested network protocols
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifdef NET_PROTO_IPV4
|
|
|
|
REQUIRE_OBJECT ( ipv4 );
|
|
|
|
#endif
|
2013-08-26 15:23:54 +02:00
|
|
|
#ifdef NET_PROTO_IPV6
|
|
|
|
REQUIRE_OBJECT ( ipv6 );
|
|
|
|
#endif
|
2008-03-21 01:06:28 +01:00
|
|
|
|
2009-10-07 01:15:06 +02:00
|
|
|
/*
|
|
|
|
* Drag in all requested PXE support
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifdef PXE_MENU
|
|
|
|
REQUIRE_OBJECT ( pxemenu );
|
|
|
|
#endif
|
|
|
|
#ifdef PXE_STACK
|
|
|
|
REQUIRE_OBJECT ( pxe_call );
|
|
|
|
#endif
|
|
|
|
|
2008-03-21 01:06:28 +01:00
|
|
|
/*
|
|
|
|
* Drag in all requested download protocols
|
2005-05-02 13:13:47 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifdef DOWNLOAD_PROTO_TFTP
|
|
|
|
REQUIRE_OBJECT ( tftp );
|
|
|
|
#endif
|
|
|
|
#ifdef DOWNLOAD_PROTO_HTTP
|
|
|
|
REQUIRE_OBJECT ( http );
|
|
|
|
#endif
|
2007-07-30 04:01:04 +02:00
|
|
|
#ifdef DOWNLOAD_PROTO_HTTPS
|
|
|
|
REQUIRE_OBJECT ( https );
|
|
|
|
#endif
|
2007-06-28 19:49:57 +02:00
|
|
|
#ifdef DOWNLOAD_PROTO_FTP
|
|
|
|
REQUIRE_OBJECT ( ftp );
|
|
|
|
#endif
|
2013-07-15 17:56:29 +02:00
|
|
|
#ifdef DOWNLOAD_PROTO_NFS
|
|
|
|
REQUIRE_OBJECT ( nfs_open );
|
|
|
|
#endif
|
2005-05-02 13:13:47 +02:00
|
|
|
#ifdef DOWNLOAD_PROTO_SLAM
|
|
|
|
REQUIRE_OBJECT ( slam );
|
|
|
|
#endif
|
|
|
|
|
2008-10-13 11:05:23 +02:00
|
|
|
/*
|
|
|
|
* Drag in all requested SAN boot protocols
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifdef SANBOOT_PROTO_ISCSI
|
[block] Replace gPXE block-device API with an iPXE asynchronous interface
The block device interface used in gPXE predates the invention of even
the old gPXE data-transfer interface, let alone the current iPXE
generic asynchronous interface mechanism. Bring this old code up to
date, with the following benefits:
o Block device commands can be cancelled by the requestor. The INT 13
layer uses this to provide a global timeout on all INT 13 calls,
with the result that an unexpected passive failure mode (such as
an iSCSI target ACKing the request but never sending a response)
will lead to a timeout that gets reported back to the INT 13 user,
rather than simply freezing the system.
o INT 13,00 (reset drive) is now able to reset the underlying block
device. INT 13 users, such as DOS, that use INT 13,00 as a method
for error recovery now have a chance of recovering.
o All block device commands are tagged, with a numerical tag that
will show up in debugging output and in packet captures; this will
allow easier interpretation of bug reports that include both
sources of information.
o The extremely ugly hacks used to generate the boot firmware tables
have been eradicated and replaced with a generic acpi_describe()
method (exploiting the ability of iPXE interfaces to pass through
methods to an underlying interface). The ACPI tables are now
built in a shared data block within .bss16, rather than each
requiring dedicated space in .data16.
o The architecture-independent concept of a SAN device has been
exposed to the iPXE core through the sanboot API, which provides
calls to hook, unhook, boot, and describe SAN devices. This
allows for much more flexible usage patterns (such as hooking an
empty SAN device and then running an OS installer via TFTP).
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2010-09-03 17:11:51 +02:00
|
|
|
REQUIRE_OBJECT ( iscsi );
|
2008-10-13 11:05:23 +02:00
|
|
|
#endif
|
2015-08-17 14:16:26 +02:00
|
|
|
#ifdef SANBOOT_PROTO_HTTP
|
|
|
|
REQUIRE_OBJECT ( httpblock );
|
|
|
|
#endif
|
2008-10-13 11:05:23 +02:00
|
|
|
|
2005-04-30 16:39:21 +02:00
|
|
|
/*
|
2008-03-21 01:06:28 +01:00
|
|
|
* Drag in all requested resolvers
|
2005-04-30 16:39:21 +02:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#ifdef DNS_RESOLVER
|
2005-04-30 16:49:41 +02:00
|
|
|
REQUIRE_OBJECT ( dns );
|
2005-04-30 16:39:21 +02:00
|
|
|
#endif
|
2005-05-17 15:33:49 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Drag in all requested image formats
|
|
|
|
*
|
|
|
|
*/
|
2007-01-13 18:28:51 +01:00
|
|
|
#ifdef IMAGE_NBI
|
2005-05-17 15:33:49 +02:00
|
|
|
REQUIRE_OBJECT ( nbi );
|
|
|
|
#endif
|
2007-01-13 18:28:51 +01:00
|
|
|
#ifdef IMAGE_ELF
|
2008-06-09 14:11:46 +02:00
|
|
|
REQUIRE_OBJECT ( elfboot );
|
2005-05-17 15:33:49 +02:00
|
|
|
#endif
|
2007-01-13 18:28:51 +01:00
|
|
|
#ifdef IMAGE_MULTIBOOT
|
2005-05-17 15:33:49 +02:00
|
|
|
REQUIRE_OBJECT ( multiboot );
|
|
|
|
#endif
|
2007-01-13 18:28:51 +01:00
|
|
|
#ifdef IMAGE_PXE
|
|
|
|
REQUIRE_OBJECT ( pxe_image );
|
2005-05-17 15:33:49 +02:00
|
|
|
#endif
|
2007-01-13 18:28:51 +01:00
|
|
|
#ifdef IMAGE_SCRIPT
|
2007-01-12 10:00:48 +01:00
|
|
|
REQUIRE_OBJECT ( script );
|
|
|
|
#endif
|
2007-01-14 05:27:25 +01:00
|
|
|
#ifdef IMAGE_BZIMAGE
|
|
|
|
REQUIRE_OBJECT ( bzimage );
|
|
|
|
#endif
|
2007-01-29 05:21:38 +01:00
|
|
|
#ifdef IMAGE_ELTORITO
|
|
|
|
REQUIRE_OBJECT ( eltorito );
|
|
|
|
#endif
|
2008-08-29 00:52:19 +02:00
|
|
|
#ifdef IMAGE_COMBOOT
|
|
|
|
REQUIRE_OBJECT ( comboot );
|
|
|
|
REQUIRE_OBJECT ( com32 );
|
|
|
|
REQUIRE_OBJECT ( comboot_call );
|
|
|
|
REQUIRE_OBJECT ( com32_call );
|
|
|
|
REQUIRE_OBJECT ( com32_wrapper );
|
|
|
|
REQUIRE_OBJECT ( comboot_resolv );
|
|
|
|
#endif
|
2008-10-12 02:55:55 +02:00
|
|
|
#ifdef IMAGE_EFI
|
|
|
|
REQUIRE_OBJECT ( efi_image );
|
|
|
|
#endif
|
2012-09-04 02:26:48 +02:00
|
|
|
#ifdef IMAGE_SDI
|
|
|
|
REQUIRE_OBJECT ( sdi );
|
|
|
|
#endif
|
2006-06-11 03:55:43 +02:00
|
|
|
|
2006-12-20 01:39:06 +01:00
|
|
|
/*
|
|
|
|
* Drag in all requested commands
|
|
|
|
*
|
|
|
|
*/
|
2007-01-14 01:06:23 +01:00
|
|
|
#ifdef AUTOBOOT_CMD
|
|
|
|
REQUIRE_OBJECT ( autoboot_cmd );
|
2006-12-20 08:04:08 +01:00
|
|
|
#endif
|
2006-12-20 01:39:06 +01:00
|
|
|
#ifdef NVO_CMD
|
|
|
|
REQUIRE_OBJECT ( nvo_cmd );
|
|
|
|
#endif
|
2006-12-20 06:37:33 +01:00
|
|
|
#ifdef CONFIG_CMD
|
|
|
|
REQUIRE_OBJECT ( config_cmd );
|
|
|
|
#endif
|
2007-01-10 02:55:07 +01:00
|
|
|
#ifdef IFMGMT_CMD
|
|
|
|
REQUIRE_OBJECT ( ifmgmt_cmd );
|
|
|
|
#endif
|
2009-08-08 05:17:50 +02:00
|
|
|
/* IWMGMT_CMD is brought in by net80211.c if requested */
|
2007-01-10 21:51:14 +01:00
|
|
|
#ifdef ROUTE_CMD
|
|
|
|
REQUIRE_OBJECT ( route_cmd );
|
|
|
|
#endif
|
2007-01-12 07:05:27 +01:00
|
|
|
#ifdef IMAGE_CMD
|
|
|
|
REQUIRE_OBJECT ( image_cmd );
|
|
|
|
#endif
|
2012-03-22 14:46:38 +01:00
|
|
|
#ifdef IMAGE_TRUST_CMD
|
|
|
|
REQUIRE_OBJECT ( image_trust_cmd );
|
|
|
|
#endif
|
2007-01-12 10:53:28 +01:00
|
|
|
#ifdef DHCP_CMD
|
|
|
|
REQUIRE_OBJECT ( dhcp_cmd );
|
|
|
|
#endif
|
2008-03-04 18:59:26 +01:00
|
|
|
#ifdef SANBOOT_CMD
|
|
|
|
REQUIRE_OBJECT ( sanboot_cmd );
|
|
|
|
#endif
|
2012-03-29 01:05:22 +02:00
|
|
|
#ifdef MENU_CMD
|
|
|
|
REQUIRE_OBJECT ( menu_cmd );
|
|
|
|
#endif
|
2009-02-17 13:01:47 +01:00
|
|
|
#ifdef LOGIN_CMD
|
|
|
|
REQUIRE_OBJECT ( login_cmd );
|
|
|
|
#endif
|
2009-03-04 06:17:06 +01:00
|
|
|
#ifdef TIME_CMD
|
|
|
|
REQUIRE_OBJECT ( time_cmd );
|
|
|
|
#endif
|
2009-03-26 23:04:31 +01:00
|
|
|
#ifdef DIGEST_CMD
|
|
|
|
REQUIRE_OBJECT ( digest_cmd );
|
|
|
|
#endif
|
2009-06-28 21:50:23 +02:00
|
|
|
#ifdef PXE_CMD
|
|
|
|
REQUIRE_OBJECT ( pxe_cmd );
|
|
|
|
#endif
|
2010-09-20 14:04:17 +02:00
|
|
|
#ifdef LOTEST_CMD
|
|
|
|
REQUIRE_OBJECT ( lotest_cmd );
|
|
|
|
#endif
|
2010-11-19 01:23:26 +01:00
|
|
|
#ifdef VLAN_CMD
|
|
|
|
REQUIRE_OBJECT ( vlan_cmd );
|
|
|
|
#endif
|
2013-07-13 14:31:15 +02:00
|
|
|
#ifdef POWEROFF_CMD
|
|
|
|
REQUIRE_OBJECT ( poweroff_cmd );
|
|
|
|
#endif
|
2010-12-04 03:51:26 +01:00
|
|
|
#ifdef REBOOT_CMD
|
|
|
|
REQUIRE_OBJECT ( reboot_cmd );
|
|
|
|
#endif
|
2012-06-06 17:08:24 +02:00
|
|
|
#ifdef CPUID_CMD
|
|
|
|
REQUIRE_OBJECT ( cpuid_cmd );
|
|
|
|
#endif
|
2012-06-09 20:00:04 +02:00
|
|
|
#ifdef SYNC_CMD
|
|
|
|
REQUIRE_OBJECT ( sync_cmd );
|
|
|
|
#endif
|
2012-08-30 01:21:33 +02:00
|
|
|
#ifdef NSLOOKUP_CMD
|
|
|
|
REQUIRE_OBJECT ( nslookup_cmd );
|
|
|
|
#endif
|
2013-08-01 17:53:17 +02:00
|
|
|
#ifdef PCI_CMD
|
|
|
|
REQUIRE_OBJECT ( pci_cmd );
|
|
|
|
#endif
|
2013-08-13 23:32:45 +02:00
|
|
|
#ifdef PARAM_CMD
|
|
|
|
REQUIRE_OBJECT ( param_cmd );
|
|
|
|
#endif
|
2013-09-25 15:35:07 +02:00
|
|
|
#ifdef NEIGHBOUR_CMD
|
|
|
|
REQUIRE_OBJECT ( neighbour_cmd );
|
|
|
|
#endif
|
2013-10-21 15:20:32 +02:00
|
|
|
#ifdef PING_CMD
|
|
|
|
REQUIRE_OBJECT ( ping_cmd );
|
|
|
|
#endif
|
2013-11-27 20:43:25 +01:00
|
|
|
#ifdef CONSOLE_CMD
|
|
|
|
REQUIRE_OBJECT ( console_cmd );
|
|
|
|
#endif
|
2014-03-02 21:35:13 +01:00
|
|
|
#ifdef IPSTAT_CMD
|
|
|
|
REQUIRE_OBJECT ( ipstat_cmd );
|
|
|
|
#endif
|
2014-04-27 20:31:25 +02:00
|
|
|
#ifdef PROFSTAT_CMD
|
|
|
|
REQUIRE_OBJECT ( profstat_cmd );
|
|
|
|
#endif
|
2016-06-13 16:57:16 +02:00
|
|
|
#ifdef NTP_CMD
|
|
|
|
REQUIRE_OBJECT ( ntp_cmd );
|
|
|
|
#endif
|
2016-08-25 16:40:27 +02:00
|
|
|
#ifdef CERT_CMD
|
|
|
|
REQUIRE_OBJECT ( cert_cmd );
|
|
|
|
#endif
|
2006-12-20 01:39:06 +01:00
|
|
|
|
2006-06-11 03:55:43 +02:00
|
|
|
/*
|
|
|
|
* Drag in miscellaneous objects
|
|
|
|
*
|
|
|
|
*/
|
2007-06-30 23:43:31 +02:00
|
|
|
#ifdef NULL_TRAP
|
2006-06-11 03:55:43 +02:00
|
|
|
REQUIRE_OBJECT ( nulltrap );
|
|
|
|
#endif
|
2008-06-11 13:12:46 +02:00
|
|
|
#ifdef GDBSERIAL
|
2008-06-04 22:09:59 +02:00
|
|
|
REQUIRE_OBJECT ( gdbidt );
|
2008-06-11 13:12:46 +02:00
|
|
|
REQUIRE_OBJECT ( gdbserial );
|
|
|
|
REQUIRE_OBJECT ( gdbstub_cmd );
|
|
|
|
#endif
|
|
|
|
#ifdef GDBUDP
|
|
|
|
REQUIRE_OBJECT ( gdbidt );
|
|
|
|
REQUIRE_OBJECT ( gdbudp );
|
|
|
|
REQUIRE_OBJECT ( gdbstub_cmd );
|
2008-06-04 22:09:59 +02:00
|
|
|
#endif
|
2008-07-17 18:45:17 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Drag in objects that are always required, but not dragged in via
|
|
|
|
* symbol dependencies.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
REQUIRE_OBJECT ( device );
|
2009-02-16 01:28:30 +01:00
|
|
|
REQUIRE_OBJECT ( embedded );
|
2010-05-28 01:09:22 +02:00
|
|
|
|
|
|
|
/* linux drivers aren't picked up by the parserom utility so drag them in here */
|
|
|
|
#ifdef DRIVERS_LINUX
|
|
|
|
REQUIRE_OBJECT ( tap );
|
|
|
|
#endif
|
2011-02-17 01:31:38 +01:00
|
|
|
|
|
|
|
/*
|
2012-03-01 16:58:08 +01:00
|
|
|
* Drag in relevant sideband entry points
|
2011-02-17 01:31:38 +01:00
|
|
|
*/
|
|
|
|
#ifdef CONFIG_BOFM
|
|
|
|
#ifdef BOFM_EFI
|
|
|
|
REQUIRE_OBJECT ( efi_bofm );
|
|
|
|
#endif /* BOFM_EFI */
|
|
|
|
#endif /* CONFIG_BOFM */
|
2013-07-09 17:01:52 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Drag in relevant settings sources
|
|
|
|
*/
|
2013-07-09 17:03:35 +02:00
|
|
|
#ifdef PCI_SETTINGS
|
|
|
|
REQUIRE_OBJECT ( pci_settings );
|
|
|
|
#endif
|
2012-03-01 16:58:08 +01:00
|
|
|
#ifdef VMWARE_SETTINGS
|
|
|
|
REQUIRE_OBJECT ( guestinfo );
|
2013-07-09 17:01:52 +02:00
|
|
|
#endif
|
2013-08-06 20:16:30 +02:00
|
|
|
#ifdef CPUID_SETTINGS
|
|
|
|
REQUIRE_OBJECT ( cpuid_settings );
|
|
|
|
#endif
|
2013-08-12 14:42:12 +02:00
|
|
|
#ifdef MEMMAP_SETTINGS
|
|
|
|
REQUIRE_OBJECT ( memmap_settings );
|
|
|
|
#endif
|
2015-04-24 17:05:59 +02:00
|
|
|
#ifdef VRAM_SETTINGS
|
|
|
|
REQUIRE_OBJECT ( vram_settings );
|
|
|
|
#endif
|
2011-03-16 13:01:48 +01:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Drag in selected keyboard map
|
|
|
|
*/
|
|
|
|
#define REQUIRE_KEYMAP_OBJECT( _map ) REQUIRE_OBJECT ( keymap_ ## _map )
|
|
|
|
#define REQUIRE_KEYMAP( _map ) REQUIRE_KEYMAP_OBJECT ( _map )
|
|
|
|
REQUIRE_KEYMAP ( KEYBOARD_MAP );
|