]> git.kernelconcepts.de Git - karo-tx-redboot.git/blob - doc/html/user-guide/building-the-system.html
Initial revision
[karo-tx-redboot.git] / doc / html / user-guide / building-the-system.html
1 <!-- Copyright (C) 2003 Red Hat, Inc.                                -->
2 <!-- This material may be distributed only subject to the terms      -->
3 <!-- and conditions set forth in the Open Publication License, v1.0  -->
4 <!-- or later (the latest version is presently available at          -->
5 <!-- http://www.opencontent.org/openpub/).                           -->
6 <!-- Distribution of the work or derivative of the work in any       -->
7 <!-- standard (paper) book form is prohibited unless prior           -->
8 <!-- permission is obtained from the copyright holder.               -->
9 <HTML
10 ><HEAD
11 ><TITLE
12 >Building the System</TITLE
13 ><meta name="MSSmartTagsPreventParsing" content="TRUE">
14 <META
15 NAME="GENERATOR"
16 CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
17 "><LINK
18 REL="HOME"
19 TITLE="eCos User Guide"
20 HREF="ecos-user-guide.html"><LINK
21 REL="UP"
22 TITLE="Manual Configuration"
23 HREF="manual-configuration.html"><LINK
24 REL="PREVIOUS"
25 TITLE="Conflicts and constraints"
26 HREF="conflicts-and-constraints.html"><LINK
27 REL="NEXT"
28 TITLE="Packages"
29 HREF="ecos-packages.html"></HEAD
30 ><BODY
31 CLASS="SECT1"
32 BGCOLOR="#FFFFFF"
33 TEXT="#000000"
34 LINK="#0000FF"
35 VLINK="#840084"
36 ALINK="#0000FF"
37 ><DIV
38 CLASS="NAVHEADER"
39 ><TABLE
40 SUMMARY="Header navigation table"
41 WIDTH="100%"
42 BORDER="0"
43 CELLPADDING="0"
44 CELLSPACING="0"
45 ><TR
46 ><TH
47 COLSPAN="3"
48 ALIGN="center"
49 >eCos User Guide</TH
50 ></TR
51 ><TR
52 ><TD
53 WIDTH="10%"
54 ALIGN="left"
55 VALIGN="bottom"
56 ><A
57 HREF="conflicts-and-constraints.html"
58 ACCESSKEY="P"
59 >Prev</A
60 ></TD
61 ><TD
62 WIDTH="80%"
63 ALIGN="center"
64 VALIGN="bottom"
65 >Chapter 28. Manual Configuration</TD
66 ><TD
67 WIDTH="10%"
68 ALIGN="right"
69 VALIGN="bottom"
70 ><A
71 HREF="ecos-packages.html"
72 ACCESSKEY="N"
73 >Next</A
74 ></TD
75 ></TR
76 ></TABLE
77 ><HR
78 ALIGN="LEFT"
79 WIDTH="100%"></DIV
80 ><DIV
81 CLASS="SECT1"
82 ><H1
83 CLASS="SECT1"
84 ><A
85 NAME="BUILDING-THE-SYSTEM">Building the System</H1
86 ><P
87 >Once a build tree has been generated with
88           <B
89 CLASS="COMMAND"
90 >ecosconfig</B
91 >, building <SPAN
92 CLASS="PRODUCTNAME"
93 >eCos</SPAN
94 > is straightforward:</P
95 ><TABLE
96 BORDER="5"
97 BGCOLOR="#E0E0F0"
98 WIDTH="70%"
99 ><TR
100 ><TD
101 ><PRE
102 CLASS="SCREEN"
103 >$ make</PRE
104 ></TD
105 ></TR
106 ></TABLE
107 ><P
108 >The build tree contains the subdirectories, makefiles,
109           and everything else that is needed to generate the default
110           configuration for the selected architecture and platform.
111           The only requirement is that the tools needed for that
112           architecture, for example
113           <B
114 CLASS="COMMAND"
115 >powerpc-eabi-g++</B
116 >,
117           are available using the standard search path. If this is not
118           the case then the <B
119 CLASS="COMMAND"
120 >make</B
121 > will
122           fail with an error message. If you have a multiprocessor
123           system then it may be more efficient to use:</P
124 ><TABLE
125 BORDER="5"
126 BGCOLOR="#E0E0F0"
127 WIDTH="70%"
128 ><TR
129 ><TD
130 ><PRE
131 CLASS="SCREEN"
132 >$ make -j <TT
133 CLASS="REPLACEABLE"
134 ><I
135 >n</I
136 ></TT
137 ></PRE
138 ></TD
139 ></TR
140 ></TABLE
141 ><P
142 >where <TT
143 CLASS="REPLACEABLE"
144 ><I
145 >n</I
146 ></TT
147 > is equal to the
148           number of processors on your system.</P
149 ><P
150 >Once the <B
151 CLASS="COMMAND"
152 >make</B
153 > process
154           has completed, the install tree will contain the header
155           files and the target library that are needed for application
156           development. </P
157 ><P
158 >It is also possible to build the system&#8217;s test cases
159 for the current configuration:</P
160 ><TABLE
161 BORDER="5"
162 BGCOLOR="#E0E0F0"
163 WIDTH="70%"
164 ><TR
165 ><TD
166 ><PRE
167 CLASS="SCREEN"
168 >$ make tests</PRE
169 ></TD
170 ></TR
171 ></TABLE
172 ><P
173 >The resulting test executables will end up in a
174           <TT
175 CLASS="FILENAME"
176 >tests</TT
177 > subdirectory of the
178           install tree. </P
179 ><P
180 >If disk space is scarce then it is possible to make the copy
181 of the install tree for application development purposes, and then
182 use: </P
183 ><TABLE
184 BORDER="5"
185 BGCOLOR="#E0E0F0"
186 WIDTH="70%"
187 ><TR
188 ><TD
189 ><PRE
190 CLASS="SCREEN"
191 >$ make clean</PRE
192 ></TD
193 ></TR
194 ></TABLE
195 ><P
196 >The build tree will now use up a minimum of disk space &#8212; the
197 bulk of what is left consists of configuration header files that
198 you may have edited and hence should not be deleted automatically.
199 However, it is possible to rebuild the system at any time without
200 re-invoking <B
201 CLASS="COMMAND"
202 >ecosconfig</B
203 >, just by
204 running <B
205 CLASS="COMMAND"
206 >make</B
207 > again. </P
208 ><P
209 >Under exceptional circumstances it may be necessary to run <B
210 CLASS="COMMAND"
211 >make
212 clean</B
213 > for other reasons, such as when a new release
214 of the toolchain is installed. The toolchain includes a number of
215 header files which are closely tied to the compiler, for example <TT
216 CLASS="FILENAME"
217 >limits.h</TT
218 >,
219 and these header files are not and should not be duplicated by <SPAN
220 CLASS="PRODUCTNAME"
221 >eCos</SPAN
222 >.
223 The makefiles perform header file dependency analysis, so that when
224 a header file is changed all affected sources will be rebuilt during
225 the next <B
226 CLASS="COMMAND"
227 >make</B
228 >. This is very useful
229 when the configuration header files are changed, but it also means
230 that a build tree containing information about the locations of
231 header files must be rebuilt. If a new version of the toolchain
232 is installed and the old version is removed then this location information
233 is no longer accurate, and <B
234 CLASS="COMMAND"
235 >make</B
236 > will
237 complain that certain dependencies cannot be satisfied. Under such circumstances
238 it is necessary to do a <B
239 CLASS="COMMAND"
240 >make clean</B
241 > first. </P
242 ></DIV
243 ><DIV
244 CLASS="NAVFOOTER"
245 ><HR
246 ALIGN="LEFT"
247 WIDTH="100%"><TABLE
248 SUMMARY="Footer navigation table"
249 WIDTH="100%"
250 BORDER="0"
251 CELLPADDING="0"
252 CELLSPACING="0"
253 ><TR
254 ><TD
255 WIDTH="33%"
256 ALIGN="left"
257 VALIGN="top"
258 ><A
259 HREF="conflicts-and-constraints.html"
260 ACCESSKEY="P"
261 >Prev</A
262 ></TD
263 ><TD
264 WIDTH="34%"
265 ALIGN="center"
266 VALIGN="top"
267 ><A
268 HREF="ecos-user-guide.html"
269 ACCESSKEY="H"
270 >Home</A
271 ></TD
272 ><TD
273 WIDTH="33%"
274 ALIGN="right"
275 VALIGN="top"
276 ><A
277 HREF="ecos-packages.html"
278 ACCESSKEY="N"
279 >Next</A
280 ></TD
281 ></TR
282 ><TR
283 ><TD
284 WIDTH="33%"
285 ALIGN="left"
286 VALIGN="top"
287 >Conflicts and constraints</TD
288 ><TD
289 WIDTH="34%"
290 ALIGN="center"
291 VALIGN="top"
292 ><A
293 HREF="manual-configuration.html"
294 ACCESSKEY="U"
295 >Up</A
296 ></TD
297 ><TD
298 WIDTH="33%"
299 ALIGN="right"
300 VALIGN="top"
301 >Packages</TD
302 ></TR
303 ></TABLE
304 ></DIV
305 ></BODY
306 ></HTML
307 >