source: rtems/doc/started/buildrt.t @ 3fccbb34

4.104.114.84.95
Last change on this file since 3fccbb34 was 3fccbb34, checked in by Joel Sherrill <joel.sherrill@…>, on 10/20/98 at 12:33:48

Added information about the bit_rtems script.

  • Property mode set to 100644
File size: 4.0 KB
Line 
1@c
2@c
3@c  COPYRIGHT (c) 1988-1998.
4@c  On-Line Applications Research Corporation (OAR).
5@c  All rights reserved.
6@c
7@c  $Id$
8@c
9
10@chapter Building RTEMS
11
12@section Unpack the RTEMS Source
13
14Use the following command sequence to unpack the RTEMS source into the
15tools directory:
16
17@example
18cd tools
19tar xzf ../archive/@value{RTEMS-TAR}
20@end example
21
22@section Add <INSTALL_POINT>/bin to Executable PATH
23
24In order to compile RTEMS, you must have the cross compilation toolset
25in your search patch.  The following command appends the directory
26where the tools were installed in the previous chapter:
27
28@example
29export PATH=$PATH:<INSTALL_POINT>/bin
30@end example
31
32NOTE:  The above command is in Bourne shell (@code{sh}) syntax and
33should work with the Korn (@code{ksh}) and GNU Bourne Again Shell
34(@code{bash}).  It will not work with the C Shell (@code{csh}) or
35derivatives of the C Shell.
36
37@section Verifying the Operation of the Cross Toolset
38
39In order to insure that the cross-compiler is invoking the correct
40subprograms (like @code{as} and @code{ld}), one can test assemble
41a small program.  When in verbose more, @code{gcc} prints out information
42showing where it found the subprograms it invokes.  Place the following
43function in a file named @code{f.c}:
44
45@example
46int f( int x )
47@{
48  return x + 1;
49@}
50@end example
51
52Then assemble the file using a command similar to the following:
53
54@example
55m68k-rtems-gcc -v -S f.c
56@end example
57
58Where @code{m68k-rtems-gcc} should be changed to match the installed
59name of your cross compiler.  The result of this command will be
60a sequence of output showing where the cross-compiler searched for
61and found its subcomponents.  Verify that these paths correspond
62to your <INSTALL_POINT>.
63
64@b{NOTE:} One of the most common installation errors is for the
65cross-compiler not to be able to find the cross assembler and default
66to using the native @code{as}.  This can result in very confusing
67error messages.
68
69@section Generate RTEMS for a Specific Target and BSP
70
71@subsection Using the bit_rtems Script
72
73The simplest way to build RTEMS is to use the @code{bit_rtems} script.
74This script interprets the settings in the @code{user.cfg} file to
75enable or disable the various RTEMS options.
76
77This script is invoked as follows:
78
79@example
80./bit_rtems CPU [BSP]
81@end example
82
83Where CPU is one of the RTEMS supported CPU families from the following
84list:
85
86@itemize @bullet
87@item hppa1.1
88@item i386
89@item i386-elf
90@item i386-go32
91@item i960
92@item m68k
93@item mips64orion
94@item powerpc
95@item sh
96@item sparc
97@end itemize
98
99BSP is a supported BSP for the selected CPU family.  The list of
100supported BSPs may be found in the file
101tools/@value{RTEMS-UNTAR}/README.configure
102in the RTEMS source tree.  If the BSP parameter is not specified,
103then all supported BSPs for the selected CPU family will be built.
104
105@subsection Using the RTEMS configure Script Directly
106
107Make a build directory under tools and build the RTEMS product in this
108directory. The ../@value{RTEMS-UNTAR}/configure
109command has numerous command line
110arguments. These arguments are discussed in detail in documentation that
111comes with the RTEMS distribution. In the installation described in the
112section "Unpack the RTEMS source", these configuration options can be found
113in the file tools/@value{RTEMS-UNTAR}/README.configure.
114
115The following shows the command sequence required to configure,
116compile, and install RTEMS with the POSIX API, FreeBSD TCP/IP,
117and C++ support disabled.  RTEMS will be built to target
118the @code{BOARD_SUPPORT_PACKAGE} board.
119
120@example
121mkdir build-rtems
122cd build-rtems
123../@value{RTEMS-UNTAR}/configure --target=<TARGET_CONFIGURATION> \
124    --disable-posix --disable-tcpip --disable-cxx \
125    --enable-rtemsbsp=<BOARD_SUPPORT_PACKAGE>\
126    --prefix=<INSTALL_POINT>
127gmake all install
128@end example
129
130Where the list of currently supported of <TARGET_CONFIGURATION>'s and
131<BOARD_SUPPORT_PACKAGE>'s can be found in
132tools/@value{RTEMS-UNTAR}/README.configure.
133
134<INSTALL_POINT> is the installation point from the previous step
135"Modify the bit script" in the build of the tools.
136
137
Note: See TracBrowser for help on using the repository browser.