1 | @c |
---|
2 | @c COPYRIGHT (c) 1988-2002. |
---|
3 | @c On-Line Applications Research Corporation (OAR). |
---|
4 | @c All rights reserved. |
---|
5 | @c |
---|
6 | @c $Id$ |
---|
7 | @c |
---|
8 | |
---|
9 | @chapter Requirements |
---|
10 | |
---|
11 | This chapter describes the build-host system requirements and initial steps |
---|
12 | in installing the GNU C/C++ Cross Compiler Tools and RTEMS on a build-host. |
---|
13 | |
---|
14 | @section Disk Space |
---|
15 | |
---|
16 | A fairly large amount of disk space is required to perform the build of the |
---|
17 | GNU C/C++ Cross Compiler Tools for RTEMS. The following table may help in |
---|
18 | assessing the amount of disk space required for your installation: |
---|
19 | |
---|
20 | @example |
---|
21 | +------------------------------------+--------------------------+ |
---|
22 | | Component | Disk Space Required | |
---|
23 | +------------------------------------+--------------------------+ |
---|
24 | | archive directory | 35 Mbytes | |
---|
25 | | tools src unarchived | 150 Mbytes | |
---|
26 | | each individual build directory | up to 500 Mbytes | |
---|
27 | | each installation directory | 20-200 Mbytes | |
---|
28 | +------------------------------------+--------------------------+ |
---|
29 | @end example |
---|
30 | |
---|
31 | It is important to understand that the above requirements only address |
---|
32 | the GNU C/C++ Cross Compiler Tools themselves. Adding additional |
---|
33 | languages such as Fortran or Objective-C can increase the size |
---|
34 | of the build and installation directories. Also, the unarchived |
---|
35 | source and build directories can be removed after the tools are |
---|
36 | installed. |
---|
37 | |
---|
38 | After the tools themselves are installed, RTEMS must be built |
---|
39 | and installed for each Board Support Package that you wish |
---|
40 | to use. Thus the precise amount of disk space required |
---|
41 | for each installation directory depends highly on the number |
---|
42 | of RTEMS BSPs which are to be installed. If a single BSP is |
---|
43 | installed, then the additional size of each install directory |
---|
44 | will tend to be in the 40-60 Mbyte range. |
---|
45 | |
---|
46 | There are a number of factors which must be taken into |
---|
47 | account in order to estimate the amount of disk space required |
---|
48 | to build RTEMS itself. Attempting to build multiple BSPs in |
---|
49 | a single step increases the disk space requirements. Similarly |
---|
50 | enabling optional features increases the build and install |
---|
51 | space requirements. In particular, enabling and building |
---|
52 | the RTEMS tests results in a significant increase in build |
---|
53 | space requirements but since the tests are not installed has, |
---|
54 | enabling them has no impact on installation requirements. |
---|
55 | |
---|
56 | @section General Host Software Requirements |
---|
57 | |
---|
58 | The instructions in this manual should work on any computer running |
---|
59 | a UNIX variant. Some native GNU tools are used by this procedure |
---|
60 | including: |
---|
61 | |
---|
62 | @itemize @bullet |
---|
63 | @item GCC |
---|
64 | @item GNU make |
---|
65 | @item GNU makeinfo |
---|
66 | @end itemize |
---|
67 | |
---|
68 | In addition, some native utilities may be deficient for building |
---|
69 | the GNU tools. |
---|
70 | |
---|
71 | @subsection GCC |
---|
72 | |
---|
73 | Although RTEMS itself is intended to execute on an embedded target, |
---|
74 | there is source code for some native programs included with the RTEMS |
---|
75 | distribution. Some of these programs are used to assist in the building |
---|
76 | of RTEMS itself, while others are BSP specific tools. Regardless, |
---|
77 | no attempt has been made to compile these programs with a non-GNU |
---|
78 | compiler. |
---|
79 | |
---|
80 | @subsection GNU Make |
---|
81 | |
---|
82 | Both NEWLIB and RTEMS use GNU make specific features and can only be built |
---|
83 | using GNU make. Many systems include a make utility that is not GNU make. |
---|
84 | The safest way to meet this requirement is to ensure that when you invoke |
---|
85 | the command @code{make}, it is GNU make. This can be verified by |
---|
86 | attempting to print the GNU make version information: |
---|
87 | |
---|
88 | @example |
---|
89 | make --version |
---|
90 | @end example |
---|
91 | |
---|
92 | If you have GNU make and another make on your system, it is common to put |
---|
93 | the directory containing GNU make before the directory containing other |
---|
94 | implementations of make. |
---|
95 | |
---|
96 | @subsection GNU makeinfo Version Requirements |
---|
97 | |
---|
98 | In order to build gcc 2.9.x or newer versions, the GNU @code{makeinfo} program |
---|
99 | installed on your system must be at least version 1.68. The appropriate |
---|
100 | version of @code{makeinfo} is distributed with @code{gcc}. |
---|
101 | |
---|
102 | The following demonstrates how to determine the version of @code{makeinfo} |
---|
103 | on your machine: |
---|
104 | |
---|
105 | @example |
---|
106 | makeinfo --version |
---|
107 | @end example |
---|
108 | |
---|
109 | @c |
---|
110 | @c Host Specific Notes |
---|
111 | @c |
---|
112 | |
---|
113 | @section Host Specific Notes |
---|
114 | |
---|
115 | @subsection Solaris 2.x |
---|
116 | |
---|
117 | The following problems have been reported by Solaris 2.x users: |
---|
118 | |
---|
119 | @itemize @bullet |
---|
120 | |
---|
121 | @item The build scripts are written in "shell". The program @code{/bin/sh} |
---|
122 | on Solaris 2.x is not robust enough to execute these scripts. If you |
---|
123 | are on a Solaris 2.x host, then use the @code{/bin/ksh} or |
---|
124 | @code{/bin/bash} shell instead. |
---|
125 | |
---|
126 | @item The native @code{patch} program is broken. Install the GNU version. |
---|
127 | |
---|
128 | @item The native @code{m4} program is deficient. Install the GNU version. |
---|
129 | |
---|
130 | @end itemize |
---|
131 | |
---|
132 | @subsection Linux |
---|
133 | |
---|
134 | The following problems have been reported by Linux users: |
---|
135 | |
---|
136 | @itemize @bullet |
---|
137 | |
---|
138 | @item Certain versions of GNU fileutils include a version of |
---|
139 | @code{install} which does not work properly. Please perform |
---|
140 | the following test to see if you need to upgrade: |
---|
141 | |
---|
142 | @example |
---|
143 | install -c -d /tmp/foo/bar |
---|
144 | @end example |
---|
145 | |
---|
146 | If this does not create the specified directories your install |
---|
147 | program will not install RTEMS properly. You will need to upgrade |
---|
148 | to at least GNU fileutils version 3.16 to resolve this problem. |
---|
149 | |
---|
150 | @end itemize |
---|
151 | |
---|
152 | @section Archive and Build Directories |
---|
153 | |
---|
154 | If you are using RPM or another packaging format that supports |
---|
155 | building a package from source, then there is probably a directory |
---|
156 | structure assumed by that packaging format. Otherwise, you |
---|
157 | are free to use whatever organization you like. However, this |
---|
158 | document will use the directory organization described |
---|
159 | in @ref{Archive and Build Directory Format}. |
---|
160 | |
---|
161 | @subsection RPM Archive and Build Directory Format |
---|
162 | |
---|
163 | For RPM, it is assumed that the following subdirectories |
---|
164 | are under a root directory such as @code{/usr/src/redhat}: |
---|
165 | |
---|
166 | @example |
---|
167 | BUILD |
---|
168 | RPMS |
---|
169 | SOURCES |
---|
170 | SPECS |
---|
171 | SRPMS |
---|
172 | @end example |
---|
173 | |
---|
174 | For the purposes of this document, the RPM @code{SOURCES} directory |
---|
175 | is the directory into which all tool source and patches are |
---|
176 | assumed to reside. The @code{BUILD} directory is where the actual |
---|
177 | build is performed when building binaries from a source RPM. |
---|
178 | The @code{SOURCES} and @code{BUILD} are logically equivalent to |
---|
179 | the @code{archive} and @code{tools} directory discussed in the |
---|
180 | next section. |
---|
181 | |
---|
182 | @subsection Archive and Build Directory Format |
---|
183 | |
---|
184 | When no packaging format requirements are present, the root directory for |
---|
185 | the storage of source archives and patches as well as for building the |
---|
186 | tools is up to the user. The only concern is that there be enough |
---|
187 | disk space to complete the build. |
---|
188 | |
---|
189 | Make an @code{archive} directory to contain the downloaded |
---|
190 | source code and a @code{tools} directory to be used as a build |
---|
191 | directory. The command sequence to do this is shown |
---|
192 | below: |
---|
193 | |
---|
194 | @example |
---|
195 | mkdir archive |
---|
196 | mkdir tools |
---|
197 | @end example |
---|
198 | |
---|
199 | This will result in an initial directory structure similar to the |
---|
200 | one shown in the following figure: |
---|
201 | |
---|
202 | @example |
---|
203 | @group |
---|
204 | /whatever/prefix/you/choose/ |
---|
205 | archive/ |
---|
206 | tools/ |
---|
207 | |
---|
208 | @end group |
---|
209 | @end example |
---|
210 | |
---|
211 | @c @ifset use-html |
---|
212 | @c @html |
---|
213 | @c <IMG SRC="sfile12c.jpg" WIDTH=417 HEIGHT=178 |
---|
214 | @c ALT="Starting Directory Organization"> |
---|
215 | @c @end html |
---|
216 | @c @end ifset |
---|
217 | |
---|
218 | |
---|