...
This page describes how to build the TorizonOS Torizon OS for the STM32MPx development boards including STM32MP257x-EV1, STM32MP257x-DKx and STM32MP157x-DKx.
...
The base principles for building the TorizonOS Torizon OS for STM32MP architecture are the same as for the other targets described in the official TorizonOS Torizon OS documentation: https://developer.toradex.com/torizon/in-depth/build-torizoncore-from-source-with-yocto-projectopenembedded/.
...
meta-st-stm32mp
- BSP Layer for the STM32MP targets developed by STMicroelectonics for the OpenSTLinux project https://wiki.st.com/stm32mpu/wiki/Category:Yocto-based_OpenSTLinux_embedded_softwaremeta-torizon-st
- adaptation of the STM32MP BSP for TorizonOS Torizon OS developed by EmCraft.
What follows is the instructions on how to integrate these two layers in to the general TorizonOS Torizon OS Yocto project and then build TorizonOS Torizon OS for the STM32MP targets.
3. Preparing BSP for Build
...
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"
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
Create a working directory for the Yocto build and go to it:
Code Block $ cd ~ $ mkdir ~/yocto-workdir $ cd ~/yocto-workdir
Initialize the TorizonOS Torizon OS Repo:
Code Block $ repo init -u git://git.toradex.com/toradex-manifest.git -b kirkstone-6.x.y -m torizoncore/default.xml
Sync the repositories:
Code Block $ repo sync
Download the ST32MP2 BSP layer:
Code Block $ git -C layers clone -b mickledore https://github.com/STMicroelectronics/meta-st-stm32mp
Download the ST32MP2 Torizon compatibility layer:
Code Block $ git -C layers clone -b kirkstone git@github.com:EmcraftSystems/meta-torizon-st.git
Replace the setup environment link and the Docker build link:
Code Block $ ln -sf layers/meta-torizon-st/scripts/setup-environment setup-environment
...
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
In the docker console setup the environment for the certain STM32MP board:
MACHINE=<MACHINE> source setup-environment [BUILDDIR]
. WhereMACHINE
is one of the supported STM32MP targets:stm32mp25-eval
for the STM32MP2 Evaluation kit,stm32mp25-eval
for the STM32MP2 Discovery kit orstm32mp25-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
Build the TorizonOS Torizon OS images:
Code Block $$ bitbake torizon-core-docker
...
When build has successfully completed, the following artifacts located in the $BUILDDIR/deploy/images/$MACHINE
can be used to install TorizonOS Torizon OS to the STM32MP target board (refer to Installing TorizonOS to STM32MP Target Boards Using the STM32 Programmer Tool):
...
arm-trusted-firmware/
:tf-a-stm32mp257f-ev1-usb.stm32
- FSBL to boot the STM32MP2 targets over USB for the initial installationtf-a-stm32mp257f-ev1-optee-emmc.stm32
- FSBL to be installed and boot the STM32MP2 targets from eMMCtf-a-stm32mp257f-ev1-optee-sdcard.stm32
- FSBL to be installed and boot the STM32MP2 targets from SD cardmetadata.bin
- FSBL metadata.
fip/
:fip-stm32mp257f-ev1-ddr-optee-emmc.bin
- required to initialize DDRfip-stm32mp257f-ev1-ddr-optee-sdcard.bin
- required to initialize DDRfip-stm32mp257f-ev1-optee-emmc.bin
- main bootloader image for eMMCfip-stm32mp257f-ev1-optee-sdcard.bin
- main bootloader image for SD card
flashlayout_torizon-core-docker/optee/:
FlashLayout_emmc_stm32mp257f-ev1-optee.tsv
- eMMC layout to be used with the STM32_ProgrammerFlashLayout_sdcard_stm32mp257f-ev1-optee.tsv
- SD card layout to be used with the STM32_Programmer
torizon-core-docker-stm32mp25-eval.ota-ext4
- main TorizonOS Torizon OS OSTree based image, including the Linux kernel images and the root file system.
...