1.2. Building the SDK

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

Run the following commands to install the ARM Toolchain.

$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf.tar.xz -C $HOME
$ wget https://developer.arm.com/-/media/Files/downloads/gnu-a/9.2-2019.12/binrel/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz
$ tar -Jxvf gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu.tar.xz -C $HOME

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 am335x-evm.

The final command below will build the tisdk-base-image, which is the minimal Processor SDK filesystem. See Build Options for a list of additional targets.

$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/core-sdk/core-sdk-<version>-config.txt
$ cd build
$ . conf/setenv
$ export TOOLCHAIN_PATH_ARMV7=$HOME/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
$ export TOOLCHAIN_PATH_ARMV8=$HOME/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu

$ MACHINE=<machine> bitbake tisdk-base-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-tisdk-bundle images/<machine>/processor-sdk-linux-bundle-<machine>.tar.xz Full SDK
tisdk-default-image images/<machine>/tisdk-default-image-<machine>.tar.xz Target Filesystem
tisdk-base-image images/<machine>/tisdk-base-image-<machine>.tar.xz Minimal Target Filesytem
meta-toolchain-arago-tisdk sdk/arago-<arago-version>-<architecture>.sh Devkit

Platforms

The following platforms are supported in Processor SDK. These are the <machine> in the command:

MACHINE=<machine> bitbake <target>

MACHINE Supported EVMs
am335x-evm AM335x EVM, AM335x Starter Kit, Beaglebone Black
am437x-evm AM437x GP EVM, AM437x Starter Kit
am57xx-evm AM572x GP EVM, AM572x Industrial Development Kit, AM571x Industrial Development Kit
am64xx-evm AM64x GP EVM, AM64x Starter Kit (SK) EVM
am65xx-evm AM65x Evaluation Module, AM65x Industrial Development Kit, DRA80xM Evaluation Module
k2hk-evm 66AK2Hx EVM , K2K EVM
k2e-evm K2Ex EVM
k2l-evm 66AK2L06 EVM
k2g-evm K2G EVM
omapl138-lcdk OMAP-L138 LCDK

RT Support

Processor SDK Linux supports RT Linux Kernel for the following machines/EVMs. Use the command below to make the RT builds:

MACHINE=<machine> ARAGO_RT_ENABLE=1 bitbake <target>

MACHINE Supported EVMs
am335x-evm AM335x EVM, AM335x Industrial Communications Engine
am437x-evm AM437x GP EVM, AM437x Industrial Development Kit
am57xx-evm AM572x GP EVM, AM574x Industrial Development Kit, AM572x Industrial Development Kit, AM571x Industrial Development Kit
am64xx-evm AM64x GP EVM, AM64x Starter Kit (SK) EVM
am65xx-evm AM65x Evaluation Module, AM65x Industrial Development Kit, DRA80xM Evaluation Module
k2hk-evm 66AK2Hx EVM , K2K EVM
k2e-evm K2Ex EVM
k2l-evm 66AK2L06 EVM
k2g-evm K2G EVM

Using source package snapshot

Using the snapshot of the arago source packages can avoid fetch errors during the build when external URLs become unavailable. To use the snapshot of sources distributed with a given Processor SDK release, you must download a script from the SDK download page and then execute it on your host to fetch all the packages from TI servers. For example, see ti-processor-sdk-linux-[platform]-<version>-Linux-x86-Install.bin in AM335X-Linux-SDK-Download-page.

Once this package is downloaded, there are just a few extra steps in the build process to fetch all the corresponding packages. The extra steps are shown in red below:

$ git clone git://arago-project.org/git/projects/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/processor-sdk/processor-sdk-<version>-config.txt
$ mkdir downloads
$ cd downloads
$ # Assuming src file downloaded to $HOME/Downloads
$ tar xvf $HOME/Downloads/<target-board>-linux-sdk-arago-src-##.##.##.##.tar.xz
$ <target-board>-linux-sdk-arago-src-##.##.##.##/get_build_sources.sh <target-board>-linux-sdk-arago-src-##.##.##.##/source_pkg_list.txt
$ cd ..</span>
$ cd build
$ . conf/setenv
$ export TOOLCHAIN_PATH_ARMV7=$HOME/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf
$ export TOOLCHAIN_PATH_ARMV8=$HOME/gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu
$ MACHINE=<target-board> bitbake arago-core-tisdk-bundle

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 opencl recipe and all the dependencies it defines.

MACHINE=am57xx-evm bitbake opencl

After the bitbake command above is successfully done, arago-tmp-[toolchain]/work/am57xx_evm-linux-gnueabi/opencl 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/am57xx_evm-linux-gnueabi/opencl/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=am57xx-evm bitbake opencl --force -c compile

MACHINE=am57xx-evm bitbake opencl

Installing Package

To install a modified and rebuilt package, copy the new IPKs from the deploy-ipks folder (e.g., arago-tmp-[toolchain]/work/am57xx_evm-linux-gnueabi/opencl/[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

Rebuilding without SGX

In Processor SDK delivered today the graphics hardware acceleration is enabled by default for device families with SGX (e.g. AM335x, AM437x, AM57xx). As a result, some of the applications with graphics dependencies will not run properly on device variants in those families that do not contain the SGX accelerator (e.g. AM3352, AM4372, etc.). The Processor SDK has been enhanced to provide the same OOB experience with software rendering provided by QT5/Weston. The non-SGX software rendering build will be enabled by adding the following to the bottom of conf/local.conf immediately before invoking bitbake.

MACHINE_FEATURES_remove="sgx"

PACKAGECONFIG_remove="wayland-egl"

Rebuilding without Wayland

If a full Window system is not needed, i.e. if you simply want apps to run full screen using EGLFS then you can remove Wayland by adding the following to the bottom of conf/local.conf immediately before invoking bitbake:

DISTRO_FEATURES_remove = "wayland"

X11 Build instructions

X11 has been validated as a build option, on top of Processor SDK 4.1 release. In order to build with X11 instead of Wayland, please use the configuration processor-sdk-04.01.00.06-x11-config.txt for oe-layer-setup. One of the key differences between this configuration file and the processor-sdk-04.01.00.06 config file is the branch from meta-processor-sdk. For X11 build, morty-x11-experimental branch is used, where the DISTRO_CONFIG is set to X11 instead of wayland.

X11 Filesystem

All the X11 related components are provided by the IMG DDK X11 package and located under /usr/local/XSGX directory instead of /usr/include and /usr/lib directories. The following applications and demos are built and verified with X11:

  • SGX unitest programs: xgles1tests, xgles2test1, and etc.
  • PVR SDK 3D demo programs: ChameleonMan, ExampleUI, and etc.
  • QT5 Examples and demo programs over eglfs.x11 including matrix-gui-browser

In the X11 build, the xorg (Xserver) is running and owns the DSS resources by default. To support switching between X11 applications and non-X11 applications such as DRM modetest and gstreamer pipelines, the following shell file is provided to stop and start the Xserver.

/etc/init.d/xorg <start|stop>

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.