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, or (at
5 * your option) any later version.
6 */
7
8FILE_LICENCE ( GPL2_OR_LATER );
9
10#include <config/general.h>
11#include <config/console.h>
12
13/** @file
14 *
15 * Configuration options
16 *
17 * This file contains macros that pull various objects into the link
18 * based on definitions in configuration header files. Ideally it
19 * should be the only place in gPXE where one might need to use #ifdef
20 * for compile-time options.
21 *
22 * In the fairly common case where an object should only be considered
23 * for inclusion if the subsystem it depends on is present, its
24 * configuration macros should be placed in a file named
25 * <tt>config_<i>subsystem</i>.c</tt>, where @e subsystem is the
26 * object basename of the main source file for that subsystem. The
27 * build system will pull in that file if @c subsystem.c is included
28 * in the final gPXE executable built.
29 */
30
31/*
32 * Build ID string calculations
33 *
34 */
35#undef XSTR
36#undef STR
37#define XSTR(s) STR(s)
38#define STR(s) #s
39
40#ifdef BUILD_SERIAL
41#include "config/.buildserial.h"
42#define BUILD_SERIAL_STR " #" XSTR(BUILD_SERIAL_NUM)
43#else
44#define BUILD_SERIAL_STR ""
45#endif
46
47#ifdef BUILD_ID
48#define BUILD_ID_STR " " BUILD_ID
49#else
50#define BUILD_ID_STR ""
51#endif
52
53#if defined(BUILD_ID) || defined(BUILD_SERIAL)
54#define BUILD_STRING " [build" BUILD_ID_STR BUILD_SERIAL_STR "]"
55#else
56#define BUILD_STRING ""
57#endif
58
59/*
60 * Drag in all requested console types
61 *
62 */
63
64#ifdef CONSOLE_PCBIOS
65REQUIRE_OBJECT ( bios_console );
66#endif
67#ifdef CONSOLE_SERIAL
68REQUIRE_OBJECT ( serial_console );
69#endif
70#ifdef CONSOLE_DIRECT_VGA
71REQUIRE_OBJECT ( video_subr );
72#endif
73#ifdef CONSOLE_BTEXT
74REQUIRE_OBJECT ( btext );
75#endif
76#ifdef CONSOLE_PC_KBD
77REQUIRE_OBJECT ( pc_kbd );
78#endif
79#ifdef CONSOLE_SYSLOG
80REQUIRE_OBJECT ( syslog );
81#endif
82#ifdef CONSOLE_EFI
83REQUIRE_OBJECT ( efi_console );
84#endif
85
86/*
87 * Drag in all requested network protocols
88 *
89 */
90#ifdef NET_PROTO_IPV4
91REQUIRE_OBJECT ( ipv4 );
92#endif
93
94/*
95 * Drag in all requested PXE support
96 *
97 */
98#ifdef PXE_MENU
99REQUIRE_OBJECT ( pxemenu );
100#endif
101#ifdef PXE_STACK
102REQUIRE_OBJECT ( pxe_call );
103#endif
104
105/*
106 * Drag in all requested download protocols
107 *
108 */
109#ifdef DOWNLOAD_PROTO_TFTP
110REQUIRE_OBJECT ( tftp );
111#endif
112#ifdef DOWNLOAD_PROTO_HTTP
113REQUIRE_OBJECT ( http );
114#endif
115#ifdef DOWNLOAD_PROTO_HTTPS
116REQUIRE_OBJECT ( https );
117#endif
118#ifdef DOWNLOAD_PROTO_FTP
119REQUIRE_OBJECT ( ftp );
120#endif
121#ifdef DOWNLOAD_PROTO_TFTM
122REQUIRE_OBJECT ( tftm );
123#endif
124#ifdef DOWNLOAD_PROTO_SLAM
125REQUIRE_OBJECT ( slam );
126#endif
127
128/*
129 * Drag in all requested SAN boot protocols
130 *
131 */
132#ifdef SANBOOT_PROTO_ISCSI
133REQUIRE_OBJECT ( iscsiboot );
134#endif
135#ifdef SANBOOT_PROTO_AOE
136REQUIRE_OBJECT ( aoeboot );
137#endif
138#ifdef SANBOOT_PROTO_IB_SRP
139REQUIRE_OBJECT ( ib_srpboot );
140#endif
141
142/*
143 * Drag in all requested resolvers
144 *
145 */
146#ifdef DNS_RESOLVER
147REQUIRE_OBJECT ( dns );
148#endif
149
150/*
151 * Drag in all requested image formats
152 *
153 */
154#ifdef IMAGE_NBI
155REQUIRE_OBJECT ( nbi );
156#endif
157#ifdef IMAGE_ELF
158REQUIRE_OBJECT ( elfboot );
159#endif
160#ifdef IMAGE_FREEBSD
161REQUIRE_OBJECT ( freebsd );
162#endif
163#ifdef IMAGE_MULTIBOOT
164REQUIRE_OBJECT ( multiboot );
165#endif
166#ifdef IMAGE_AOUT
167REQUIRE_OBJECT ( aout );
168#endif
169#ifdef IMAGE_WINCE
170REQUIRE_OBJECT ( wince );
171#endif
172#ifdef IMAGE_PXE
173REQUIRE_OBJECT ( pxe_image );
174#endif
175#ifdef IMAGE_SCRIPT
176REQUIRE_OBJECT ( script );
177#endif
178#ifdef IMAGE_BZIMAGE
179REQUIRE_OBJECT ( bzimage );
180#endif
181#ifdef IMAGE_ELTORITO
182REQUIRE_OBJECT ( eltorito );
183#endif
184#ifdef IMAGE_COMBOOT
185REQUIRE_OBJECT ( comboot );
186REQUIRE_OBJECT ( com32 );
187REQUIRE_OBJECT ( comboot_call );
188REQUIRE_OBJECT ( com32_call );
189REQUIRE_OBJECT ( com32_wrapper );
190REQUIRE_OBJECT ( comboot_resolv );
191#endif
192#ifdef IMAGE_EFI
193REQUIRE_OBJECT ( efi_image );
194#endif
195
196/*
197 * Drag in all requested commands
198 *
199 */
200#ifdef AUTOBOOT_CMD
201REQUIRE_OBJECT ( autoboot_cmd );
202#endif
203#ifdef NVO_CMD
204REQUIRE_OBJECT ( nvo_cmd );
205#endif
206#ifdef CONFIG_CMD
207REQUIRE_OBJECT ( config_cmd );
208#endif
209#ifdef IFMGMT_CMD
210REQUIRE_OBJECT ( ifmgmt_cmd );
211#endif
212/* IWMGMT_CMD is brought in by net80211.c if requested */
213#ifdef ROUTE_CMD
214REQUIRE_OBJECT ( route_cmd );
215#endif
216#ifdef IMAGE_CMD
217REQUIRE_OBJECT ( image_cmd );
218#endif
219#ifdef DHCP_CMD
220REQUIRE_OBJECT ( dhcp_cmd );
221#endif
222#ifdef SANBOOT_CMD
223REQUIRE_OBJECT ( sanboot_cmd );
224#endif
225#ifdef LOGIN_CMD
226REQUIRE_OBJECT ( login_cmd );
227#endif
228#ifdef TIME_CMD
229REQUIRE_OBJECT ( time_cmd );
230#endif
231#ifdef DIGEST_CMD
232REQUIRE_OBJECT ( digest_cmd );
233#endif
234#ifdef PXE_CMD
235REQUIRE_OBJECT ( pxe_cmd );
236#endif
237
238/*
239 * Drag in miscellaneous objects
240 *
241 */
242#ifdef NULL_TRAP
243REQUIRE_OBJECT ( nulltrap );
244#endif
245#ifdef GDBSERIAL
246REQUIRE_OBJECT ( gdbidt );
247REQUIRE_OBJECT ( gdbserial );
248REQUIRE_OBJECT ( gdbstub_cmd );
249#endif
250#ifdef GDBUDP
251REQUIRE_OBJECT ( gdbidt );
252REQUIRE_OBJECT ( gdbudp );
253REQUIRE_OBJECT ( gdbstub_cmd );
254#endif
255
256/*
257 * Drag in objects that are always required, but not dragged in via
258 * symbol dependencies.
259 *
260 */
261REQUIRE_OBJECT ( device );
262REQUIRE_OBJECT ( embedded );
263