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 | --enable-rtemsbsp="bsp1 bsp2 ..." |
---|
23 | |
---|
24 | By default, the RTEMS posix interface is built for targets that support |
---|
25 | it. It can be disabled with the --disable-posix option. The --disable-tests |
---|
26 | will not configure the RTEMS test suite. This is used only to speed-up |
---|
27 | configuration in case building the tests are not necessary. By default, |
---|
28 | all bsps for a target are built. There is two ways of changing this: |
---|
29 | |
---|
30 | + use the --enable-rtemsbsp otion which will set the specified |
---|
31 | bsps as the default bsps, or |
---|
32 | + set the RTEMSBSP variable during make (see below). |
---|
33 | |
---|
34 | The cross-compiler is set to $(target)-gcc by default. This can be |
---|
35 | overriden by one of the following methods: |
---|
36 | |
---|
37 | + running make with CC_FOR_TARGET=compiler_to_use. The same applies to |
---|
38 | all the target specific tools (AS, AR, NM, OBJCOPY, SIZE, LD), or |
---|
39 | + by using the --program-prefix option to configure to specify the |
---|
40 | string which will prepended to the tool names. Be sure to include |
---|
41 | a trailing "-". For example, to use a m68k-coff toolset, use the |
---|
42 | --program-prefix=m68k-coff- option. |
---|
43 | |
---|
44 | The --target= option configures RTEMS for a specific target architecture. |
---|
45 | The following targets are supported: |
---|
46 | |
---|
47 | (none) will build the host-based version on Linux, |
---|
48 | Solaris and HPUX. |
---|
49 | |
---|
50 | a29k-rtems only standalone, uses non-gnu compiler |
---|
51 | i386-rtems |
---|
52 | i960-rtems |
---|
53 | hppa1_1-rtems |
---|
54 | m68k-rtems |
---|
55 | mips64orion-rtems |
---|
56 | no_cpu-rtems |
---|
57 | powerpc-rtems |
---|
58 | sparc-rtems |
---|
59 | |
---|
60 | To build, run make in the build directory. To specify which bsps to build, |
---|
61 | add the RTEMSBSP="bsp1 bsp2 .." to the make command. |
---|
62 | |
---|
63 | Installation is done under $(prefix)/$(target)/rtems. |
---|
64 | |
---|
65 | As an example, to build and install the mvme136 and dmv152 bsps for m68k do: |
---|
66 | |
---|
67 | (path_to_rtems_src)/configure --target=m68k-rtems |
---|
68 | |
---|
69 | make RTEMSBSP="mvme136 dmv152" |
---|
70 | |
---|
71 | make install RTEMSBSP="mvme136 dmv152" |
---|
72 | |
---|
73 | |
---|
74 | The sample tests are built by 'make all', do a 'make test' to build the full |
---|
75 | test suite. |
---|
76 | |
---|
77 | 2.2 Build with Cygnus one-tree release |
---|
78 | |
---|
79 | To build and install RTEMS with the one-tree structure, just copy the rtems |
---|
80 | directory to the tree. The one-tree configure.in and Makefile.in has to be |
---|
81 | replaced with the RTEMS-aware versions. The build options are the same as |
---|
82 | for the standalone build. |
---|
83 | |
---|
84 | 3. To use the installed RTEMS library |
---|
85 | ===================================== |
---|
86 | |
---|
87 | To use the installed RTEMS bsps to build applications, the application |
---|
88 | makefile has to include a bsp-specific makefile that will define the |
---|
89 | RTEMS variables necessary to find include files and libraries. The |
---|
90 | bsp-specific makefile is installed at |
---|
91 | |
---|
92 | $(prefix)/$(target)/rtmes/$(RTEMS_BSP)/Makefile.inc |
---|
93 | |
---|
94 | For the erc32 bsp installed at /usr/local/cross, the line would read: |
---|
95 | |
---|
96 | include /usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc |
---|
97 | |
---|
98 | |
---|
99 | 4. Supported target bsps |
---|
100 | ======================== |
---|
101 | |
---|
102 | The following bsps are supported: |
---|
103 | |
---|
104 | host-based : posix (on linux, solaris and hpux) |
---|
105 | |
---|
106 | a29k : portsw |
---|
107 | i386 : force386 i386ex |
---|
108 | i960 : cvme961 |
---|
109 | hppa1_1 : simhppa |
---|
110 | m68k : efi332 gen68302 idp mvme147 mvme162 dmv152 efi68k gen68360 |
---|
111 | mvme136 mvme147s go32 |
---|
112 | no_cpu : no_bsp |
---|
113 | mips64orion : p4600 p4650 (p4000 port with either R4600 or R4650) |
---|
114 | powerpc : papyrus |
---|
115 | sparc : erc32 |
---|
116 | |
---|
117 | 5. Makefile structure |
---|
118 | ===================== |
---|
119 | |
---|
120 | The makefiles have been re-organised. Most gnu-based bsps now use three |
---|
121 | main makefiles: |
---|
122 | + custom/default.cfg, |
---|
123 | + custom/bsp.cfg and |
---|
124 | + ompilers/gcc-target-default.cfg. |
---|
125 | |
---|
126 | Default.cfg sets the deafult values of certain common build options. |
---|
127 | |
---|
128 | Bsp.cfg set bsp-specific build options and can also override the |
---|
129 | default settings. |
---|
130 | |
---|
131 | Gcc-target-default.cfg contains the common gcc definitions. Some targets |
---|
132 | (a29k, no_cpu, and posix) still use the old structure. |
---|
133 | |
---|
134 | 6. Adding a bsp |
---|
135 | =============== |
---|
136 | |
---|
137 | The top-level configure.in has to be modified if a new target is added |
---|
138 | or if a new bsp is to be built by default. The additions required is |
---|
139 | basically to add which makefiles are to be created by configure and |
---|
140 | to add the target to the selection statement. To re-generate |
---|
141 | configure, autoconf-2.12 is needed. |
---|
142 | |
---|
143 | 7. Tested configurations |
---|
144 | ======================== |
---|
145 | |
---|
146 | All gnu-based bsps have been built on Linux. |
---|
147 | The native (posix) ports have been built and run on Linux ans Solaris. |
---|
148 | The sparc port has been tested on SunOS and Linux. |
---|
149 | |
---|
150 | The following configurations have NOT been tested: |
---|
151 | |
---|
152 | + Anything on Nextstep, HPUX and Irix. |
---|
153 | + The a29k port. |
---|
154 | |
---|
155 | 8. Pre-requisites |
---|
156 | ================= |
---|
157 | |
---|
158 | Gawk version 2 or higher. |
---|
159 | GNU make version 3.72 or higher. |
---|
160 | Bash. |
---|
161 | gcc version ??? |
---|
162 | |
---|
163 | TODO |
---|
164 | ==== |
---|
165 | |
---|
166 | The install-if-change script requires bash. On solaris systems, this should |
---|
167 | be changed to ksh, since ksh is provided with solaris (bash not). |
---|
168 | |
---|
169 | A fairly rescent version of gawk is needed to build RTEMS. This should be |
---|
170 | changed so that a plain vanilla awk also works. |
---|
171 | |
---|
172 | 'make install' should only install necessary files, not the full |
---|
173 | PROJECT_RELEASE directory as now. |
---|
174 | |
---|
175 | Posix port on solaris-2.5 fails due to undefined built-in functions |
---|
176 | (gcc-2.7.2, might be my installation). |
---|
177 | |
---|
178 | Improve support for 'make CFLAGS=xxx'. |
---|
179 | |
---|