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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  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 "config/general.h"
  11. /*
  12. * Build ID string calculations
  13. *
  14. */
  15. #undef XSTR
  16. #undef STR
  17. #define XSTR(s) STR(s)
  18. #define STR(s) #s
  19. #ifdef BUILD_SERIAL
  20. #include "config/.buildserial.h"
  21. #define BUILD_SERIAL_STR "#" XSTR(BUILD_SERIAL_NUM)
  22. #else
  23. #define BUILD_SERIAL_STR ""
  24. #endif
  25. #ifdef BUILD_ID
  26. #define BUILD_ID_STR BUILD_ID
  27. #else
  28. #define BUILD_ID_STR ""
  29. #endif
  30. #if defined(BUILD_ID) && defined(BUILD_SERIAL)
  31. #define BUILD_SPACER " "
  32. #else
  33. #define BUILD_SPACER ""
  34. #endif
  35. #if defined(BUILD_ID) || defined(BUILD_SERIAL)
  36. #define BUILD_STRING " [build " BUILD_ID_STR BUILD_SPACER BUILD_SERIAL_STR "]"
  37. #else
  38. #define BUILD_STRING ""
  39. #endif
  40. /*
  41. * Print out configuration
  42. *
  43. */
  44. void print_config ( void ) {
  45. printf( "Etherboot " VERSION BUILD_STRING
  46. " (GPL) http://etherboot.org\n"
  47. "Drivers: " );
  48. print_drivers();
  49. printf( " Images: "
  50. #ifdef TAGGED_IMAGE
  51. "NBI "
  52. #endif
  53. #ifdef ELF64_IMAGE
  54. "ELF64 "
  55. #endif
  56. #ifdef ELF_IMAGE
  57. "ELF "
  58. #endif
  59. #ifdef COFF_IMAGE
  60. "COFF "
  61. #endif
  62. #ifdef IMAGE_FREEBSD
  63. "FreeBSD "
  64. #endif
  65. #ifdef IMAGE_MULTIBOOT
  66. "Multiboot "
  67. #endif
  68. #ifdef AOUT_IMAGE
  69. "a.out "
  70. #endif
  71. #ifdef WINCE_IMAGE
  72. "WINCE "
  73. #endif
  74. #ifdef PXE_IMAGE
  75. "PXE "
  76. #endif
  77. #ifdef PXE_EXPORT /* All possible exports */
  78. " Exports: "
  79. #ifdef PXE_EXPORT
  80. "PXE "
  81. #endif
  82. #endif /* All possible exports */
  83. " "
  84. );
  85. #if (BOOTP_SERVER != 67) || (BOOTP_CLIENT != 68)
  86. printf( "[DHCP ports %d and %d] ",
  87. BOOTP_SERVER, BOOTP_CLIENT);
  88. #endif
  89. putchar('\n');
  90. printf( "Protocols: "
  91. #ifdef RARP_NOT_BOOTP
  92. "RARP "
  93. #else
  94. # ifndef NO_DHCP_SUPPORT
  95. "DHCP "
  96. # else
  97. "BOOTP "
  98. # endif
  99. #endif
  100. #ifdef DOWNLOAD_PROTO_TFTP
  101. "TFTP "
  102. #endif
  103. #ifdef DOWNLOAD_PROTO_NFS
  104. "NFS "
  105. #endif
  106. #ifdef DOWNLOAD_PROTO_SLAM
  107. "SLAM "
  108. #endif
  109. #ifdef DOWNLOAD_PROTO_TFTM
  110. "TFTM "
  111. #endif
  112. #ifdef DOWNLOAD_PROTO_HTTP
  113. "HTTP "
  114. #endif
  115. #ifdef PROTO_LACP
  116. "LACP "
  117. #endif
  118. #ifdef DNS_RESOLVER
  119. "DNS "
  120. #endif
  121. "\n");
  122. #ifdef KEEP_IT_REAL
  123. printf( "Keeping It Real [EXPERIMENTAL]\n" );
  124. #endif
  125. }
  126. /*
  127. * Drag in all requested console types
  128. *
  129. * CONSOLE_DUAL sets both CONSOLE_FIRMWARE and CONSOLE_SERIAL for
  130. * legacy compatibility.
  131. *
  132. */
  133. #ifdef CONSOLE_DUAL
  134. #undef CONSOLE_FIRMWARE
  135. #define CONSOLE_FIRMWARE 1
  136. #undef CONSOLE_SERIAL
  137. #define CONSOLE_SERIAL 1
  138. #endif
  139. #ifdef CONSOLE_FIRMWARE
  140. REQUIRE_OBJECT ( bios_console );
  141. #endif
  142. #ifdef CONSOLE_SERIAL
  143. REQUIRE_OBJECT ( serial );
  144. #endif
  145. #ifdef CONSOLE_DIRECT_VGA
  146. REQUIRE_OBJECT ( video_subr );
  147. #endif
  148. #ifdef CONSOLE_BTEXT
  149. REQUIRE_OBJECT ( btext );
  150. #endif
  151. #ifdef CONSOLE_PC_KBD
  152. REQUIRE_OBJECT ( pc_kbd );
  153. #endif
  154. /*
  155. * Drag in relocate.o if required
  156. *
  157. */
  158. #ifdef RELOCATE
  159. REQUIRE_OBJECT ( relocate );
  160. #endif