Version 10 (modified by C Rempel, on Mar 2, 2013 at 3:11:35 AM) (diff)

RTEMS Source Builder

Table of Contents

    Error: Page TBR/UserManual/RTEMS_Source_Builder does not exist

Mentors: Chris Johns

Students: Help Wanted

Status: Currently gearing up for 4.11 release.


The Source Builder (sb) is a Python-based tool designed to build compiler toolchains from source code. This tool assists with building and maintaining tool sets, which developers typically need to update a few times each year.

Source Builder compiles code from source and creates tar files that can be installed. It is not designed to create packages of tools or tools for packaging systems. The Source Builder uses a modified version of the spec file format to describe build configurations. The spec format supports including files, macros, multiple source packages per build, conditional logic, variables, and parameters.

Source Builder fetches the source if it is not local. A user should be able to run Source Builder with a configuration file for a tool set, and Source Builder will collect the sources directly from the upstream project, compile the sources, and produce an installable tar file.

To use Source Builder, place the tool anywhere on a disk then create a private directory to hold build sets if the default build sets are not suitable. The ability to create private build sets is important. The tool comes with configurations for popular packages, and a private build set can reference them.

The tool needs testing on other platforms. I need to test Windows (have to use --no-smp due to MSYS bugs) and different Linux distributions. It has been tested on FreeBSD, MacOS, Ubuntu and Fedora.

Goal: Improve the Source Builder. Here are a list of some improvement tasks that can be considered.

  • Add support for building native host tools, such as gcc and binutils.
  • Add support for building gcc, binutils, newlib and gdb from version control.
  • Add support for checksumming downloaded files, e.g. md5sum, shaXYZsum, or gpg verification.
  • Add installer functionality so that users do not need to find and untar the correct tool set manually.
  • Add a GUI. The Python code is all class-based and a GUI would be nice. The GUI could include creating configurations, selecting a build set configuration, installing a built tool set, and other useful features.
  • Add a build-set for each of the working rtems toolkits.

Requirements: Familiarity with scripting languages. General understanding of how cross-compilation works.


  • Source Builder was created and is maintained by Chris Johns.

Miscellaneous Sections

As the project progresses, you will need to add build instructions, etc and this page will evolve from a project description into a HOWTO.= Source Builder Quick Start =

In Ubuntu:

sudo apt-get build-dep binutils gcc g++ gdb # install the build dependencies

In Debian, it is necessary to do the build completely as the root user, and manually install automake and expat.

su root apt-get install automake expat

Note: if using Debian continue to use the root user. Platform independent:

git clone git:// # clone the repository cd rtems-source-builder-rtems/rtems # move to the RTEMS directory ../source-builder/sb-set-builder --list-bsets # list the build sets ../source-builder/sb-set-builder 4.11/rtems-sparc --force # force the build of the sparc set

The packages will then be built in the rtems-source-builder-rtems/rtems/tar directory, and can be used by navigating to where to install the tools and running

tar -xf path/to/rtems-source-builder/rtems/tar/sparc-rtems4.11-binutils-2.22-1.tar.bz2 tar -xf path/to/rtems-source-builder/rtems/tar/sparc-rtems4.11-gcc-4.7.2-newlib-1.20.0-1.tar.bz2 tar -xf path/to/rtems-source-builder/rtems/tar/sparc-rtems4.11-gdb-7.5.1-1.tar.bz2 tar -xf path/to/rtems-source-builder/rtems/tar/rtems4.11-sparc-rtems4.11-1.tar.bz2


Other sections: If you have more to say about the project, feel free to add other sections at will.