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 required 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. Steps to Run Yocto Builds inside Container
TI provides a Ubuntu 22.04 based docker image with all the packages that are required to start a Yocto Build.
The Docker Image is hosted on ghcr.io/texasinstruments.
Refer Steps to Run Yocto builds inside a Container for a comprehensive guide.
Follow Processor SDK Build Reference for Layer Configuration and Build Options.
Attention
Before starting the container, ensure that you have completed all the Pre-Requisites as mentioned here.
1.2.3. Steps to Run Yocto Builds on Host
1.2.3.1. Prerequisites (One-time setup)
Host Setup - Ubuntu (Recommended)
The recommended Linux distribution is Ubuntu 22.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 22.04, please run the following:
$ sudo apt-get update
$ # Install packages required for builds
$ sudo apt-get -f -y install \
git build-essential diffstat texinfo gawk chrpath socat doxygen \
dos2unix python3 bison flex libssl-dev u-boot-tools mono-devel \
mono-complete curl python3-distutils repo pseudo python3-sphinx \
g++-multilib libc6-dev-i386 jq git-lfs pigz zstd liblz4-tool \
cpio file lz4 debianutils iputils-ping python3-git python3-jinja2 \
python3-subunit locales libacl1 unzip gcc python3-pip python3-pexpect \
xz-utils wget \
$ sudo locale-gen en_US.UTF-8
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
Important
Be sure to select “No” when you are asked to use dash as the default system shell.
Large Swap File
Building large packages, especially several at a time, requires a lot of working memory for a computer. For computers with 32 GB of RAM or more, this should not be a problem. For computers with less RAM, a swap file of ~16GB may be needed to build large packages. Creating a large swap file, or resizing a small swap file to be larger will help avoid build errors for large packages.
Proxy Setup
If working behind a proxy, please see Working Behind a Network Proxy.
1.2.3.2. Build Steps
Please refer to here for the
layer configuration oeconfig-file
for a particular release of Processor SDK Linux AM62x.
The MACHINE can be set to am62xx-evm, for example.
The final command below will build the tisdk-default-image
, which is the
Processor SDK image with arago filesystem. See Build Options for a list of
additional targets.
$ git clone https://git.ti.com/git/arago-project/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/processor-sdk/<oeconfig-file>
$ cd build
$ . conf/setenv
$ MACHINE=<machine> bitbake -k tisdk-default-image
$ git clone https://git.ti.com/git/arago-project/oe-layersetup.git tisdk
$ cd tisdk
$ ./oe-layertool-setup.sh -f configs/processor-sdk/<oeconfig-file>
$ cd build
$ . conf/setenv
$ MACHINE=<machine> ARAGO_RT_ENABLE=1 bitbake -k tisdk-default-image
Your newly built wic image will be generated in deploy-ti directory. Use Linux SD Card Creation Guide to flash this image on the SD-Card.
Important
The Yocto build will need ~750GB of hard disk space for building the tisdk-default-image
which includes Chromium.
Tip
The tisdk-default-image
now includes Chromium by default, which may increase the build
time. If you prefer not to build Chromium, you can remove the meta-browser layer from
the oeconfig-file before running oe-layertool-setup.sh
However, if you are building the tisdk-default-image
specifically to try out the TI Apps Launcher out-of-the-box (OOB),
it is not recommended to remove the meta-browser layer. The TI Apps Launcher relies on
Chromium and removing the layer may impact its functionality. Keep the meta-browser layer
intact for the best OOB experience.
Tip
If your computer is frequently crashing while running the bitbake command, edit the
conf/local.conf
file under build
directory and set the variables: BB_NUMBER_THREADS
and PARALLEL_MAKE
to cap the number of threads bitbake can create at a time. By default bitbake tries to automatically figure out and
set the maximum values for these variables on your system which may lead to errors.
Caution
While building images via Yocto, if you are facing locale.Error: unsupported locale setting error, it means your system is trying to use a locale setting which was not there. Run the following commands which will setup the locale and try building your target image again.
export LC_ALL="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
ulimit -n 4096
1.2.4. Processor SDK Build Reference
The following sections provide information for configuration, build options, and supported platforms of the Processor SDK.
1.2.4.1. Layer Configuration
Please refer to here for the layer configuration for a particular release of Processor SDK Linux.
1.2.4.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 deploy-ti directory.
Target |
Build Output |
Description |
---|---|---|
tisdk-default-image |
images/<machine>/tisdk-default-image-<machine>.rootfs.tar.xz |
Target Filesystem |
tisdk-jailhouse-image |
images/<machine>/tisdk-jailhouse-image-<machine>.rootfs.tar.xz |
Jailhouse Filesystem |
tisdk-base-image |
images/<machine>/tisdk-base-image-<machine>.rootfs.tar.xz |
Minimal Target Filesytem |
tisdk-thinlinux-image |
images/<machine>/tisdk-thinlinux-image-<machine>.rootfs.tar.xz |
Minimal Target Filesytem with docker enabled |
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 |
am62xx-evm |
AM62x Starter Kit (SK) - GP, HS-FS, HS-SE |
am62xx-lp-evm |
AM62x LP Starter Kit (SK) - HS-FS, HS-SE |
am62xxsip-evm |
AM62x-SIP Starter Kit (SK) - HS-FS, HS-SE |
beagleplay |
BEAGL-PLAY-SBC - GP |
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 |
am62xx-evm |
AM62x Starter Kit (SK) - GP, HS-FS, HS-SE |
am62xx-lp-evm |
AM62x LP Starter Kit (SK) - HS-FS, HS-SE |
am62xxsip-evm |
AM62x-SIP Starter Kit (SK) - HS-FS, HS-SE |
beagleplay |
BEAGL-PLAY-SBC - GP |
1.2.4.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=<machine> bitbake opencl
After the bitbake command above is successfully done,
arago-tmp-[toolchain]/work/<machine>-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/<machine>-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=<machine> bitbake opencl --force -c compile
MACHINE=<machine> 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/<machine>-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
or
MACHINE=<machine> bitbake <target> -c cleanall
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.5. See also
General information on Yocto, OpenEmbedded and Arago projects can be found at: