X-LINUX-RT is a STM32 MPU OpenSTLinux Expansion Package that targets real-time feature in the Linux kernel.
1. X-LINUX-RT[edit source]
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:
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-RT 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-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
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-x-linux-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
3.4. Flash the built image[edit source]
Follow this link to see how to flash the built image.