1 | |
---|
2 | 1. Autoconf support |
---|
3 | =================== |
---|
4 | |
---|
5 | This version of RTEMS is configured with GNU autoconf. RTEMS can be |
---|
6 | configured and built either standalone or together with the compiler |
---|
7 | tools in the Cygnus one-tree structure. Using autoconf also means |
---|
8 | that RTEMS now can be built in a separate build directory. |
---|
9 | |
---|
10 | 2. Installation |
---|
11 | =============== |
---|
12 | |
---|
13 | 2.1 Standalone build |
---|
14 | |
---|
15 | To configure RTEMS for a specific target, run configure in the build |
---|
16 | directory. In addition to the standard configure options, the following |
---|
17 | RTEMS-specific option are supported: |
---|
18 | |
---|
19 | --disable-rtems-inlines |
---|
20 | --disable-posix |
---|
21 | --disable-tests |
---|
22 | --disable-ka9q |
---|
23 | --enable-cpp |
---|
24 | --enable-gcc28 |
---|
25 | --enable-gmake-print-directory |
---|
26 | --enable-libcdir=<DIRECTORY> (do not use gcc 2.8 is enabled) |
---|
27 | --enable-rtemsbsp="bsp1 bsp2 ..." |
---|
28 | |
---|
29 | By default, the RTEMS posix interface is built for targets that support |
---|
30 | it. It can be disabled with the --disable-posix option. |
---|
31 | |
---|
32 | By default, the RTEMS port of the KA9Q TCP/IP stack is build for targets |
---|
33 | that support it. It can be disabled with the --disable-ka9q option. |
---|
34 | |
---|
35 | By default, the RTEMS support of C++ is disabled. It can be enabled |
---|
36 | with the --enable-cpp option. If the rtems++ C++ library is installed |
---|
37 | it will also be build. |
---|
38 | |
---|
39 | By default, the RTEMS test suites are configured. The --disable-tests |
---|
40 | will not configure the RTEMS test suite. This is used only to speed-up |
---|
41 | configuration in case building the tests are not necessary. |
---|
42 | |
---|
43 | By default, RTEMS is built using arguments and build rules which are |
---|
44 | compatible with gcc 2.7.2.2. This requires that the user specify |
---|
45 | the location of the Standard C Library with the --enable-libcdir |
---|
46 | option. If using a gcc which supports the -specs option, then |
---|
47 | the --enable-gcc28 option may be used to enable this feature. |
---|
48 | You should use the --enable-gcc28 option when using either the |
---|
49 | egcs source tree or testgcc snapshots. |
---|
50 | |
---|
51 | By default, all bsps for a target are built. There are two ways of |
---|
52 | changing this: |
---|
53 | |
---|
54 | + use the --enable-rtemsbsp otion which will set the specified |
---|
55 | bsps as the default bsps, or |
---|
56 | + set the RTEMSBSP variable during make (see below). |
---|
57 | |
---|
58 | The --enable-rtemsbsp= option configures RTEMS for a specific target |
---|
59 | architecture. The following targets are supported: |
---|
60 | |
---|
61 | (none) will build the host-based version on Linux, |
---|
62 | Solaris and HPUX. |
---|
63 | |
---|
64 | a29k-rtems only standalone, uses non-gnu compiler |
---|
65 | i386-rtems |
---|
66 | i386-go32-rtems see notes |
---|
67 | i960-rtems |
---|
68 | hppa1_1-rtems |
---|
69 | m68k-rtems |
---|
70 | mips64orion-rtems |
---|
71 | no_cpu-rtems |
---|
72 | powerpc-rtems |
---|
73 | sparc-rtems |
---|
74 | |
---|
75 | The cross-compiler is set to $(target)-gcc by default. This can be |
---|
76 | overriden by one of the following methods: |
---|
77 | |
---|
78 | + running make with CC_FOR_TARGET=compiler_to_use. The same applies to |
---|
79 | all the target specific tools (AS, AR, NM, OBJCOPY, SIZE, LD), or |
---|
80 | + by using the --program-prefix option to configure to specify the |
---|
81 | string which will prepended to the tool names. Be sure to include |
---|
82 | a trailing "-". For example, to use a m68k-coff toolset, use the |
---|
83 | --program-prefix=m68k-coff- option. |
---|
84 | |
---|
85 | To build, run make in the build directory. To specify which bsps to build, |
---|
86 | add the RTEMSBSP="bsp1 bsp2 .." to the make command. |
---|
87 | |
---|
88 | Installation is done under $(prefix)/$(target)/rtems. |
---|
89 | |
---|
90 | As an example, to build and install the mvme136 and dmv152 bsps for m68k do: |
---|
91 | |
---|
92 | (path_to_rtems_src)/configure --target=m68k-rtems |
---|
93 | |
---|
94 | make RTEMSBSP="mvme136 dmv152" |
---|
95 | |
---|
96 | make install RTEMSBSP="mvme136 dmv152" |
---|
97 | |
---|
98 | |
---|
99 | The sample tests are built by 'make all', do a 'make test' to build the full |
---|
100 | test suite. |
---|
101 | |
---|
102 | 2.2 Build with Cygnus one-tree release |
---|
103 | |
---|
104 | To build and install RTEMS with the one-tree structure, just copy the rtems |
---|
105 | directory to the tree. The one-tree configure.in and Makefile.in has to be |
---|
106 | replaced with the RTEMS-aware versions. The build options are the same as |
---|
107 | for the standalone build. |
---|
108 | |
---|
109 | 2.3 Target Dependent Notes |
---|
110 | |
---|
111 | i386-go32-rtems: |
---|
112 | |
---|
113 | 1. This is based on djgpp v1.xx. It needs to be updated to v2.xx. |
---|
114 | 2. This cannot be built one-tree style since RTEMS requires some |
---|
115 | files which must be obtained from the binary distribution of the |
---|
116 | djgpp library. DJGPP can be obtained from |
---|
117 | http://www.delorie.com/djgpp/dl/ofc. |
---|
118 | 3. You will need to manually install a number of files from the |
---|
119 | binary distribution of the DJGPP library doing something |
---|
120 | like the following: |
---|
121 | |
---|
122 | # unzip the djgpp distribution |
---|
123 | cd include |
---|
124 | cp dpmi.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include |
---|
125 | cp go32.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include |
---|
126 | cp dos.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include |
---|
127 | cp pc.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include |
---|
128 | |
---|
129 | cd ../lib |
---|
130 | cp crt* INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2 |
---|
131 | cp libpc* INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2 |
---|
132 | |
---|
133 | # Make sure about destination on the next lines. It keeps the newlib |
---|
134 | # libc.a and the binary djgpp libc.a from conflicting. |
---|
135 | cp libc.a INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/libcgo32.a |
---|
136 | cp libc_p.a INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/libcgo32_p.a |
---|
137 | |
---|
138 | |
---|
139 | 3. To use the installed RTEMS library |
---|
140 | ===================================== |
---|
141 | |
---|
142 | To use the installed RTEMS bsps to build applications, the application |
---|
143 | makefile has to include a bsp-specific makefile that will define the |
---|
144 | RTEMS variables necessary to find include files and libraries. The |
---|
145 | bsp-specific makefile is installed at |
---|
146 | |
---|
147 | $(RTEMS_MAKEFILE_PATH)/Makefile.inc |
---|
148 | |
---|
149 | For the erc32 bsp installed at /usr/local/cross, the environment |
---|
150 | variable RTEMS_MAKEFILE_PATH would be set as follows to the |
---|
151 | following: |
---|
152 | |
---|
153 | /usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc |
---|
154 | |
---|
155 | 4. Supported target bsps |
---|
156 | ======================== |
---|
157 | |
---|
158 | The following bsps are supported: |
---|
159 | |
---|
160 | host-based : posix (on linux, solaris and hpux) |
---|
161 | |
---|
162 | a29k : portsw |
---|
163 | i386 : force386 i386ex |
---|
164 | i386-go32 : go32 go32_p5 |
---|
165 | i960 : cvme961 |
---|
166 | hppa1_1 : simhppa |
---|
167 | m68k : dmv152 efi332 efi68k gen68302 gen68360 gen68360_040 idp |
---|
168 | mvme136 mvme147 mvme147s mvme162 ods68302 |
---|
169 | no_cpu : no_bsp |
---|
170 | mips64orion : p4600 p4650 (p4000 port with either R4600 or R4650) |
---|
171 | powerpc : papyrus |
---|
172 | sparc : erc32 |
---|
173 | |
---|
174 | 5. Makefile structure |
---|
175 | ===================== |
---|
176 | |
---|
177 | The makefiles have been re-organised. Most gnu-based bsps now use three |
---|
178 | main makefiles: |
---|
179 | + custom/default.cfg, |
---|
180 | + custom/bsp.cfg and |
---|
181 | + ompilers/gcc-target-default.cfg. |
---|
182 | |
---|
183 | Default.cfg sets the deafult values of certain common build options. |
---|
184 | |
---|
185 | Bsp.cfg set bsp-specific build options and can also override the |
---|
186 | default settings. |
---|
187 | |
---|
188 | Gcc-target-default.cfg contains the common gcc definitions. Some targets |
---|
189 | (a29k, no_cpu, and posix) still use the old structure. |
---|
190 | |
---|
191 | 6. Adding a bsp |
---|
192 | =============== |
---|
193 | |
---|
194 | The top-level configure.in has to be modified if a new target is added |
---|
195 | or if a new bsp is to be built by default. The additions required is |
---|
196 | basically to add which makefiles are to be created by configure and |
---|
197 | to add the target to the selection statement. To re-generate |
---|
198 | configure, autoconf-2.12 is needed. |
---|
199 | |
---|
200 | 7. Tested configurations |
---|
201 | ======================== |
---|
202 | |
---|
203 | All gnu-based bsps have been built on Linux. |
---|
204 | The native (posix) ports have been built and run only on Linux. |
---|
205 | |
---|
206 | The following configurations have NOT been tested: |
---|
207 | |
---|
208 | + Anything on Nextstep, HPUX and Irix. |
---|
209 | + The a29k port. |
---|
210 | |
---|
211 | 8. Pre-requisites |
---|
212 | ================= |
---|
213 | |
---|
214 | Gawk version 2 or higher. |
---|
215 | GNU make version 3.72 or higher. |
---|
216 | Bash. |
---|
217 | gcc version ??? |
---|
218 | |
---|
219 | TODO |
---|
220 | ==== |
---|
221 | |
---|
222 | The install-if-change script requires bash. On solaris systems, this should |
---|
223 | be changed to ksh, since ksh is provided with solaris (bash not). |
---|
224 | |
---|
225 | A fairly rescent version of gawk is needed to build RTEMS. This should be |
---|
226 | changed so that a plain vanilla awk also works. [NOTE: This dependency |
---|
227 | should disappear when the "gcc 2.8 -specs" is finished.] |
---|
228 | |
---|
229 | 'make install' should only install necessary files, not the full |
---|
230 | PROJECT_RELEASE directory as now. |
---|
231 | |
---|
232 | Posix port on solaris-2.5 fails due to undefined built-in functions |
---|
233 | (gcc-2.7.2, might be my installation). |
---|
234 | |
---|
235 | Improve support for 'make CFLAGS=xxx'. |
---|
236 | |
---|