[ipv6] Add "ipv6" command to perform stateless autoconfiguration
[gpxe.git] / src / config / config.c
blobcf6d6ba363008e3e482d638f66e00d7355b55730
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 */
8 FILE_LICENCE ( GPL2_OR_LATER );
10 #include <config/general.h>
11 #include <config/console.h>
13 /** @file
15 * Configuration options
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.
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.
32 * Build ID string calculations
35 #undef XSTR
36 #undef STR
37 #define XSTR(s) STR(s)
38 #define STR(s) #s
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
47 #ifdef BUILD_ID
48 #define BUILD_ID_STR " " BUILD_ID
49 #else
50 #define BUILD_ID_STR ""
51 #endif
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
60 * Drag in all requested console types
64 #ifdef CONSOLE_PCBIOS
65 REQUIRE_OBJECT ( bios_console );
66 #endif
67 #ifdef CONSOLE_SERIAL
68 REQUIRE_OBJECT ( serial_console );
69 #endif
70 #ifdef CONSOLE_DIRECT_VGA
71 REQUIRE_OBJECT ( video_subr );
72 #endif
73 #ifdef CONSOLE_BTEXT
74 REQUIRE_OBJECT ( btext );
75 #endif
76 #ifdef CONSOLE_PC_KBD
77 REQUIRE_OBJECT ( pc_kbd );
78 #endif
79 #ifdef CONSOLE_SYSLOG
80 REQUIRE_OBJECT ( syslog );
81 #endif
82 #ifdef CONSOLE_EFI
83 REQUIRE_OBJECT ( efi_console );
84 #endif
87 * Drag in all requested network protocols
90 #ifdef NET_PROTO_IPV4
91 REQUIRE_OBJECT ( ipv4 );
92 #endif
94 #ifdef NET_PROTO_IPV6
95 REQUIRE_OBJECT ( ipv6 );
96 #endif
99 * Drag in all requested PXE support
102 #ifdef PXE_MENU
103 REQUIRE_OBJECT ( pxemenu );
104 #endif
105 #ifdef PXE_STACK
106 REQUIRE_OBJECT ( pxe_call );
107 #endif
110 * Drag in all requested download protocols
113 #ifdef DOWNLOAD_PROTO_TFTP
114 REQUIRE_OBJECT ( tftp );
115 #endif
116 #ifdef DOWNLOAD_PROTO_HTTP
117 REQUIRE_OBJECT ( http );
118 #endif
119 #ifdef DOWNLOAD_PROTO_HTTPS
120 REQUIRE_OBJECT ( https );
121 #endif
122 #ifdef DOWNLOAD_PROTO_FTP
123 REQUIRE_OBJECT ( ftp );
124 #endif
125 #ifdef DOWNLOAD_PROTO_TFTM
126 REQUIRE_OBJECT ( tftm );
127 #endif
128 #ifdef DOWNLOAD_PROTO_SLAM
129 REQUIRE_OBJECT ( slam );
130 #endif
133 * Drag in all requested SAN boot protocols
136 #ifdef SANBOOT_PROTO_ISCSI
137 REQUIRE_OBJECT ( iscsiboot );
138 #endif
139 #ifdef SANBOOT_PROTO_AOE
140 REQUIRE_OBJECT ( aoeboot );
141 #endif
142 #ifdef SANBOOT_PROTO_IB_SRP
143 REQUIRE_OBJECT ( ib_srpboot );
144 #endif
147 * Drag in all requested resolvers
150 #ifdef DNS_RESOLVER
151 REQUIRE_OBJECT ( dns );
152 #endif
155 * Drag in all requested image formats
158 #ifdef IMAGE_NBI
159 REQUIRE_OBJECT ( nbi );
160 #endif
161 #ifdef IMAGE_ELF
162 REQUIRE_OBJECT ( elfboot );
163 #endif
164 #ifdef IMAGE_FREEBSD
165 REQUIRE_OBJECT ( freebsd );
166 #endif
167 #ifdef IMAGE_MULTIBOOT
168 REQUIRE_OBJECT ( multiboot );
169 #endif
170 #ifdef IMAGE_AOUT
171 REQUIRE_OBJECT ( aout );
172 #endif
173 #ifdef IMAGE_WINCE
174 REQUIRE_OBJECT ( wince );
175 #endif
176 #ifdef IMAGE_PXE
177 REQUIRE_OBJECT ( pxe_image );
178 #endif
179 #ifdef IMAGE_SCRIPT
180 REQUIRE_OBJECT ( script );
181 #endif
182 #ifdef IMAGE_BZIMAGE
183 REQUIRE_OBJECT ( bzimage );
184 #endif
185 #ifdef IMAGE_ELTORITO
186 REQUIRE_OBJECT ( eltorito );
187 #endif
188 #ifdef IMAGE_COMBOOT
189 REQUIRE_OBJECT ( comboot );
190 REQUIRE_OBJECT ( com32 );
191 REQUIRE_OBJECT ( comboot_call );
192 REQUIRE_OBJECT ( com32_call );
193 REQUIRE_OBJECT ( com32_wrapper );
194 REQUIRE_OBJECT ( comboot_resolv );
195 #endif
196 #ifdef IMAGE_EFI
197 REQUIRE_OBJECT ( efi_image );
198 #endif
201 * Drag in all requested commands
204 #ifdef AUTOBOOT_CMD
205 REQUIRE_OBJECT ( autoboot_cmd );
206 #endif
207 #ifdef NVO_CMD
208 REQUIRE_OBJECT ( nvo_cmd );
209 #endif
210 #ifdef CONFIG_CMD
211 REQUIRE_OBJECT ( config_cmd );
212 #endif
213 #ifdef IFMGMT_CMD
214 REQUIRE_OBJECT ( ifmgmt_cmd );
215 #endif
216 /* IWMGMT_CMD is brought in by net80211.c if requested */
217 #ifdef ROUTE_CMD
218 REQUIRE_OBJECT ( route_cmd );
219 #endif
220 #ifdef IMAGE_CMD
221 REQUIRE_OBJECT ( image_cmd );
222 #endif
223 #ifdef DHCP_CMD
224 REQUIRE_OBJECT ( dhcp_cmd );
225 #endif
226 #ifdef SANBOOT_CMD
227 REQUIRE_OBJECT ( sanboot_cmd );
228 #endif
229 #ifdef LOGIN_CMD
230 REQUIRE_OBJECT ( login_cmd );
231 #endif
232 #ifdef TIME_CMD
233 REQUIRE_OBJECT ( time_cmd );
234 #endif
235 #ifdef DIGEST_CMD
236 REQUIRE_OBJECT ( digest_cmd );
237 #endif
238 #ifdef PXE_CMD
239 REQUIRE_OBJECT ( pxe_cmd );
240 #endif
241 #ifdef IPV6_CMD
242 REQUIRE_OBJECT ( ipv6_cmd );
243 #endif
246 * Drag in miscellaneous objects
249 #ifdef NULL_TRAP
250 REQUIRE_OBJECT ( nulltrap );
251 #endif
252 #ifdef GDBSERIAL
253 REQUIRE_OBJECT ( gdbidt );
254 REQUIRE_OBJECT ( gdbserial );
255 REQUIRE_OBJECT ( gdbstub_cmd );
256 #endif
257 #ifdef GDBUDP
258 REQUIRE_OBJECT ( gdbidt );
259 REQUIRE_OBJECT ( gdbudp );
260 REQUIRE_OBJECT ( gdbstub_cmd );
261 #endif
264 * Drag in objects that are always required, but not dragged in via
265 * symbol dependencies.
268 REQUIRE_OBJECT ( device );
269 REQUIRE_OBJECT ( embedded );