X-LINUX-RT expansion package

Revision as of 10:45, 23 January 2023 by Registered User (→‎Install X-LINUX-RT environment)
Applicable for STM32MP13x lines, STM32MP15x lines

X-LINUX-RT is a STM32 MPU OpenSTLinux Expansion Package that targets real-time feature in the Linux kernel.

RT Expansion Package In STM32MPU Embedded Software.png

1. X-LINUX-RT[edit source]

Info white.png Information
This version is compatible with Yocto Project® build system Kirkstone and has been validated against the OpenSTLinux ecosystem release v4.1.0 and validated on STM32MP135F-DK More info green.png and STM32MP157F-DK2 More info green.png boards.

1.1. Validated hardware[edit source]

As any software expansion package, the X-LINUX-RT is supported on all STM32MP1 Series and it has been validated on the following boards:

  • STM32MP157F-DK2 More info green.png[1]
  • STM32MP135F-DK More info green.png[2]

2. Developer package: build RT BSP with the SDK[edit source]

Linux RT can be built with sources provided in the OpenSTLinux BSP packages plus patches and device tree provided in X-LINUX-RT meta layer.

2.1. Install the OpenSTLinux SDK[edit source]

First of all, you must download and install the OpenSTLinux SDK, which contains all the basis needed for the X-LINUX-AI add-on. To do this, follow the page OpenSTLinux SDK installation guide. Once this has been done, you have a directory containing the OpenSTLinux SDK.

2.2. Download X-LINUX-RT meta layer[edit source]

  • Clone the meta-st-stm32mpu-rt git repositories
 cd <Distribution Package installation directory>/layers/meta-st
 git clone https://github.com/STMicroelectronics/meta-st-stm32mpu-rt.git

2.3. Download the OpenSTLinux BSP[edit source]

You must download and extract the OpenSTLinux BSP, which contains all the BSP source code. To do this, follow only the chapter 5.2 (and not the sub-chapter 5.2.x) from the page Download OpenSTLinux BSP.

Two BSP components (OP-TEE OS and Linux kernel) must be modified for RT feature.

2.3.1. Modifying the Linux kernel[edit source]

You can follow now the sub-chapter 5.2.1 to prepare the Linux kernel.
You must also add patches you can find here layers/meta-st/meta-st-stm32mpu-rt/recipes-kernel/linux/ .
Then apply fragments as written in the README.HOW_TO.txt helper file. Also add following framents:

For MP15:

* arch/arm/configs/fragment-07-rt.config
* arch/arm/configs/fragment-07-rt-sysvinit.config

For MP13:

* arch/arm/configs/fragment-07-rt.config
* arch/arm/configs/fragment-07-rt-sysvinit.config
* arch/arm/configs/fragment-08-rt-mp13.config

You can now build and deploy the Linux kernel.

2.3.2. Modifying the OP-TEE OS[edit source]

You can follow now the sub-chapter 5.2.5 to prepare the OP-TEE OS.
You must also add patches you can find here layers/meta-st/meta-st-stm32mpu-rt/recipes-security/optee/optee-os .

You can now build and deploy the OP-TEE OS.

3. Distribution package: re-generate X-LINUX-RT OpenSTLinux distribution[edit source]

With the following procedure, you can re-generate the complete distribution enabling the X-LINUX-RT expansion package.

3.1. Download the STM32MP1 Distribution Package[edit source]

For ecosystem release v4.1.0 :
Install the STM32MP1 Distribution Package v4.1.0, but do not initialize the OpenEmbedded environment (do not source the envsetup.sh).

3.2. Install X-LINUX-RT environment[edit source]

  • Clone the meta-st-x-linux-rt git repositories
 cd <Distribution Package installation directory>/layers/meta-st
 git clone https://github.com/STMicroelectronics/meta-st-x-linux-rt.git
  • Source the build environment with the correct board and layer. For example for MP13:
 cd ../..
 DISTRO=openstlinux-weston MACHINE=stm32mp13-rt source layers/meta-st/scripts/envsetup.sh

3.3. Build the image[edit source]

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

3.4. Flash the built image[edit source]

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