ST Quick Start
Using Windows?
The Yocto build system requires a Linux environment. If you are on Windows, you can download the Engicam pre-configured Ubuntu virtual machine instead of setting up the toolchain manually. Download the Virtual Machine
There are two ways to set up the build environment:
- Engicam BSP Scripts (recommended) — a Docker-based helper that runs the build in an isolated container. No dependency on your host Linux distribution; works on any system with Docker installed.
- Native build — build directly on your Linux machine without Docker. You must ensure your distribution is compatible with the target Yocto release.
Regardless of the method chosen, the procedure is the same: download the BSP sources and build the image.
Build Environment Setup
Source: engicam-bsp-scripts
Engicam BSP Script
Install repo on Ubuntu
This script utilizes repo to download the correct source files.
To install the repo utility:
mkdir -p ~/.bin
PATH="${HOME}/.bin:${PATH}"
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo
chmod a+rx ~/.bin/repo
Install Docker Engine on Ubuntu
This script utilizes Docker in order to assure the compatibility between Yocto and Ubuntu versions.
To install Docker correctly you need to:
Setup the repository
Update the apt package index and install the following packages to allow apt to use a repository over HTTPS:
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates \
curl gnupg-agent software-properties-common linux-generic
Add Docker's official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint:
sudo apt-key fingerprint 0EBFCD88
You should get this same output:
pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <docker@docker.com>
sub rsa4096 2017-02-22 [S]
Use the following command to set up the stable repository:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable"
Install Docker Engine:
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
Download and use setup script
First you need to clone the git repository:
git clone https://github.com/engicam-stable/engicam-bsp-scripts.git
Go into the directory just created and launch the script to prepare the environment:
cd ~/engicam-bsp-scripts
./prepare_engicam_bsp --help
./prepare_engicam_bsp <branch> <version>
The next table will list all the available environments.
| branch | version |
|---|---|
| nxp | zeus |
| nxp | zeus-2.3 |
| nxp | gatesgarth |
| nxp | hardknott |
| nxp | honister |
| nxp | kirkstone |
| nxp | langdale |
| nxp | mickledore |
| nxp | scarthgap |
| st | dunfell |
| st | dunfell-5.10_icore |
| st | dunfell-5.10_ugea |
| st | kirkstone |
| st | mickledore |
| rockchip | kirkstone |
For example:
./prepare_engicam_bsp nxp zeus-2.3
or:
./prepare_engicam_bsp st dunfell
This procedure may take some time to complete. Once it\'s finished you can find all source code in the /yocto folder.
Note: to return to the same Docker environment you just need to relaunch the same command used to set it up the first time.
BSP Sources and First Build
Sources already downloaded?
If you completed the build environment setup above using the Engicam BSP Scripts, the sources have already been downloaded — skip directly to the build command in the relevant tab.
meta-engicam-st
Engicam BSP meta-layer for STMicroelectronics STM32MP platforms, based on the STM32MPU OpenSTLinux Distribution Package openstlinux-6.6-yocto-scarthgap-mpu-v24.12.05.
Supported hardware
STM32MP1 series (Cortex-A7)
| Machine | SoC | Module | Supported boards |
|---|---|---|---|
stm32mp15-icore |
STM32MP157A | iCore STM32MP1 | Capacitive Starter Kit EDIMM 2.0 |
stm32mp15-ugea |
STM32MP157A | MicroGEA STM32MP1 | MicroDev Starter Kit |
stm32mp13-ugea |
STM32MP135D | MicroGEA STM32MP1 | MicroDev Starter Kit |
STM32MP2 series — STM32MP257 (Cortex-A35)
Requires
ACCEPT_EULA_<machine> = "1"inlocal.confto enable GPU features.
| Machine | SoC | Module | Supported boards |
|---|---|---|---|
stm32mp25f-icore |
STM32MP257F | iCore STM32MP2 | Capacitive Starter Kit EDIMM 2.0 |
stm32mp25d-icore |
STM32MP257D | iCore STM32MP2 | EDIMM 2.0, C.Touch 2 (Ampire 10"), C.Touch 2 (Yes 7"), C.Touch (Ampire 7") |
stm32mp25d-smarcore |
STM32MP257D | SmarCore STM32MP2 | X.Touch 10 |
stm32mp25f-ugea |
STM32MP257F | MicroGEA STM32MP2 | Micro5, MicroTouch |
stm32mp25d-ugea |
STM32MP257D | MicroGEA STM32MP2 | Capacitive Starter Kit EDIMM 2.0 (with EDIMM adapter) |
STM32MP2 series — STM32MP235 (Cortex-A35)
Uses FIP BL31 boot and NXP8987 SDIO Wi-Fi module.
| Machine | SoC | Module | Supported boards |
|---|---|---|---|
stm32mp23d-icore |
STM32MP235D | iCore STM32MP2 | Capacitive Starter Kit EDIMM 2.0 |
stm32mp23d-ugea |
STM32MP235D | MicroGEA STM32MP2 | Micro5, MicroDev3, MicroTouch |
Available images
| Image | Description |
|---|---|
st-image-weston |
ST BSP image with Wayland/Weston backend and Qt support |
st-image-core |
Minimal BSP image |
Prerequisites
Build host: 12 GB RAM or more, 4+ CPU cores.
Retrieve the BSP sources
mkdir openstlinux-6.6-yocto-scarthgap-mpu-v24.12.05
cd openstlinux-6.6-yocto-scarthgap-mpu-v24.12.05
repo init -u https://github.com/STMicroelectronics/oe-manifest.git \
-b refs/tags/openstlinux-6.6-yocto-scarthgap-mpu-v24.12.05
repo sync
From commit "stm32mp257 Icore: enabled ethernet switch" (b16fdcc3ed5f7a9e2377ed3723844b2f1ebd7b76) also needed - meta-st-stm32mp-tsn-swch - meta-st-stm32mp-tsn-acm Both on branch scarthgap branch
Add meta-engicam-st
Clone the layer into the BSP layers directory:
cd layers/
git clone https://github.com/engicam-stable/meta-engicam-st.git \
-b scarthgap-6.6_v24.12
If the layer already exists, update it:
Set up the build environment
Create a symlink to the ST environment script:
Initialize a build directory — replace <machine> and <build-dir> with the values for your target:
Example for iCore STM32MP257F:
If the build directory already exists from a previous run:
conf/bblayers.conf
Add to BASELAYERS:
BASELAYERS += " \
${OEROOT}/layers/meta-openembedded/meta-oe \
${OEROOT}/layers/meta-openembedded/meta-python \
${OEROOT}/layers/meta-engicam-st \
"
conf/local.conf
STM32MP257 only — accept the EULA to enable GPU/OpenCL/Vulkan features:
Build
Flash to SD card
After a successful build, images are in:
Move to the scripts/ subdirectory and generate the .raw image:
./create_sdcard_from_flashlayout.sh ../flashlayout_<image>/optee/FlashLayout_sdcard_<dt>-mx-optee.tsv
Then flash:
Use lsblk to identify the correct device.
Device tree names per machine
| Machine | Device tree (<dt>) |
|---|---|
stm32mp13-ugea |
stm32mp135d-ugea-microdev-mx |
stm32mp15-icore |
stm32mp157a-icore-starterkit2-mx |
stm32mp15-ugea |
stm32mp157a-ugea-microdev-mx |
stm32mp25f-icore |
stm32mp257f-icore-edimm2-mx |
stm32mp25d-icore |
stm32mp257d-icored-edimm2-mx (default), stm32mp257d-icored-ctouch2-amp10, stm32mp257d-icored-ctouch2-yes7, stm32mp257d-icored-ctouch-ampire7 |
stm32mp25d-smarcore |
stm32mp257d-smarcored-xtouch10-mx |
stm32mp25f-ugea |
stm32mp257f-ugea-micro5-mx (default), stm32mp257f-ugea-microtouch |
stm32mp25d-ugea |
stm32mp257d-ugea-micro5-mx (default), stm32mp257d-ugea-edimm2 |
stm32mp23d-icore |
stm32mp235d-icore-edimm2-mx |
stm32mp23d-ugea |
stm32mp235d-ugead-micro5-mx (default), stm32mp235d-ugead-microdev3, stm32mp235d-ugea-microtouch |
MP1 note — FlashLayout path
For stm32mp15-icore and stm32mp15-ugea the FlashLayout is under trusted/ and uses the mx-trusted suffix:
./create_sdcard_from_flashlayout.sh \
../flashlayout_st-image-weston/trusted/FlashLayout_sdcard_stm32mp157a-icore-starterkit2-mx-trusted.tsv
For stm32mp13-ugea (optee boot):
meta-engicam-st
Based on STM32MPU Distribution Package
openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
Retrieve the sources
mkdir openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
cd openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
repo init -u https://github.com/STMicroelectronics/oe-manifest.git -b refs/tags/openstlinux-6.1-yocto-mickledore-mpu-v24.06.26
repo sync
BSP meta-layers repositories:
meta-openembedded remote="http://git.openembedded.org/meta-openembedded" path="layers/meta-openembedded" revision="aa5e8edabbc414d8ec1b2ad63c8743c7baf99626"
bitbake remote="http://git.openembedded.org/bitbake" path="layers/openembedded-core/bitbake" revision="c7e094ec3beccef0bbbf67c100147c449d9c6836"
openembedded-core name="http://git.openembedded.org/openembedded-core" path="layers/openembedded-core" revision="23b5141400b2c676c806df3308f023f7c04e34e0"
meta-st-openstlinux remote="https://github.com/STMicroelectronics/meta-st-openstlinux" path="layers/meta-st/meta-st-openstlinux" revision="2636960b2bead3d1cb294e378e2b06ef8997189e"
meta-st-stm32mp remote="https://github.com/STMicroelectronics/meta-st-stm32mp" path="layers/meta-st/meta-st-stm32mp" revision="1f152e07019dc06fd331b4926ec7e76ceae3d259"
meta-st-stm32mp-addons remote="https://github.com/STMicroelectronics/meta-st-stm32mp-addons" path="layers/meta-st/meta-st-stm32mp-addons" revision="b762caac2e38cf39bcf261d37a79db15a21dfdcc"
meta-st-scripts remote="https://github.com/STMicroelectronics/meta-st-scripts" path="layers/meta-st/scripts" revision="ba56d9daf0174498f2a96cecec0a4864a650444e"