1.2. Building the SDK with Yocto

1.2.1. Introduction

This page provides the steps to build the Processor SDK and individual components from source. The Processor SDK build is based on the Arago Project which provides a set of layers for OpenEmbedded and the Yocto Project targeting TI platforms.

This page will provide the basic steps require to recreate the Processor SDK along with a reference of Processor SDK specific configurations, build targets, and target devices. Also, tips and suggestions are provided along with links for more in-depth information.

1.2.2. Quick Start

1.2.2.1. Prerequisites (One-time setup)

The recommended Linux distribution is Ubuntu 16.04 or Ubuntu 18.04.

The following build host packages are required for Ubuntu. The following command will install the required tools on the Ubuntu Linux distribution.

For Ubuntu 16.04 and 18.04, please run the following:

$ sudo apt-get install build-essential autoconf automake bison flex libssl-dev bc u-boot-tools python diffstat texinfo gawk chrpath dos2unix wget unzip socat doxygen libc6:i386 libncurses5:i386 libstdc++6:i386 libz1:i386 g++-multilib

By default Ubuntu uses “dash” as the default shell for /bin/sh. You must reconfigure to use bash by running the following command:

sudo dpkg-reconfigure dash

Be sure to select “No” when you are asked to use dash as the default system shell.

Proxy Setup

If working behind a proxy, please see Working Behind a Network Proxy.

Cross-Compile Toolchain

Download the toolchain compilers from the links provided in the SDK release page. Keep the extracted toolchains in the $HOME directory of host Linux machine. Use $HOME directory as the PATH_TO_TOOLCHAIN in following command.

Note

For building all SDK components, you need two compilers. ARMv8 for software running on A72 ARMv7 for software running on R5F Make sure to download both of these toolchains before starting yocto build.

1.2.2.2. Build Steps

Please refer to here for the layer configuration for a particular release of Processor SDK Linux. See Build Options for a list of additional targets. The MACHINE can be set to j7-evm.

cd yocto-build
./oe-layertool-setup.sh -f configs/processor-sdk-linux/processor-sdk-linux-<version>.txt
cd build
echo "INHERIT += \"own-mirrors\"" >> conf/local.conf
echo "SOURCE_MIRROR_URL = \"http://software-dl.ti.com/processor-sdk-mirror/sources/\"" >> conf/local.conf
echo "ARAGO_BRAND  = \"psdkla\"" >> conf/local.conf
echo "DISTRO_FEATURES_append = \" virtualization\"" >> conf/local.conf
echo "IMAGE_INSTALL_append = \" docker\"">> conf/local.conf
. conf/setenv
TOOLCHAIN_BASE=<PATH_TO_TOOLCHAIN> MACHINE=<machine> bitbake -k tisdk-default-image

1.2.3. Processor SDK Build Reference

The following sections provide information for configuration, build options, and supported platforms of the Processor SDK.

1.2.3.1. Layer Configuration

Please refer to here for the layer configuration for a particular release of Processor SDK Linux.

1.2.3.2. Build Options

Images

In addition to individual components packages, the following table provides a list of build targets supported. These are the <target> used in the command:

MACHINE=<machine> bitbake <target>

The “Build Output” is given relative to the arago-tmp-[toolchain]/deploy directory.

Target Build Output Description
arago-core-psdkla-bundle arago-tmp-external-arm-glibc/deploy/images/<machine-name>/tisdk-default-image-<machine-name>.tar.xz Full SDK
tisdk-default-image arago-tmp-external-arm-glibc/deploy/images/<machine-name>/arago-core-psdkla-bundle-<machine-name>.tar.xz Target Filesystem

1.2.3.3. Recipes

Recipe Basics

One or more recipes can be specified for the <target> for greater granularity of recipe development and debug. Specifying a recipe name, minus the version (if the version is appended to the name), will build the recipe and all its dependencies.

For example, the command below builds only the jailhouse recipe and all the dependencies it defines.

MACHINE=<machine> bitbake jailhouse

After the bitbake command above is successfully done, arago-tmp-[toolchain]/work/<machine>-linux/jailhouse directory will be available including the original source code under the git folder, independent shared objects (.so files) under packages-split folder, and IPKs under deploy-ipks folder.

Note

Please note that the output of a recipe can be in another folder under “arago-tmp-[toolchain]/work” directory, depending on the defines of the recipe.

Forced Re-compilation

When needed, source code under the work directory (e.g., arago-tmp-[toolchain]/work/<machine>-linux/jailhouse/git) can be modified. After the modification is done, run the following commands to force recompilation with the new code and rebuilding of the recipe, e.g.,

MACHINE=<machine> bitbake jailhouse --force -c compile

MACHINE=<machine> bitbake jailhouse

Installing Package

To install a modified and rebuilt package, copy the new IPKs from the deploy-ipks folder (e.g., arago-tmp-[toolchain]/work/<machine>-linux/jailhouse/[version]/deploy-ipks) to the target system and then run the following command to install the IPKs:

opkg install [package_ipk].ipk

Cleaning a Built Recipe

A built recipe can be cleaned using:

MACHINE=<machine> bitbake <target> -c cleansstate

The cleansstate task will clean recipe’s work directory and remove the recipe’s output from the dependency tree used by other recipe’s during compilation.

1.2.4. Common Variations

N/A

1.2.5. See also

General information for building TI SDKs using the Arago Project can be found at Arago Project: Setting Up The Build Environment. This page contains information on the build host prerequisites, such as installing the toolchain, and required host packages and configuration, and the basic steps required to create an SDK completely from source. Once the Arago Project information is familiar, read the next section for a reference of layer configurations, build targets, and platforms supported by the Processor SDK.