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.0KB

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