Introduction
This project is used to set up a development environment for RTEMS on a Linux system. Basic development tools like “make” and “gcc” should already be installed, everything else including the complete cross-development tool chain is downloaded from the internet and built locally.
Why not use the RTEMS_source_builder directly ?
The RTEMS_source_builder for older versions of RTEMS is no longer maintained and has some problems when run on modern linux systems.
The goal of this project is to make the installation of the RTEMS toolchain as easy as possible. In the easiest case, you just have to provide a base configuration directory, everything else works automatically.
Which scripts are needed ?
setup.sh is always needed to define the installation directory ‘INSTALLTOP’ in file ‘CONFIG.SITE’.
build-gcc.sh is only needed when gcc on your host system is too old for RTEMS. This builds a new gcc
build-python2.sh is only needed when you don’t have Python 2 and cannot install it with your package manager.
build-crosstools.sh is always needed, this builds the cross compiler toolchain.
build-kernel.sh is only needed when you want to create a bootable image with the RTEMS kernel.
Setting the environment to use the created programs
build-gcc.sh, build-python2.sh and build-crosstools.sh each create a file “setenv.sh” that can be sourced with:
source setenv.sh
to make the programs available in your shell.
Configuration files
There are three sorts of configuration files.
RTEMS specific configuration files
The configuration files for specific versions of RTEMS are named “CONFIG-RTEMS-M.N” where “M.N” are the RTEMS major and minor version number. For example for RTEMS 4.9 the configuration file is named:
CONFIG-RTEMS-4.9
These files are not intended to be changed.
Common configuration file
There is also a configuration file with common configuration settings, here you may change things to configure the program for your needs:
Configuration files for specific Linux Versions
Another category of configuration files is specific for a Linux Version. They are named “CONFIG.OS.[LINUXVERSION]”. For example there is a file for Debian 13 named:
CONFIG.OS.debian-13
These files contain default settings specific for some Linux distributions. rtems-from-scratch works without the need to change CONFIG.COMMON for all these distributions. If your distribution is not listed here, loading of this file is skipped. If you encounter problems you can edit CONFIG.COMMON directly. CONFIG.OS.[LINUXVERSION] files are mainly used to build RTEMS crosstools in a container so no editing of configuration files is needed (see Docker / podman support).
Multi version support
You can build the RTEMS cross compiler toolchain for more than one RTEMS version by invoking the build script build-crosstools.sh again with a different configuration file. You do not have to check out rtems-from-scratch again to do this.