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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  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 download protocols
  85. *
  86. */
  87. #ifdef DOWNLOAD_PROTO_TFTP
  88. REQUIRE_OBJECT ( tftp );
  89. #endif
  90. #ifdef DOWNLOAD_PROTO_NFS
  91. REQUIRE_OBJECT ( nfs );
  92. #endif
  93. #ifdef DOWNLOAD_PROTO_HTTP
  94. REQUIRE_OBJECT ( http );
  95. #endif
  96. #ifdef DOWNLOAD_PROTO_HTTPS
  97. REQUIRE_OBJECT ( https );
  98. #endif
  99. #ifdef DOWNLOAD_PROTO_FTP
  100. REQUIRE_OBJECT ( ftp );
  101. #endif
  102. #ifdef DOWNLOAD_PROTO_TFTM
  103. REQUIRE_OBJECT ( tftm );
  104. #endif
  105. #ifdef DOWNLOAD_PROTO_SLAM
  106. REQUIRE_OBJECT ( slam );
  107. #endif
  108. /*
  109. * Drag in all requested SAN boot protocols
  110. *
  111. */
  112. #ifdef SANBOOT_PROTO_ISCSI
  113. REQUIRE_OBJECT ( iscsiboot );
  114. #endif
  115. #ifdef SANBOOT_PROTO_AOE
  116. REQUIRE_OBJECT ( aoeboot );
  117. #endif
  118. #ifdef SANBOOT_PROTO_IB_SRP
  119. REQUIRE_OBJECT ( ib_srpboot );
  120. #endif
  121. /*
  122. * Drag in all requested resolvers
  123. *
  124. */
  125. #ifdef DNS_RESOLVER
  126. REQUIRE_OBJECT ( dns );
  127. #endif
  128. #ifdef NMB_RESOLVER
  129. REQUIRE_OBJECT ( nmb );
  130. #endif
  131. /*
  132. * Drag in all requested image formats
  133. *
  134. */
  135. #ifdef IMAGE_NBI
  136. REQUIRE_OBJECT ( nbi );
  137. #endif
  138. #ifdef IMAGE_ELF
  139. REQUIRE_OBJECT ( elfboot );
  140. #endif
  141. #ifdef IMAGE_FREEBSD
  142. REQUIRE_OBJECT ( freebsd );
  143. #endif
  144. #ifdef IMAGE_MULTIBOOT
  145. REQUIRE_OBJECT ( multiboot );
  146. #endif
  147. #ifdef IMAGE_AOUT
  148. REQUIRE_OBJECT ( aout );
  149. #endif
  150. #ifdef IMAGE_WINCE
  151. REQUIRE_OBJECT ( wince );
  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. /*
  177. * Drag in all requested commands
  178. *
  179. */
  180. #ifdef AUTOBOOT_CMD
  181. REQUIRE_OBJECT ( autoboot_cmd );
  182. #endif
  183. #ifdef NVO_CMD
  184. REQUIRE_OBJECT ( nvo_cmd );
  185. #endif
  186. #ifdef CONFIG_CMD
  187. REQUIRE_OBJECT ( config_cmd );
  188. #endif
  189. #ifdef IFMGMT_CMD
  190. REQUIRE_OBJECT ( ifmgmt_cmd );
  191. #endif
  192. #ifdef ROUTE_CMD
  193. REQUIRE_OBJECT ( route_cmd );
  194. #endif
  195. #ifdef IMAGE_CMD
  196. REQUIRE_OBJECT ( image_cmd );
  197. #endif
  198. #ifdef DHCP_CMD
  199. REQUIRE_OBJECT ( dhcp_cmd );
  200. #endif
  201. #ifdef SANBOOT_CMD
  202. REQUIRE_OBJECT ( sanboot_cmd );
  203. #endif
  204. #ifdef LOGIN_CMD
  205. REQUIRE_OBJECT ( login_cmd );
  206. #endif
  207. #ifdef TIME_CMD
  208. REQUIRE_OBJECT ( time_cmd );
  209. #endif
  210. #ifdef DIGEST_CMD
  211. REQUIRE_OBJECT ( digest_cmd );
  212. #endif
  213. #ifdef PXE_CMD
  214. REQUIRE_OBJECT ( pxe_cmd );
  215. #endif
  216. /*
  217. * Drag in miscellaneous objects
  218. *
  219. */
  220. #ifdef NULL_TRAP
  221. REQUIRE_OBJECT ( nulltrap );
  222. #endif
  223. #ifdef GDBSERIAL
  224. REQUIRE_OBJECT ( gdbidt );
  225. REQUIRE_OBJECT ( gdbserial );
  226. REQUIRE_OBJECT ( gdbstub_cmd );
  227. #endif
  228. #ifdef GDBUDP
  229. REQUIRE_OBJECT ( gdbidt );
  230. REQUIRE_OBJECT ( gdbudp );
  231. REQUIRE_OBJECT ( gdbstub_cmd );
  232. #endif
  233. /*
  234. * Drag in objects that are always required, but not dragged in via
  235. * symbol dependencies.
  236. *
  237. */
  238. REQUIRE_OBJECT ( device );
  239. REQUIRE_OBJECT ( embedded );