OAR

RTEMS 4.5.1-pre3 On-Line Library


Using the bit Script

PREV UP NEXT Bookshelf Getting Started with RTEMS for C/C++ Users

4.1.4.3: Using the bit Script

NOTE: The procedures described in the following sections must be completed before this step:

This section describes the process of building using the bit script. This script hides many of the details of building the tools but can be a hindrance if you encounter problems building the tools.

Unarchiving the Build Scripts

While in the tools directory, unpack the compressed tar file for the build tools using the following command sequence:

cd tools
tar xzf ../archive/c_build_scripts-4.5.1.tgz 

After the compressed tar file c_build_scripts-4.5.1.tgz has been unpacked, there will be a set of scripts in the tools directory along with any source code you have previously unarchived. These scripts are intended to aid in building the tools and RTEMS. These scripts may be used to automate the tool building process and hide the invocation of configure and make from you. They are:

If bit is executed later in this process, it will automatically create this subdirectory:

At this point, the tree should look something like the following figure:

/whatever/prefix/you/choose/
        archive/
            gcc-everything-2.95.3.tar.gz
            binutils-2.10.tar.gz
            newlib-1.8.2.tar.gz
            c_build_scripts-4.5.1.tgz 
            gcc-2.95.3-rtems-20010622a.diff.gz
            binutils-2.10-rtems-diff-20001107.gz
            newlib-1.8.2-rtems-20000606.diff.gz
        tools/
            binutils-2.10/
            gcc-2.95.3/
            newlib-1.8.2/
            bit
            bit_gdb
            bit_rtems
            common.sh
            user.cfg

Localizing the Configuration

Edit the user.cfg file to alter the settings of various variables which are used to tailor the build process. Each of the variables set in user.cfg may be modified as described below:

INSTALL_POINT
is the location where you wish the GNU C/C++ cross compilation tools for RTEMS to be built. It is recommended that the directory chosen to receive these tools be named so that it is clear from which gcc distribution it was generated and for which target system the tools are to produce code for.

WARNING: The INSTALL_POINT should not be a subdirectory under the build directory. The build directory will be removed automatically upon successful completion of the build procedure.

BINUTILS
is the directory under tools that contains binutils-2.10. For example:
BINUTILS=binutils-2.10
GCC
is the directory under tools that contains gcc-2.95.3. For example,
GCC=gcc-2.95.3
GDB
is the directory under tools that contains gdb-5.0. For example,
GDB=gdb-5.0
NEWLIB
is the directory under tools that contains newlib-1.8.2. For example:
NEWLIB=newlib-1.8.2
BUILD_DOCS
is set to "yes" if you want to install documentation. This requires that tools supporting documentation production be installed. This currently is limited to the GNU texinfo package. For example:
BUILD_DOCS=yes
BUILD_OTHER_LANGUAGES
is set to "yes" if you want to build languages other than C and C++. At the current time, the set of alternative languages includes Java, Fortran, and Objective-C. These alternative languages do not always build cross. Hence this option defaults to "no".

For example:

BUILD_OTHER_LANGUAGES=yes

NOTE: Based upon the version of the compiler being used, it may not be possible to build languages other than C and C++ cross. In many cases, the language run-time support libraries are not "multilib'ed". Thus the executable code in these libraries will be for the default compiler settings and not necessarily be correct for your CPU model.

The other variables in user.cfg are RTEMS specific and are not technically required to be set unless you build RTEMS using the bit_rtems script as described in Using the bit_rtems Script. They are described in detail in that section.

Running the bit Script

After the bit script has been modified to reflect the local installation, the modified bit script is run using the following sequence:

cd tools
./bit <target configuration>

Where <target configuration> is one of the following:

The build process can take a while to complete. Many users find it handy to run the build process in the background, capture the output in a file, and monitor the output. This can be done as follows:

./bit <target configuration> >bit.log 2>&1 &
tail -f bit.log

If no errors are encountered, the bit script will conclude by printing messages similar to the following:


The build-i386-tools subdirectory may now be removed.

Started:  Fri Apr 10 10:14:07 CDT 1998
Finished: Fri Apr 10 12:01:33 CDT 1998

If the bit script successfully completes, then the GNU C/C++ cross compilation tools are installed.

If the bit script does not successfully complete, then investigation will be required to determine the source of the error.


PREV UP NEXT Bookshelf Getting Started with RTEMS for C/C++ Users

Copyright © 1988-2000 OAR Corporation