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