Last edited 2 months ago

X-LINUX-AI Distribution package

Applicable for STM32MP13x lines, STM32MP15x lines, STM32MP21x lines, STM32MP23x lines, STM32MP25x lines


1. Re-generate X-LINUX-AI OpenSTLinux distribution[edit | edit source]

With the following procedure, you can re-generate the complete distribution enabling the X-LINUX-AI expansion package.
This procedure is mandatory if you want to update frameworks by yourself, or generate your own X-LINUX-AI distribution by selecting the relevant AI framework for your applications.

1.1. Download the Distribution Package[edit | edit source]

  • Install the OpenSTLinux Distribution Package by following the dedicated article : STM32MPU Distribution Package, but do not initialize the OpenEmbedded environment (do not source the envsetup.sh).

1.2. Install X-LINUX-AI environment[edit | edit source]

  • Clone the meta-st-x-linux-ai git repositories
Warning white.png Warning
The software package is provided AS IS, and by downloading it, you agree to be bound to the terms of the software license agreement (SLA0048). The detailed content licenses can be found here.
For X-LINUX-AI v6.1.0:
cd <Distribution Package installation directory>/layers/meta-st
git clone https://github.com/STMicroelectronics/meta-st-x-linux-ai.git -b v6.1.0
  • For a new environment

Source the build environment with the correct board and layer:

cd ../..
DISTRO=openstlinux-weston MACHINE=<machine> BSP_DEPENDENCY='layers/meta-st/meta-st-x-linux-ai' source layers/meta-st/scripts/envsetup.sh

Note that:

  • For an already installed environment

Add the meta-st-x-linux-ai to Yocto environment:

cd ../..
source layers/meta-st/scripts/envsetup.sh
bitbake-layers add-layer ../layers/meta-st/meta-st-x-linux-ai/

1.3. Build the image[edit | edit source]

  • For STM32MP2x with AI hardware accelerator
bitbake st-image-ai

By default, the image built for STM32MP2x devices equipped with an AI hardware accelerator includes all packages required for CPU, GPU, and NPU functionality.

Warning DB.png Important
If you want to build an image for an STM32MP2x board without AI accelerator or with an AI accelerator but exclude GPU and NPU packages, modify the DEFAULT_BUILD_AI variable in the layer.conf file of the X-LINUX-AI meta-layer by replacing "NPU" with "CPU"
Info white.png Information
Note that building the image could take long time depending on the host computer performance.
  • For STM32MPU without AI hardware accelerator
bitbake st-image-ai

For STM32MPU devices without an AI hardware accelerator, the default image contains only the packages necessary for CPU usage.

Info white.png Information
Note that building the image could take long time depending on the host computer performance.

1.4. Flash the built image[edit | edit source]

Follow this link to see how to flash the built image.