選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

config.c 6.2KB

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