How to build the RTEMS kernel

Prerequisites

RTEMS cross tools have to be installed for this. (see crosstools).

Introduction

The RTEMS kernel is not built directly but with the project “rtems-build-tool”. This project not just builds the RTEMS kernel but creates a bootable image that is used at the mvme2100-cpu here at the Helmholtz-Zentrum Berlin.

For RTEMS 4.9 this image also contains “cexp” and “GeSys”. Both are needed to have an interactive shell and support for a startup-script that is executed after the kernel is loaded.

All later RTEMS versions basically only contain the RTEMS kernel.

How to build

You first have to review or change some configuration variables in file CONFIG.COMMON. (see common configuration variables).

Review RTEMS kernel directory settings

Variable

default value

explanation

RTEMS_BUILD_TOOL_SRC_DIR

$TOP/src/kernel/$RTEMS_VERSION

Directory where rtems-build-tool sources are put

RTEMS_BUILD_TOOL_INSTALL_DIR

$INSTALLTOP/rtems/$RTEMS_VERSION

Directory where rtems-build-tool is installed

RTEMS_BUILD_TOOL_URL

https://www-csr.bessy.de/ cgi-bin/hgweb.cgi/rtems-build-tool

URL where RTEMS_BUILD_TOOL_URL is downloaded from

RTEMS_BUILD_TOOL_TESTS

“no”

If set to “yes”, RTEMS tests are built too

Build the cross tools

Just enter:

bin/build-kernel.sh CONFIGFILE

where CONFIGFILE is the file “CONFIG-RTEMS-NN” that specifies the RTEMS version.