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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  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. /*
  126. * Drag in all requested resolvers
  127. *
  128. */
  129. #ifdef DNS_RESOLVER
  130. REQUIRE_OBJECT ( dns );
  131. #endif
  132. /*
  133. * Drag in all requested image formats
  134. *
  135. */
  136. #ifdef IMAGE_NBI
  137. REQUIRE_OBJECT ( nbi );
  138. #endif
  139. #ifdef IMAGE_ELF
  140. REQUIRE_OBJECT ( elfboot );
  141. #endif
  142. #ifdef IMAGE_FREEBSD
  143. REQUIRE_OBJECT ( freebsd );
  144. #endif
  145. #ifdef IMAGE_MULTIBOOT
  146. REQUIRE_OBJECT ( multiboot );
  147. #endif
  148. #ifdef IMAGE_AOUT
  149. REQUIRE_OBJECT ( aout );
  150. #endif
  151. #ifdef IMAGE_WINCE
  152. REQUIRE_OBJECT ( wince );
  153. #endif
  154. #ifdef IMAGE_PXE
  155. REQUIRE_OBJECT ( pxe_image );
  156. #endif
  157. #ifdef IMAGE_SCRIPT
  158. REQUIRE_OBJECT ( script );
  159. #endif
  160. #ifdef IMAGE_BZIMAGE
  161. REQUIRE_OBJECT ( bzimage );
  162. #endif
  163. #ifdef IMAGE_ELTORITO
  164. REQUIRE_OBJECT ( eltorito );
  165. #endif
  166. #ifdef IMAGE_COMBOOT
  167. REQUIRE_OBJECT ( comboot );
  168. REQUIRE_OBJECT ( com32 );
  169. REQUIRE_OBJECT ( comboot_call );
  170. REQUIRE_OBJECT ( com32_call );
  171. REQUIRE_OBJECT ( com32_wrapper );
  172. REQUIRE_OBJECT ( comboot_resolv );
  173. #endif
  174. #ifdef IMAGE_EFI
  175. REQUIRE_OBJECT ( efi_image );
  176. #endif
  177. /*
  178. * Drag in all requested commands
  179. *
  180. */
  181. #ifdef AUTOBOOT_CMD
  182. REQUIRE_OBJECT ( autoboot_cmd );
  183. #endif
  184. #ifdef NVO_CMD
  185. REQUIRE_OBJECT ( nvo_cmd );
  186. #endif
  187. #ifdef CONFIG_CMD
  188. REQUIRE_OBJECT ( config_cmd );
  189. #endif
  190. #ifdef IFMGMT_CMD
  191. REQUIRE_OBJECT ( ifmgmt_cmd );
  192. #endif
  193. /* IWMGMT_CMD is brought in by net80211.c if requested */
  194. #ifdef ROUTE_CMD
  195. REQUIRE_OBJECT ( route_cmd );
  196. #endif
  197. #ifdef IMAGE_CMD
  198. REQUIRE_OBJECT ( image_cmd );
  199. #endif
  200. #ifdef DHCP_CMD
  201. REQUIRE_OBJECT ( dhcp_cmd );
  202. #endif
  203. #ifdef SANBOOT_CMD
  204. REQUIRE_OBJECT ( sanboot_cmd );
  205. #endif
  206. #ifdef LOGIN_CMD
  207. REQUIRE_OBJECT ( login_cmd );
  208. #endif
  209. #ifdef TIME_CMD
  210. REQUIRE_OBJECT ( time_cmd );
  211. #endif
  212. #ifdef DIGEST_CMD
  213. REQUIRE_OBJECT ( digest_cmd );
  214. #endif
  215. #ifdef PXE_CMD
  216. REQUIRE_OBJECT ( pxe_cmd );
  217. #endif
  218. /*
  219. * Drag in miscellaneous objects
  220. *
  221. */
  222. #ifdef NULL_TRAP
  223. REQUIRE_OBJECT ( nulltrap );
  224. #endif
  225. #ifdef GDBSERIAL
  226. REQUIRE_OBJECT ( gdbidt );
  227. REQUIRE_OBJECT ( gdbserial );
  228. REQUIRE_OBJECT ( gdbstub_cmd );
  229. #endif
  230. #ifdef GDBUDP
  231. REQUIRE_OBJECT ( gdbidt );
  232. REQUIRE_OBJECT ( gdbudp );
  233. REQUIRE_OBJECT ( gdbstub_cmd );
  234. #endif
  235. /*
  236. * Drag in objects that are always required, but not dragged in via
  237. * symbol dependencies.
  238. *
  239. */
  240. REQUIRE_OBJECT ( device );
  241. REQUIRE_OBJECT ( embedded );
  242. /* linux drivers aren't picked up by the parserom utility so drag them in here */
  243. #ifdef DRIVERS_LINUX
  244. REQUIRE_OBJECT ( tap );
  245. #endif