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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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 gPXE 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 gPXE 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. /*
  77. * Drag in all requested network protocols
  78. *
  79. */
  80. #ifdef NET_PROTO_IPV4
  81. REQUIRE_OBJECT ( ipv4 );
  82. #endif
  83. /*
  84. * Drag in all requested PXE support
  85. *
  86. */
  87. #ifdef PXE_MENU
  88. REQUIRE_OBJECT ( pxemenu );
  89. #endif
  90. #ifdef PXE_STACK
  91. REQUIRE_OBJECT ( pxe_call );
  92. #endif
  93. /*
  94. * Drag in all requested download protocols
  95. *
  96. */
  97. #ifdef DOWNLOAD_PROTO_TFTP
  98. REQUIRE_OBJECT ( tftp );
  99. #endif
  100. #ifdef DOWNLOAD_PROTO_HTTP
  101. REQUIRE_OBJECT ( http );
  102. #endif
  103. #ifdef DOWNLOAD_PROTO_HTTPS
  104. REQUIRE_OBJECT ( https );
  105. #endif
  106. #ifdef DOWNLOAD_PROTO_FTP
  107. REQUIRE_OBJECT ( ftp );
  108. #endif
  109. #ifdef DOWNLOAD_PROTO_TFTM
  110. REQUIRE_OBJECT ( tftm );
  111. #endif
  112. #ifdef DOWNLOAD_PROTO_SLAM
  113. REQUIRE_OBJECT ( slam );
  114. #endif
  115. /*
  116. * Drag in all requested SAN boot protocols
  117. *
  118. */
  119. #ifdef SANBOOT_PROTO_ISCSI
  120. REQUIRE_OBJECT ( iscsiboot );
  121. #endif
  122. #ifdef SANBOOT_PROTO_AOE
  123. REQUIRE_OBJECT ( aoeboot );
  124. #endif
  125. #ifdef SANBOOT_PROTO_IB_SRP
  126. REQUIRE_OBJECT ( ib_srpboot );
  127. #endif
  128. /*
  129. * Drag in all requested resolvers
  130. *
  131. */
  132. #ifdef DNS_RESOLVER
  133. REQUIRE_OBJECT ( dns );
  134. #endif
  135. /*
  136. * Drag in all requested image formats
  137. *
  138. */
  139. #ifdef IMAGE_NBI
  140. REQUIRE_OBJECT ( nbi );
  141. #endif
  142. #ifdef IMAGE_ELF
  143. REQUIRE_OBJECT ( elfboot );
  144. #endif
  145. #ifdef IMAGE_FREEBSD
  146. REQUIRE_OBJECT ( freebsd );
  147. #endif
  148. #ifdef IMAGE_MULTIBOOT
  149. REQUIRE_OBJECT ( multiboot );
  150. #endif
  151. #ifdef IMAGE_AOUT
  152. REQUIRE_OBJECT ( aout );
  153. #endif
  154. #ifdef IMAGE_WINCE
  155. REQUIRE_OBJECT ( wince );
  156. #endif
  157. #ifdef IMAGE_PXE
  158. REQUIRE_OBJECT ( pxe_image );
  159. #endif
  160. #ifdef IMAGE_SCRIPT
  161. REQUIRE_OBJECT ( script );
  162. #endif
  163. #ifdef IMAGE_BZIMAGE
  164. REQUIRE_OBJECT ( bzimage );
  165. #endif
  166. #ifdef IMAGE_ELTORITO
  167. REQUIRE_OBJECT ( eltorito );
  168. #endif
  169. #ifdef IMAGE_COMBOOT
  170. REQUIRE_OBJECT ( comboot );
  171. REQUIRE_OBJECT ( com32 );
  172. REQUIRE_OBJECT ( comboot_call );
  173. REQUIRE_OBJECT ( com32_call );
  174. REQUIRE_OBJECT ( com32_wrapper );
  175. REQUIRE_OBJECT ( comboot_resolv );
  176. #endif
  177. #ifdef IMAGE_EFI
  178. REQUIRE_OBJECT ( efi_image );
  179. #endif
  180. /*
  181. * Drag in all requested commands
  182. *
  183. */
  184. #ifdef AUTOBOOT_CMD
  185. REQUIRE_OBJECT ( autoboot_cmd );
  186. #endif
  187. #ifdef NVO_CMD
  188. REQUIRE_OBJECT ( nvo_cmd );
  189. #endif
  190. #ifdef CONFIG_CMD
  191. REQUIRE_OBJECT ( config_cmd );
  192. #endif
  193. #ifdef IFMGMT_CMD
  194. REQUIRE_OBJECT ( ifmgmt_cmd );
  195. #endif
  196. /* IWMGMT_CMD is brought in by net80211.c if requested */
  197. #ifdef ROUTE_CMD
  198. REQUIRE_OBJECT ( route_cmd );
  199. #endif
  200. #ifdef IMAGE_CMD
  201. REQUIRE_OBJECT ( image_cmd );
  202. #endif
  203. #ifdef DHCP_CMD
  204. REQUIRE_OBJECT ( dhcp_cmd );
  205. #endif
  206. #ifdef SANBOOT_CMD
  207. REQUIRE_OBJECT ( sanboot_cmd );
  208. #endif
  209. #ifdef LOGIN_CMD
  210. REQUIRE_OBJECT ( login_cmd );
  211. #endif
  212. #ifdef TIME_CMD
  213. REQUIRE_OBJECT ( time_cmd );
  214. #endif
  215. #ifdef DIGEST_CMD
  216. REQUIRE_OBJECT ( digest_cmd );
  217. #endif
  218. #ifdef PXE_CMD
  219. REQUIRE_OBJECT ( pxe_cmd );
  220. #endif
  221. /*
  222. * Drag in miscellaneous objects
  223. *
  224. */
  225. #ifdef NULL_TRAP
  226. REQUIRE_OBJECT ( nulltrap );
  227. #endif
  228. #ifdef GDBSERIAL
  229. REQUIRE_OBJECT ( gdbidt );
  230. REQUIRE_OBJECT ( gdbserial );
  231. REQUIRE_OBJECT ( gdbstub_cmd );
  232. #endif
  233. #ifdef GDBUDP
  234. REQUIRE_OBJECT ( gdbidt );
  235. REQUIRE_OBJECT ( gdbudp );
  236. REQUIRE_OBJECT ( gdbstub_cmd );
  237. #endif
  238. /*
  239. * Drag in objects that are always required, but not dragged in via
  240. * symbol dependencies.
  241. *
  242. */
  243. REQUIRE_OBJECT ( device );
  244. REQUIRE_OBJECT ( embedded );