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 5.9KB

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