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

config.c 6.8KB

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, 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. #ifdef CONSOLE_VESAFB
  88. REQUIRE_OBJECT ( vesafb );
  89. #endif
  90. /*
  91. * Drag in all requested network protocols
  92. *
  93. */
  94. #ifdef NET_PROTO_IPV4
  95. REQUIRE_OBJECT ( ipv4 );
  96. #endif
  97. #ifdef NET_PROTO_IPV6
  98. REQUIRE_OBJECT ( ipv6 );
  99. #endif
  100. /*
  101. * Drag in all requested PXE support
  102. *
  103. */
  104. #ifdef PXE_MENU
  105. REQUIRE_OBJECT ( pxemenu );
  106. #endif
  107. #ifdef PXE_STACK
  108. REQUIRE_OBJECT ( pxe_call );
  109. #endif
  110. /*
  111. * Drag in all requested download protocols
  112. *
  113. */
  114. #ifdef DOWNLOAD_PROTO_TFTP
  115. REQUIRE_OBJECT ( tftp );
  116. #endif
  117. #ifdef DOWNLOAD_PROTO_HTTP
  118. REQUIRE_OBJECT ( http );
  119. #endif
  120. #ifdef DOWNLOAD_PROTO_HTTPS
  121. REQUIRE_OBJECT ( https );
  122. #endif
  123. #ifdef DOWNLOAD_PROTO_FTP
  124. REQUIRE_OBJECT ( ftp );
  125. #endif
  126. #ifdef DOWNLOAD_PROTO_NFS
  127. REQUIRE_OBJECT ( nfs_open );
  128. #endif
  129. #ifdef DOWNLOAD_PROTO_SLAM
  130. REQUIRE_OBJECT ( slam );
  131. #endif
  132. /*
  133. * Drag in all requested SAN boot protocols
  134. *
  135. */
  136. #ifdef SANBOOT_PROTO_ISCSI
  137. REQUIRE_OBJECT ( iscsi );
  138. #endif
  139. /*
  140. * Drag in all requested resolvers
  141. *
  142. */
  143. #ifdef DNS_RESOLVER
  144. REQUIRE_OBJECT ( dns );
  145. #endif
  146. /*
  147. * Drag in all requested image formats
  148. *
  149. */
  150. #ifdef IMAGE_NBI
  151. REQUIRE_OBJECT ( nbi );
  152. #endif
  153. #ifdef IMAGE_ELF
  154. REQUIRE_OBJECT ( elfboot );
  155. #endif
  156. #ifdef IMAGE_MULTIBOOT
  157. REQUIRE_OBJECT ( multiboot );
  158. #endif
  159. #ifdef IMAGE_PXE
  160. REQUIRE_OBJECT ( pxe_image );
  161. #endif
  162. #ifdef IMAGE_SCRIPT
  163. REQUIRE_OBJECT ( script );
  164. #endif
  165. #ifdef IMAGE_BZIMAGE
  166. REQUIRE_OBJECT ( bzimage );
  167. #endif
  168. #ifdef IMAGE_ELTORITO
  169. REQUIRE_OBJECT ( eltorito );
  170. #endif
  171. #ifdef IMAGE_COMBOOT
  172. REQUIRE_OBJECT ( comboot );
  173. REQUIRE_OBJECT ( com32 );
  174. REQUIRE_OBJECT ( comboot_call );
  175. REQUIRE_OBJECT ( com32_call );
  176. REQUIRE_OBJECT ( com32_wrapper );
  177. REQUIRE_OBJECT ( comboot_resolv );
  178. #endif
  179. #ifdef IMAGE_EFI
  180. REQUIRE_OBJECT ( efi_image );
  181. #endif
  182. #ifdef IMAGE_SDI
  183. REQUIRE_OBJECT ( sdi );
  184. #endif
  185. #ifdef IMAGE_PNM
  186. REQUIRE_OBJECT ( pnm );
  187. #endif
  188. #ifdef IMAGE_PNG
  189. REQUIRE_OBJECT ( png );
  190. #endif
  191. /*
  192. * Drag in all requested commands
  193. *
  194. */
  195. #ifdef AUTOBOOT_CMD
  196. REQUIRE_OBJECT ( autoboot_cmd );
  197. #endif
  198. #ifdef NVO_CMD
  199. REQUIRE_OBJECT ( nvo_cmd );
  200. #endif
  201. #ifdef CONFIG_CMD
  202. REQUIRE_OBJECT ( config_cmd );
  203. #endif
  204. #ifdef IFMGMT_CMD
  205. REQUIRE_OBJECT ( ifmgmt_cmd );
  206. #endif
  207. /* IWMGMT_CMD is brought in by net80211.c if requested */
  208. #ifdef ROUTE_CMD
  209. REQUIRE_OBJECT ( route_cmd );
  210. #endif
  211. #ifdef IMAGE_CMD
  212. REQUIRE_OBJECT ( image_cmd );
  213. #endif
  214. #ifdef IMAGE_TRUST_CMD
  215. REQUIRE_OBJECT ( image_trust_cmd );
  216. #endif
  217. #ifdef DHCP_CMD
  218. REQUIRE_OBJECT ( dhcp_cmd );
  219. #endif
  220. #ifdef SANBOOT_CMD
  221. REQUIRE_OBJECT ( sanboot_cmd );
  222. #endif
  223. #ifdef MENU_CMD
  224. REQUIRE_OBJECT ( menu_cmd );
  225. #endif
  226. #ifdef LOGIN_CMD
  227. REQUIRE_OBJECT ( login_cmd );
  228. #endif
  229. #ifdef TIME_CMD
  230. REQUIRE_OBJECT ( time_cmd );
  231. #endif
  232. #ifdef DIGEST_CMD
  233. REQUIRE_OBJECT ( digest_cmd );
  234. #endif
  235. #ifdef PXE_CMD
  236. REQUIRE_OBJECT ( pxe_cmd );
  237. #endif
  238. #ifdef LOTEST_CMD
  239. REQUIRE_OBJECT ( lotest_cmd );
  240. #endif
  241. #ifdef VLAN_CMD
  242. REQUIRE_OBJECT ( vlan_cmd );
  243. #endif
  244. #ifdef POWEROFF_CMD
  245. REQUIRE_OBJECT ( poweroff_cmd );
  246. #endif
  247. #ifdef REBOOT_CMD
  248. REQUIRE_OBJECT ( reboot_cmd );
  249. #endif
  250. #ifdef CPUID_CMD
  251. REQUIRE_OBJECT ( cpuid_cmd );
  252. #endif
  253. #ifdef SYNC_CMD
  254. REQUIRE_OBJECT ( sync_cmd );
  255. #endif
  256. #ifdef NSLOOKUP_CMD
  257. REQUIRE_OBJECT ( nslookup_cmd );
  258. #endif
  259. #ifdef PCI_CMD
  260. REQUIRE_OBJECT ( pci_cmd );
  261. #endif
  262. #ifdef PARAM_CMD
  263. REQUIRE_OBJECT ( param_cmd );
  264. #endif
  265. #ifdef NEIGHBOUR_CMD
  266. REQUIRE_OBJECT ( neighbour_cmd );
  267. #endif
  268. #ifdef PING_CMD
  269. REQUIRE_OBJECT ( ping_cmd );
  270. #endif
  271. #ifdef CONSOLE_CMD
  272. REQUIRE_OBJECT ( console_cmd );
  273. #endif
  274. #ifdef IPSTAT_CMD
  275. REQUIRE_OBJECT ( ipstat_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. /*
  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 );