You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.c 7.2KB

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