Search by Tags

Build TorizonCore


Article updated at 15 Jul 2019
Compare with Revision

Subscribe for this article updates


TorizonCore is the base operating system in which Torizon is built. It is a minimal Yocto-based embedded Linux image and, even though customers may usually stick to application development on top of containers, sometimes they may need to customize the base image for their needs.

The toradex-torizon-manifest project on Github repository contains a Repo manifest and setup scripts for the TorizonCore build system. If you want to modify, extend or port TorizonCore to a new hardware platform, this is the manifest repository to use.

The build system uses various components from the Yocto Project, most importantly the OpenEmbedded build system, the bitbake task executor and various application and BSP layers.

Toradex TorizonCore is based on Linux microPlatform from and therefore requires the meta-lmp layer.

This article goes through the process of building TorizonCore on a host computer. In addition, we provide an environment in a Docker image for building TorizonCore:

Note: the article TorizonCore Build Environment is an extension, but not a replacement, for the current article.


You must have a host PC configured with the following prerequisites:

Download Metadata

To configure the scripts and download the build metadata, do:

$ mkdir ~/bin
$ PATH=~/bin:$PATH

$ curl > ~/bin/repo
$ chmod a+x ~/bin/repo

In addition, make sure you have Git user name and e-mail configured:

$ git config --global ""
$ git config --global "Your Name"

Run repo init to bring down the latest stable version of Repo. You must specify a URL for the manifest, which specifies the various repositories that will be placed within your working directory.

To check out the latest TorizonCore release:

$ repo init -u -b master

A successful initialization will end with a message stating that Repo is initialized in your working directory. Your client directory should now contain a .repo directory where files such as the manifest will be kept.

To pull down the metadata sources to your working directory from the repositories as specified in the Linux microPlatform manifest, run:

$ repo sync

When downloading from behind a proxy (which is common in some corporate environments), it might be necessary to explicitly specify the proxy that is then used by repo:

$ export HTTP_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>
$ export HTTPS_PROXY=http://<proxy_user_id>:<proxy_password>@<proxy_server>:<proxy_port>

More rarely, Linux clients experience connectivity issues, getting stuck in the middle of downloads (typically during "Receiving objects"). It has been reported that tweaking the settings of the TCP/IP stack and using non-parallel commands can improve the situation. You need root access to modify the TCP setting:

$ sudo sysctl -w net.ipv4.tcp_window_scaling=0
$ repo sync -j1

Setup Environment

Supported MACHINE targets (officially tested by Toradex):

  • colibri-imx7 - Colibri i.MX7 (eMMC & raw NAND*)
  • colibri-imx6 - Colibri i.MX6
  • colibri-imx6ull - Colibri i.MX6ULL*
  • apalis-imx6 - Apalis i.MX6

Note: Raw NAND-based modules are currently supported only by experimental releases and they may not be supported in the stable versions of TorizonCore.

Supported image targets:

  • torizon-core-docker
  • torizon-core-balena
  • torizon-core-lite

The default distribution (DISTRO) variable is automatically set to torizon, which is provided by the meta-toradex-torizon layer.

Setup the work environment by using the setup-environment script:

$ [MACHINE=<MACHINE>] source setup-environment [BUILDDIR]

If MACHINE is not provided, the script will list all possible machines and force one to be selected.

Start Building

To build the TorizonCore image:

The above setup script should properly prepare the environment with correct defaults. Additionally you'll want to modify the local.conf file by adding ACCEPT_FSL_EULA="1".

$ bitbake torizon-core-docker

Building Torizon Tools Container

To build the Torizon-Tools-Container image:

The above setup script should properly prepare the environment with correct defaults.

You just need to change distro inside conf/auto.conf to DISTRO ?= "torizon-container".

Additionally you'll want to modify the local.conf file by adding ACCEPT_FSL_EULA="1".

$ bitbake torizon-core-tools-container