1 |
1026 |
ivang |
@c
|
2 |
|
|
@c COPYRIGHT (c) 1988-2002.
|
3 |
|
|
@c On-Line Applications Research Corporation (OAR).
|
4 |
|
|
@c All rights reserved.
|
5 |
|
|
@c
|
6 |
|
|
@c require.t,v 1.10 2002/01/17 21:47:46 joel Exp
|
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 change the first line of the files
|
124 |
|
|
@code{bit}, @code{bit_gdb}, and @code{bit_rtems} to use the
|
125 |
|
|
@code{/bin/ksh} shell instead.
|
126 |
|
|
|
127 |
|
|
@item The native @code{patch} program is broken. Install the GNU version.
|
128 |
|
|
|
129 |
|
|
@item The native @code{m4} program is deficient. Install the GNU version.
|
130 |
|
|
|
131 |
|
|
@end itemize
|
132 |
|
|
|
133 |
|
|
@subsection Linux
|
134 |
|
|
|
135 |
|
|
The following problems have been reported by Linux users:
|
136 |
|
|
|
137 |
|
|
@itemize @bullet
|
138 |
|
|
|
139 |
|
|
@item Certain versions of GNU fileutils include a version of
|
140 |
|
|
@code{install} which does not work properly. Please perform
|
141 |
|
|
the following test to see if you need to upgrade:
|
142 |
|
|
|
143 |
|
|
@example
|
144 |
|
|
install -c -d /tmp/foo/bar
|
145 |
|
|
@end example
|
146 |
|
|
|
147 |
|
|
If this does not create the specified directories your install
|
148 |
|
|
program will not install RTEMS properly. You will need to upgrade
|
149 |
|
|
to at least GNU fileutils version 3.16 to resolve this problem.
|
150 |
|
|
|
151 |
|
|
@end itemize
|
152 |
|
|
|
153 |
|
|
@section Archive and Build Directories
|
154 |
|
|
|
155 |
|
|
If you are using RPM or another packaging format that supports
|
156 |
|
|
building a package from source, then there is probably a directory
|
157 |
|
|
structure assumed by that packaging format. Otherwise, you
|
158 |
|
|
are free to use whatever organization you like. However, this
|
159 |
|
|
document will use the directory organization described
|
160 |
|
|
in @ref{Archive and Build Directory Format}.
|
161 |
|
|
|
162 |
|
|
@subsection RPM Archive and Build Directory Format
|
163 |
|
|
|
164 |
|
|
For RPM, it is assumed that the following subdirectories
|
165 |
|
|
are under a root directory such as @code{/usr/src/redhat}:
|
166 |
|
|
|
167 |
|
|
@example
|
168 |
|
|
BUILD
|
169 |
|
|
RPMS
|
170 |
|
|
SOURCES
|
171 |
|
|
SPECS
|
172 |
|
|
SRPMS
|
173 |
|
|
@end example
|
174 |
|
|
|
175 |
|
|
For the purposes of this document, the RPM @code{SOURCES} directory
|
176 |
|
|
is the directory into which all tool source and patches are
|
177 |
|
|
assumed to reside. The @code{BUILD} directory is where the actual
|
178 |
|
|
build is performed when building binaries from a source RPM.
|
179 |
|
|
The @code{SOURCES} and @code{BUILD} are logically equivalent to
|
180 |
|
|
the @code{archive} and @code{tools} directory discussed in the
|
181 |
|
|
next section.
|
182 |
|
|
|
183 |
|
|
@subsection Archive and Build Directory Format
|
184 |
|
|
|
185 |
|
|
When no packaging format requirements are present, the root directory for
|
186 |
|
|
the storage of source archives and patches as well as for building the
|
187 |
|
|
tools is up to the user. The only concern is that there be enough
|
188 |
|
|
disk space to complete the build.
|
189 |
|
|
|
190 |
|
|
Make an @code{archive} directory to contain the downloaded
|
191 |
|
|
source code and a @code{tools} directory to be used as a build
|
192 |
|
|
directory. The command sequence to do this is shown
|
193 |
|
|
below:
|
194 |
|
|
|
195 |
|
|
@example
|
196 |
|
|
mkdir archive
|
197 |
|
|
mkdir tools
|
198 |
|
|
@end example
|
199 |
|
|
|
200 |
|
|
This will result in an initial directory structure similar to the
|
201 |
|
|
one shown in the following figure:
|
202 |
|
|
|
203 |
|
|
@example
|
204 |
|
|
@group
|
205 |
|
|
/whatever/prefix/you/choose/
|
206 |
|
|
archive/
|
207 |
|
|
tools/
|
208 |
|
|
|
209 |
|
|
@end group
|
210 |
|
|
@end example
|
211 |
|
|
|
212 |
|
|
@c @ifset use-html
|
213 |
|
|
@c @html
|
214 |
|
|
@c
|
215 |
|
|
@c ALT="Starting Directory Organization">
|
216 |
|
|
@c @end html
|
217 |
|
|
@c @end ifset
|
218 |
|
|
|
219 |
|
|
|