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

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