13. Source Builder — RTEMS User Manual 5.4-rc2 (21st August 2026) documentation

# 13. Source Builder

The RTEMS Source Builder or RSB is a tool to build packages from source. The RTEMS project uses it to build it’s compilers, tools, kernel and 3rd party packages. The tool is aimed at developers of software for RTEMS who use tool sets for embedded development.

The RSB consolidates the details you need to build a package from source in a controlled and verifiable way. The RSB is not limited to building tools for RTEMS, you can build bare metal development environments.

The RSB section of this manual caters for a range of users from new to experienced RTEMS developers who want to understand the RTEMS Source Builder. New users who just want to build tools should follow Quick Start in this manual. Users building a binary tool set for release can read the “Installing and Tar Files”. Users wanting to run and test bleeding edge tools or packages, or wanting update or extend the RSB’s configuration can read the remaining sections.

Embedded development typically uses cross-compiling tool chains, debuggers, and debugging aids. Together we call these a tool set. The RTEMS Source Builder is designed to fit this specific niche but is not limited to it. The RSB can be used outside of the RTEMS project and we welcome this.

The RTEMS Source Builder is typically used to build a set of packages or a build set. A build set is a collection of packages and a package is a specific tool, for example GCC, GDB, or library of code and a single build set can build them all in a single command. The RTEMS Source Builder attempts to support any host environment that runs Python and you can build the package on. The RSB is not some sort of magic that can take any piece of source code and make it build. Someone at some point in time has figured out how to build that package from source and taught this tool.

The RTEMS Source Builder is known to work on:

- ArchLinux

- CentOS

- Fedora

- Raspbian

- Ubuntu (includes XUbuntu)

- Linux Mint

- openSUSE

- FreeBSD

- NetBSD

- Solaris

- MacOS

- Windows

The RTEMS Source Builder has two types of configuration data. The first is the build set. A build set describes a collection of packages that define a set of tools you would use when developing software for RTEMS. For example the basic GNU tool set is Binutils, GCC, and GDB and is the typical base suite of tools you need for an embedded cross-development type project. The second type of configuration data are the configuration files and they define how a package is built. Configuration files are scripts loosely based on the RPM spec file format and they detail the steps needed to build a package. The steps are preparation, building, and installing. Scripts support macros, shell expansion, logic, includes plus many more features useful when build packages.

The RTEMS Source Builder does not interact with any host package management systems. There is no automatic dependence checking between various packages you build or packages and software your host system you may have installed. We assume the build sets and configuration files you are using have been created by developers who do. Support is provided for package config or `pkgconfig` type files so you can check and use standard libraries if present. If you have a problem please ask on our Developers Mailing List.

Bug Reporting

If you think you have found a problem please see Bugs, Crashes, and Build Failures.

- 13.1. Why Build from Source?
- 13.2. Project Sets
  - 13.2.1. Bare Metal
  - 13.2.2. RTEMS
  - 13.2.3. Patches
    - 13.2.3.1. Testing a Newlib Patch
- 13.3. Cross and Canadian Cross Building
  - 13.3.1. Cross Building
  - 13.3.2. Canadian Cross Building
- 13.4. Third-Party Packages
  - 13.4.1. Vertical Integration
  - 13.4.2. Building
  - 13.4.3. Adding
  - 13.4.4. Host and Build Flags
  - 13.4.5. BSP Support
  - 13.4.6. BSP Configuration
- 13.5. Configuration
  - 13.5.1. Source and Patches
    - 13.5.1.1. HTTP, HTTPS, and FTP
    - 13.5.1.2. GIT
  - 13.5.2. Macros and Defaults
    - 13.5.2.1. Macro Maps and Files
    - 13.5.2.2. Personal Macros
  - 13.5.3. Configuration Reports
    - 13.5.3.1. Report Mailing
  - 13.5.4. Build Set Files
  - 13.5.5. Configuration Control
  - 13.5.6. Personal Configurations
  - 13.5.7. New Configurations
    - 13.5.7.1. Layering by Including
    - 13.5.7.2. Configuration File Numbering
    - 13.5.7.3. Common Configuration Scripts
    - 13.5.7.4. DTC Example
    - 13.5.7.5. Debugging
  - 13.5.8. Scripting
    - 13.5.8.1. Expanding
    - 13.5.8.2. %prep
    - 13.5.8.3. %build
    - 13.5.8.4. %install
    - 13.5.8.5. %clean
    - 13.5.8.6. %include
    - 13.5.8.7. %name
    - 13.5.8.8. %summary
    - 13.5.8.9. %release
    - 13.5.8.10. %version
    - 13.5.8.11. %buildarch
    - 13.5.8.12. %source
    - 13.5.8.13. %patch
    - 13.5.8.14. %hash
    - 13.5.8.15. %echo
    - 13.5.8.16. %warning
    - 13.5.8.17. %error
    - 13.5.8.18. %select
    - 13.5.8.19. %define
    - 13.5.8.20. %undefine
    - 13.5.8.21. %if
    - 13.5.8.22. %ifn
    - 13.5.8.23. %ifarch
    - 13.5.8.24. %ifnarch
    - 13.5.8.25. %ifos
    - 13.5.8.26. %else
    - 13.5.8.27. %endfi
    - 13.5.8.28. %bconf_with
    - 13.5.8.29. %bconf_without
- 13.6. Commands
  - 13.6.1. Checker (sb-check)
  - 13.6.2. Defaults (sb-defaults)
  - 13.6.3. Set Builder (sb-set-builder)
  - 13.6.4. Set Builder (sb-builder)
- 13.7. Building and Deploying Tool Binaries
- 13.8. Bugs, Crashes, and Build Failures
  - 13.8.1. Contributing
- 13.9. History