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