Building Renode from source

This document provides detailed information on how to prepare the build environment, and then build and test Renode itself.

Prerequisites

Core prerequisites

The following instructions have been tested on Ubuntu 16.04, however there should not be any major issues preventing you from using other (especially Debian-based) distributions as well.

First, install the mono-complete package as per the installation instructions for various Linux distributions which can be found on the Mono project website.

To install the remaining dependencies, use:

sudo apt-get update
sudo apt-get install git automake autoconf libtool g++ coreutils policykit-1 \
             libgtk2.0-dev screen uml-utilities gtk-sharp2 python3

Downloading the source code

Renode’s source code is available on GitHub:

git clone https://github.com/renode/renode.git

Submodules will be automatically initialised and downloaded during the build process, so you do not need to do it at this point.

Additional prerequisites (for Robot framework testing)

If you followed the instructions above, Python should be installed in your system. Install the pip package manager and some additional modules to enable writing and running test cases with the Robot framework:

python3 -m pip install -r tests/requirements.txt

Building Renode

Note

On Windows, the building process described in this section can only be executed in a Cygwin shell.

To build Renode, run:

./build.sh

There are some optional flags you can use:

-c          clean instead of building
-d          build in debug configuration
-v          verbose mode
-p          build binary packages (requires some additional dependencies)

You can also build Renode.sln from your IDE (like MonoDevelop or Visual Studio), but the build.sh script has to be run at least once.

Creating packages

The build script can create native packages only, i.e., you must run it on Windows to create an .msi installer package, on Linux for .deb, .rpm and .pkg.tar.xz packages or on macOS for the .dmg image.

There is also a separate procedure to create Conda packages, described in a dedicated README.

Prerequisites

Depending on the system, there may be some prerequisites for building Renode packages.

Run:

sudo apt-get install ruby ruby-dev rpm 'bsdtar|libarchive-tools'
sudo gem install fpm

Building

To build binary packages, run:

./build.sh -p

The packages will have a version assigned to them, defined by the contents of the tools/version file.

You can also build nightly packages with:

./build.sh -pn

This will append a date and a commit SHA to the output files.

Location of packages

After completing successfully, the script will print the location of the files created:

renode/output/packages/renode_<version>.{deb|rpm|tar.gz}