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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. * Drag in all requested console types
  38. *
  39. * CONSOLE_DUAL sets both CONSOLE_FIRMWARE and CONSOLE_SERIAL for
  40. * legacy compatibility.
  41. *
  42. */
  43. #ifdef CONSOLE_DUAL
  44. #undef CONSOLE_FIRMWARE
  45. #define CONSOLE_FIRMWARE 1
  46. #undef CONSOLE_SERIAL
  47. #define CONSOLE_SERIAL 1
  48. #endif
  49. #ifdef CONSOLE_FIRMWARE
  50. REQUIRE_OBJECT ( bios_console );
  51. #endif
  52. #ifdef CONSOLE_SERIAL
  53. REQUIRE_OBJECT ( serial );
  54. #endif
  55. #ifdef CONSOLE_DIRECT_VGA
  56. REQUIRE_OBJECT ( video_subr );
  57. #endif
  58. #ifdef CONSOLE_BTEXT
  59. REQUIRE_OBJECT ( btext );
  60. #endif
  61. #ifdef CONSOLE_PC_KBD
  62. REQUIRE_OBJECT ( pc_kbd );
  63. #endif
  64. /*
  65. * Drag in all requested protocols
  66. *
  67. */
  68. #ifdef DOWNLOAD_PROTO_TFTP
  69. REQUIRE_OBJECT ( tftp );
  70. #endif
  71. #ifdef DOWNLOAD_PROTO_NFS
  72. REQUIRE_OBJECT ( nfs );
  73. #endif
  74. #ifdef DOWNLOAD_PROTO_HTTP
  75. REQUIRE_OBJECT ( http );
  76. #endif
  77. #ifdef DOWNLOAD_PROTO_TFTM
  78. REQUIRE_OBJECT ( tftm );
  79. #endif
  80. #ifdef DOWNLOAD_PROTO_SLAM
  81. REQUIRE_OBJECT ( slam );
  82. #endif
  83. /*
  84. * Drag in any required resolvers
  85. *
  86. */
  87. #ifdef DNS_RESOLVER
  88. REQUIRE_OBJECT ( dns );
  89. #endif
  90. #ifdef NMB_RESOLVER
  91. REQUIRE_OBJECT ( nmb );
  92. #endif
  93. /*
  94. * Drag in all requested image formats
  95. *
  96. */
  97. #ifdef TAGGED_IMAGE
  98. REQUIRE_OBJECT ( nbi );
  99. #endif
  100. #ifdef ELF64_IMAGE
  101. REQUIRE_OBJECT ( elf64 );
  102. #endif
  103. #ifdef ELF_IMAGE
  104. REQUIRE_OBJECT ( elf );
  105. #endif
  106. #ifdef COFF_IMAGE
  107. REQUIRE_OBJECT ( coff );
  108. #endif
  109. #ifdef IMAGE_FREEBSD
  110. REQUIRE_OBJECT ( freebsd );
  111. #endif
  112. #ifdef IMAGE_MULTIBOOT
  113. REQUIRE_OBJECT ( multiboot );
  114. #endif
  115. #ifdef AOUT_IMAGE
  116. REQUIRE_OBJECT ( aout );
  117. #endif
  118. #ifdef WINCE_IMAGE
  119. REQUIRE_OBJECT ( wince );
  120. #endif
  121. #ifdef PXE_IMAGE
  122. REQUIRE_OBJECT ( pxe );
  123. #endif
  124. /*
  125. * Drag in all requested commands
  126. *
  127. */
  128. #ifdef BOOT_CMD
  129. REQUIRE_OBJECT ( boot_cmd );
  130. #endif
  131. #ifdef NVO_CMD
  132. REQUIRE_OBJECT ( nvo_cmd );
  133. #endif
  134. #ifdef CONFIG_CMD
  135. REQUIRE_OBJECT ( config_cmd );
  136. #endif
  137. /*
  138. * Drag in miscellaneous objects
  139. *
  140. */
  141. #ifdef NULL_TRAP
  142. REQUIRE_OBJECT ( nulltrap );
  143. #endif