wiki:Developer/Tools/RSB

Version 26 (modified by George White, on 12/26/15 at 17:10:00) (diff)

Reformatted the page somewhat, and added instructions for Arch Linux users.

RTEMS Source Builder

The RTEMS Source Builder or RSB builds RTEMS tool sets for a range of hosts from source. It is an easy to use tool complete with documentation that gives you a ready to use RTEMS tool set for your architecture. It is actively being maintained so you get a current tool set that works with RTEMS releases as well as RTEMS's development branches.

The RTEMS Source Builder builds using the source code for the tools by downloading it plus any patches. The source is left on disk after the build and you can archive it along with all the other source in your project. Any time in the future you can rebuild the exact tools and if you have a long life project and your build host need replacing you can rebuild the tools from source.

The RSB is part of the RTEMS Tool Project.

Source Builder was created and is maintained by Chris Johns. Feel free to ask about it on the RTEMS User and Development mailing lists.

The RSB repository is https://git.rtems.org/rtems-source-builder.

Documentation

The RSB documentation and the Quick Start to get going can be found at https://docs.rtems.org/rsb/.

Building a Tools set with RTEMS

To build a tool set checkout the RSB repo and then get the RSB to build the tools and RTEMS.

$ cd
$ mkdir -p development/rtems/rsb
$ cd development/rtems/rsb
$ git clone git://git.rtems.org/rtems-source-builder.git
$ cd rtems-source-builder
$ cd rtems
$ ../source-builder/sb-set-builder --prefix=$HOME/development/rtems/4.11 4.11/rtems-sparc

Supported Hosts

Linux distributions

  • Ubuntu (and its official derivatives)
  • Debian (if using Debian 8, see these notes)
  • Arch Linux (a Python 2 virtual environment may need to be set up, see this section)
  • CentOS (if using CentOS 7, see these notes)
  • Fedora
  • Linux Mint
  • openSUSE
  • Raspbian

BSD (and similar)

  • FreeBSD
  • NetBSD
  • Mac OS X

Other

  • Windows (using MSYS2)

Host operating system specific notes

CentOS 7 and Debian 8 (Jessie)

The note below is valid if you plan to generate the tools for RTEMS 4.10 on CentOS 7 or Debian 8 (Jessie) using RTEMS Source Builder 0.5.0.

The current version of CentOS 7 uses texinfo version 5.1 as its default textinfo package. Debian 8 uses version 5.2. The makeinfo >= 5.0 are currently not supported for 4.10/rtems-*, for instance. Use the following workaround if your compilation fails in consequence of incompatible makeinfo check on CentOS 7 and Debian 8:

$ cd ~/Downloads
$ wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13.tar.gz
$ tar -xzf texinfo-4.13.tar.gz
$ cd texinfo-4.13
$ ./configure --prefix=$HOME/development/texinfo-4.13
$ make 
$ make install

If you succeeded to build texinfo 4.13:

$ export PATH=$HOME/development/texinfo-4.13/bin:$PATH

You are now ready to re-run RSB with 4.10/rtems-[your-favorite-arch].

Arch Linux – setting up a Python 2 virtual environment

In modern versions of Arch Linux, python is now a shortcut to python3 from the python package. RSB will not function in Python 3, but you can set up a virtual environment for RSP with Python 2.

At a root terminal, install python2-virtualenv with pacman.

# pacman -S python2-virtualenv

Leave root and return to the user that you will be using to build RTEMS.

Change to a directory which you have permissions for where you wish the virtual environment to be set up, and create it by using the virtualenv2 command, like so:

$ cd development/rtems/rsb
$ virtualenv2 venv

where venv is the folder that will be created with the environment set up inside.

Activate it, and you should see the name of the virtual environment added to the prompt (PS1 variable):

$ source venv/bin/activate
(venv)$

You can now continue to follow the build instructions.