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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  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. #include "etherboot.h"
  8. #include "dev.h"
  9. #include "console.h"
  10. #include "image.h"
  11. #include "config/general.h"
  12. /*
  13. * Build ID string calculations
  14. *
  15. */
  16. #undef XSTR
  17. #undef STR
  18. #define XSTR(s) STR(s)
  19. #define STR(s) #s
  20. #ifdef BUILD_SERIAL
  21. #include "config/.buildserial.h"
  22. #define BUILD_SERIAL_STR " #" XSTR(BUILD_SERIAL_NUM)
  23. #else
  24. #define BUILD_SERIAL_STR ""
  25. #endif
  26. #ifdef BUILD_ID
  27. #define BUILD_ID_STR " " BUILD_ID
  28. #else
  29. #define BUILD_ID_STR ""
  30. #endif
  31. #if defined(BUILD_ID) || defined(BUILD_SERIAL)
  32. #define BUILD_STRING " [build" BUILD_ID_STR BUILD_SERIAL_STR "]"
  33. #else
  34. #define BUILD_STRING ""
  35. #endif
  36. /*
  37. * Print out configuration
  38. *
  39. */
  40. void print_config ( void ) {
  41. printf( "Etherboot " VERSION BUILD_STRING
  42. " (GPL) http://etherboot.org\n"
  43. "Drivers: " );
  44. print_drivers();
  45. printf( " Images: " );
  46. print_images();
  47. #ifdef PXE_EXPORT /* All possible exports */
  48. printf ( " Exports: PXE " );
  49. #endif /* All possible exports */
  50. #if (BOOTP_SERVER != 67) || (BOOTP_CLIENT != 68)
  51. printf( "[DHCP ports %d and %d] ",
  52. BOOTP_SERVER, BOOTP_CLIENT);
  53. #endif
  54. putchar('\n');
  55. printf( "Protocols: "
  56. #ifdef RARP_NOT_BOOTP
  57. "RARP "
  58. #else
  59. # ifndef NO_DHCP_SUPPORT
  60. "DHCP "
  61. # else
  62. "BOOTP "
  63. # endif
  64. #endif
  65. #ifdef DOWNLOAD_PROTO_TFTP
  66. "TFTP "
  67. #endif
  68. #ifdef DOWNLOAD_PROTO_FSP
  69. "FSP "
  70. #endif
  71. #ifdef DOWNLOAD_PROTO_NFS
  72. "NFS "
  73. #endif
  74. #ifdef DOWNLOAD_PROTO_SLAM
  75. "SLAM "
  76. #endif
  77. #ifdef DOWNLOAD_PROTO_TFTM
  78. "TFTM "
  79. #endif
  80. #ifdef DOWNLOAD_PROTO_HTTP
  81. "HTTP "
  82. #endif
  83. #ifdef PROTO_LACP
  84. "LACP "
  85. #endif
  86. #ifdef DNS_RESOLVER
  87. "DNS "
  88. #endif
  89. "\n");
  90. #ifdef KEEP_IT_REAL
  91. printf( "Keeping It Real [EXPERIMENTAL]\n" );
  92. #endif
  93. }
  94. /*
  95. * Drag in all requested console types
  96. *
  97. * CONSOLE_DUAL sets both CONSOLE_FIRMWARE and CONSOLE_SERIAL for
  98. * legacy compatibility.
  99. *
  100. */
  101. #ifdef CONSOLE_DUAL
  102. #undef CONSOLE_FIRMWARE
  103. #define CONSOLE_FIRMWARE 1
  104. #undef CONSOLE_SERIAL
  105. #define CONSOLE_SERIAL 1
  106. #endif
  107. #ifdef CONSOLE_FIRMWARE
  108. REQUIRE_OBJECT ( bios_console );
  109. #endif
  110. #ifdef CONSOLE_SERIAL
  111. REQUIRE_OBJECT ( serial );
  112. #endif
  113. #ifdef CONSOLE_DIRECT_VGA
  114. REQUIRE_OBJECT ( video_subr );
  115. #endif
  116. #ifdef CONSOLE_BTEXT
  117. REQUIRE_OBJECT ( btext );
  118. #endif
  119. #ifdef CONSOLE_PC_KBD
  120. REQUIRE_OBJECT ( pc_kbd );
  121. #endif
  122. /*
  123. * Drag in all requested protocols
  124. *
  125. */
  126. #ifdef DOWNLOAD_PROTO_TFTP
  127. REQUIRE_OBJECT ( tftp );
  128. #endif
  129. #ifdef DOWNLOAD_PROTO_NFS
  130. REQUIRE_OBJECT ( nfs );
  131. #endif
  132. #ifdef DOWNLOAD_PROTO_HTTP
  133. REQUIRE_OBJECT ( http );
  134. #endif
  135. #ifdef DOWNLOAD_PROTO_TFTM
  136. REQUIRE_OBJECT ( tftm );
  137. #endif
  138. #ifdef DOWNLOAD_PROTO_SLAM
  139. REQUIRE_OBJECT ( slam );
  140. #endif
  141. /*
  142. * Drag in any required resolvers
  143. *
  144. */
  145. #ifdef DNS_RESOLVER
  146. REQUIRE_OBJECT ( dns );
  147. #endif
  148. #ifdef NMB_RESOLVER
  149. REQUIRE_OBJECT ( nmb );
  150. #endif
  151. /*
  152. * Drag in all requested image formats
  153. *
  154. */
  155. #ifdef TAGGED_IMAGE
  156. REQUIRE_OBJECT ( nbi );
  157. #endif
  158. #ifdef ELF64_IMAGE
  159. REQUIRE_OBJECT ( elf64 );
  160. #endif
  161. #ifdef ELF_IMAGE
  162. REQUIRE_OBJECT ( elf );
  163. #endif
  164. #ifdef COFF_IMAGE
  165. REQUIRE_OBJECT ( coff );
  166. #endif
  167. #ifdef IMAGE_FREEBSD
  168. REQUIRE_OBJECT ( freebsd );
  169. #endif
  170. #ifdef IMAGE_MULTIBOOT
  171. REQUIRE_OBJECT ( multiboot );
  172. #endif
  173. #ifdef AOUT_IMAGE
  174. REQUIRE_OBJECT ( aout );
  175. #endif
  176. #ifdef WINCE_IMAGE
  177. REQUIRE_OBJECT ( wince );
  178. #endif
  179. #ifdef PXE_IMAGE
  180. REQUIRE_OBJECT ( pxe );
  181. #endif
  182. /*
  183. * Drag in miscellaneous objects
  184. *
  185. */
  186. #ifdef NULL_TRAP
  187. REQUIRE_OBJECT ( nulltrap );
  188. #endif