Getting started

The instructions mentioned on this page is a one time setup (per workspace).

1. Install repo

Note that here you don’t install a huge SDK, it’s simply a Python script that you download and put in your $PATH, that’s it. Exactly how to “install” repo, can be found at the Google repo pages, so follow those instructions before continuing.

2. Getting the source code

Now we will check out code for the TRS. This step is light weight and only check out code necessary to build TRS. There are two flavors right now, either you checkout the one tracking lastest on all gits or you’ll checkout a certain release (the difference is in the repo init line, as highlighted).

For latest, do the this:

 $ mkdir trs-workspace
 $ cd trs-workspace
 $ repo init -u https://gitlab.com/Linaro/trusted-reference-stack/trs-manifest.git -m default.xml
 $ repo sync -j3

For a specific release, do the this:

 $ mkdir trs-workspace
 $ cd trs-workspace
 $ repo init -u https://gitlab.com/Linaro/trusted-reference-stack/trs-manifest.git -m default.xml -b <release-tag>
 $ repo sync -j3

3. Installing prerequisites

TRS depends on a couple of packages that needs to be present on the host system. These are installed as distro packages and using Python pip.

Host / apt packages

This will require your sudo password, from the root of the workspace:

$ cd <workspace root>
$ make apt-prereqs

This will install the following packages:

acpica-tools
adb
autoconf
automake
bc
bison
build-essential
ccache
chrpath
cpio
cscope
curl
device-tree-compiler
diffstat
expect
fastboot
file
flex
ftp-upload
gawk
gdisk
inetutils-ping
iproute2
libattr1-dev
libcap-dev
libfdt-dev
libftdi-dev
libglib2.0-dev
libgmp3-dev
libhidapi-dev
libmpc-dev
libncurses5-dev
libpixman-1-dev
libssl-dev
libtool
lz4
make
make
mtools
netcat-openbsd
ninja-build
pip
python3-cryptography
python3-pip
python3-pyelftools
python3-serial
python3-venv
python-is-python3
qemu-system-aarch64
rsync
sudo
unzip
uuid-dev
wget
xdg-utils
xdg-utils
xterm
xz-utils
zlib1g-dev
zstd

Python packages

By default all python packages will be installed at <workspace root>/.pyvenv using a virtual Python enviroment. The benefits by doing so is that if we delete the .pyvenv folder, there will be no traces left of the Python packages needed for TRS. It can eventually also avoid clashing with tools needing other versions of some Python packages.

$ cd <workspace root>
$ make python-prereqs

4. Target specific builds

After following the steps above, please continue with the target specific instructions:

  1. Install QEMU

  2. Instll RockPi4