Skip to content
README.md 2.37 KiB
Newer Older
Salome Thirot's avatar
Salome Thirot committed
Build scripts for Total Compute stack
=====================================
Salome Thirot's avatar
Salome Thirot committed
This README is simply a quick-start guide on the build scripts themselves. For more
information on how to obtain and run the Total Compute stack, please refer to
the user guide.
Pre-requisites
--------------
Install and allow access to docker
```sh
sudo apt install docker.io
sudo chmod 777 /var/run/docker.sock
```
Salome Thirot's avatar
Salome Thirot committed
Setup
-----
Setup includes two parts:
1. Pull/Build a Docker image from Container registry
2. Setup the environmet to build TC images
To pull/build a docker image, patch the components and install the toolchains and build tools, run:
Salome Thirot's avatar
Salome Thirot committed
For Buildroot:
```sh
export PLATFORM=tc2
export FILESYSTEM=buildroot
Ryan Harkin's avatar
Ryan Harkin committed
```
Salome Thirot's avatar
Salome Thirot committed
For Android:
```sh
export PLATFORM=tc2
export FILESYSTEM=android-fvp
Salome Thirot's avatar
Salome Thirot committed
For Android with AVB (Android Verified Boot):
```sh
export PLATFORM=tc2
export FILESYSTEM=android-fvp
Salome Thirot's avatar
Salome Thirot committed
export AVB=true
Salome Thirot's avatar
Salome Thirot committed
Build the stack
---------------
Salome Thirot's avatar
Salome Thirot committed
To build the whole stack:
```sh
Annam Sai Manisha's avatar
Annam Sai Manisha committed
./run_docker.sh ./build-all.sh build
Annam Sai Manisha's avatar
Annam Sai Manisha committed
The platform and filesystem should already have been defined, but if not they can be defined on the command line using:
Salome Thirot's avatar
Salome Thirot committed
```sh
Annam Sai Manisha's avatar
Annam Sai Manisha committed
./run_docker.sh ./build-all.sh -p $PLATFORM -f $FILESYSTEM -a $AVB build
Salome Thirot's avatar
Salome Thirot committed
To build each component separately, run the corresponding script with the exact
same options.
Salome Thirot's avatar
Salome Thirot committed
Each script supports build, clean, patch and deploy commands.
build-all.sh also support the `all` command, for a clean complete build +
deploy.
Salome Thirot's avatar
Salome Thirot committed
Build files will be in output/tmp_build/$COMPONENT
The deployed binaries are then copied to output/deploy/$PLATFORM


Build Components and its dependencies
-------------------------------------

A new dependency to a component can be added in the form of $component=$dependency in dependencies.txt file

To build a component and rebuild those components that depend on it
```sh
Annam Sai Manisha's avatar
Annam Sai Manisha committed
./run_docker.sh ./$filename build with_reqs

Kernel Selftest
-------------------------------------

Test are located at /usr/bin/selftest on device

To run all the tests in one go, use run_selftest.sh script. Tests can be run individually also.
```sh
./run_kselftest --summary
```

Run FVP model from docker container
-----------------------------------

To run FVP in docker container export required licenses and run:
```sh
Annam Sai Manisha's avatar
Annam Sai Manisha committed
export MODEL_PATH=<Absolute path to model parent directory>
./run_docker.sh run_model -m Absolute_path_to_model -d distro_opts