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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352
  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. /*
  174. * Drag in all requested commands
  175. *
  176. */
  177. #ifdef AUTOBOOT_CMD
  178. REQUIRE_OBJECT ( autoboot_cmd );
  179. #endif
  180. #ifdef NVO_CMD
  181. REQUIRE_OBJECT ( nvo_cmd );
  182. #endif
  183. #ifdef CONFIG_CMD
  184. REQUIRE_OBJECT ( config_cmd );
  185. #endif
  186. #ifdef IFMGMT_CMD
  187. REQUIRE_OBJECT ( ifmgmt_cmd );
  188. #endif
  189. /* IWMGMT_CMD is brought in by net80211.c if requested */
  190. #ifdef ROUTE_CMD
  191. REQUIRE_OBJECT ( route_cmd );
  192. #endif
  193. #ifdef IMAGE_CMD
  194. REQUIRE_OBJECT ( image_cmd );
  195. #endif
  196. #ifdef IMAGE_TRUST_CMD
  197. REQUIRE_OBJECT ( image_trust_cmd );
  198. #endif
  199. #ifdef DHCP_CMD
  200. REQUIRE_OBJECT ( dhcp_cmd );
  201. #endif
  202. #ifdef SANBOOT_CMD
  203. REQUIRE_OBJECT ( sanboot_cmd );
  204. #endif
  205. #ifdef MENU_CMD
  206. REQUIRE_OBJECT ( menu_cmd );
  207. #endif
  208. #ifdef LOGIN_CMD
  209. REQUIRE_OBJECT ( login_cmd );
  210. #endif
  211. #ifdef TIME_CMD
  212. REQUIRE_OBJECT ( time_cmd );
  213. #endif
  214. #ifdef DIGEST_CMD
  215. REQUIRE_OBJECT ( digest_cmd );
  216. #endif
  217. #ifdef PXE_CMD
  218. REQUIRE_OBJECT ( pxe_cmd );
  219. #endif
  220. #ifdef LOTEST_CMD
  221. REQUIRE_OBJECT ( lotest_cmd );
  222. #endif
  223. #ifdef VLAN_CMD
  224. REQUIRE_OBJECT ( vlan_cmd );
  225. #endif
  226. #ifdef POWEROFF_CMD
  227. REQUIRE_OBJECT ( poweroff_cmd );
  228. #endif
  229. #ifdef REBOOT_CMD
  230. REQUIRE_OBJECT ( reboot_cmd );
  231. #endif
  232. #ifdef CPUID_CMD
  233. REQUIRE_OBJECT ( cpuid_cmd );
  234. #endif
  235. #ifdef SYNC_CMD
  236. REQUIRE_OBJECT ( sync_cmd );
  237. #endif
  238. #ifdef SHELL_CMD
  239. REQUIRE_OBJECT ( shell );
  240. #endif
  241. #ifdef NSLOOKUP_CMD
  242. REQUIRE_OBJECT ( nslookup_cmd );
  243. #endif
  244. #ifdef PCI_CMD
  245. REQUIRE_OBJECT ( pci_cmd );
  246. #endif
  247. #ifdef PARAM_CMD
  248. REQUIRE_OBJECT ( param_cmd );
  249. #endif
  250. #ifdef NEIGHBOUR_CMD
  251. REQUIRE_OBJECT ( neighbour_cmd );
  252. #endif
  253. #ifdef PING_CMD
  254. REQUIRE_OBJECT ( ping_cmd );
  255. #endif
  256. #ifdef CONSOLE_CMD
  257. REQUIRE_OBJECT ( console_cmd );
  258. #endif
  259. #ifdef IPSTAT_CMD
  260. REQUIRE_OBJECT ( ipstat_cmd );
  261. #endif
  262. #ifdef PROFSTAT_CMD
  263. REQUIRE_OBJECT ( profstat_cmd );
  264. #endif
  265. #ifdef NTP_CMD
  266. REQUIRE_OBJECT ( ntp_cmd );
  267. #endif
  268. #ifdef CERT_CMD
  269. REQUIRE_OBJECT ( cert_cmd );
  270. #endif
  271. /*
  272. * Drag in miscellaneous objects
  273. *
  274. */
  275. #ifdef NULL_TRAP
  276. REQUIRE_OBJECT ( nulltrap );
  277. #endif
  278. #ifdef GDBSERIAL
  279. REQUIRE_OBJECT ( gdbidt );
  280. REQUIRE_OBJECT ( gdbserial );
  281. REQUIRE_OBJECT ( gdbstub_cmd );
  282. #endif
  283. #ifdef GDBUDP
  284. REQUIRE_OBJECT ( gdbidt );
  285. REQUIRE_OBJECT ( gdbudp );
  286. REQUIRE_OBJECT ( gdbstub_cmd );
  287. #endif
  288. /*
  289. * Drag in objects that are always required, but not dragged in via
  290. * symbol dependencies.
  291. *
  292. */
  293. REQUIRE_OBJECT ( device );
  294. REQUIRE_OBJECT ( embedded );
  295. /* linux drivers aren't picked up by the parserom utility so drag them in here */
  296. #ifdef DRIVERS_LINUX
  297. REQUIRE_OBJECT ( tap );
  298. #endif
  299. /*
  300. * Drag in relevant sideband entry points
  301. */
  302. #ifdef CONFIG_BOFM
  303. #ifdef BOFM_EFI
  304. REQUIRE_OBJECT ( efi_bofm );
  305. #endif /* BOFM_EFI */
  306. #endif /* CONFIG_BOFM */
  307. /*
  308. * Drag in relevant settings sources
  309. */
  310. #ifdef PCI_SETTINGS
  311. REQUIRE_OBJECT ( pci_settings );
  312. #endif
  313. #ifdef VMWARE_SETTINGS
  314. REQUIRE_OBJECT ( guestinfo );
  315. #endif
  316. #ifdef CPUID_SETTINGS
  317. REQUIRE_OBJECT ( cpuid_settings );
  318. #endif
  319. #ifdef MEMMAP_SETTINGS
  320. REQUIRE_OBJECT ( memmap_settings );
  321. #endif
  322. #ifdef VRAM_SETTINGS
  323. REQUIRE_OBJECT ( vram_settings );
  324. #endif
  325. #ifdef ACPI_SETTINGS
  326. REQUIRE_OBJECT ( acpi_settings );
  327. #endif
  328. /*
  329. * Drag in selected keyboard map
  330. */
  331. #define REQUIRE_KEYMAP_OBJECT( _map ) REQUIRE_OBJECT ( keymap_ ## _map )
  332. #define REQUIRE_KEYMAP( _map ) REQUIRE_KEYMAP_OBJECT ( _map )
  333. REQUIRE_KEYMAP ( KEYBOARD_MAP );