Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
stylenone

1. Overview

This page describes how to build the TorizonOS for the STM32MPx development boards including STM32MP257x-EV1, STM32MP257x-DKx and STM32MP157x-DKx.

2. Understanding Build Structure

The base principles for building the TorizonOS for STM32MP architecture are the same as for the other targets described in the official TorizonOS documentation: https://developer.toradex.com/torizon/in-depth/build-torizoncore-from-source-with-yocto-projectopenembedded/.

...

What follows is the instructions on how to integrate these two layers in to the general TorizonOS Yocto project and then build TorizonOS for the STM32MP targets.

3. Preparing BSP for Build

Perform the following steps:

  1. Set up the default git user and e-mail:

    Code Block
    $ git config --global user.email "you@example.com"
    $ git config --global user.name "Your Name"
  2. Install the repo utility to the development host:

    Code Block
    $ mkdir ~/bin
    $ PATH=~/bin:$PATH
    $ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
    $ chmod a+x ~/bin/repo
  3. Create a working directory for the Yocto build and go to it:

    Code Block
    $ cd ~
    $ mkdir ~/yocto-workdir
    $ cd ~/yocto-workdir
  4. Initialize the TorizonOS Repo:

    Code Block
    $ repo init -u git://git.toradex.com/toradex-manifest.git -b kirkstone-6.x.y -m torizoncore/default.xml
  5. Sync the repositories:

    Code Block
    $ repo sync
  6. Download the ST32MP2 BSP layer:

    Code Block
    $ git -C layers clone -b mickledore https://github.com/STMicroelectronics/meta-st-stm32mp
  7. Download the ST32MP2 Torizon compatibility layer:

    Code Block
    $ git -C layers clone -b kirkstone git@github.com:EmcraftSystems/meta-torizon-st.git
  8. Replace the setup environment link and the Docker build link:

    Code Block
    $ ln -sf layers/meta-torizon-st/scripts/setup-environment setup-environment

4. Building BSP Images

Perform the following steps:

  1. Use the Docker container provided by Toradex to setup the build environment in the work directory ~/yocto-workdir prepared in previous steps:

    Code Block
    $ docker run --rm -it --name=crops6-minimal -v ~/yocto-workdir:/workdir --workdir=/workdir torizon/crops:kirkstone-6.x.y /bin/bash
  2. In the docker console setup the environment for the certain STM32MP board: MACHINE=<MACHINE> source setup-environment [BUILDDIR]. Where MACHINE is one of the supported STM32MP targets: stm32mp25-eval for the STM32MP2 Evaluation kit, stm32mp25-eval for the STM32MP2 Discovery kit or stm32mp25-eval for STM32MP1 Discovery kit, BUILDDIR in the directory where to store the build files. For example:

    Code Block
    $$ MACHINE=stm32mp25-eval DISTRO=torizon source setup-environment build-stm32mp25-eval
  3. Build the TorizonOS images:

    Code Block
    $$ bitbake torizon-core-docker

5. Understanding Build Outcome

When build has successfully completed, the following artifacts located in the $BUILDDIR/deploy/images/$MACHINE can be used to install TorizonOS to the STM32MP target board (refer to Installing TorizonOS to STM32MP2 EV1 Using the STM32 Programmer Tool):

...