Last edited 3 months ago

X-LINUX-AZURE Distribution Package


X-LINUX-AZURE Distribution Package is based on OpenSTLinux Distribution Package ecosystem release v6.0.0 More info.png .

1. Generate X-LINUX-AZURE OpenSTLinux distribution

With the following procedure, you can generate the complete distribution enabling the X-LINUX-AZURE expansion package.
This procedure is mandatory to use TPM or OP-TEE on the X-LINUX-AZURE expansion package.

1.1. Download the Distribution Package

  • 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-AZURE environment

1.2.1. Clone the meta-st-x-linux-azure Git repository

cd <Distribution Package installation directory>/layers/meta-st
git clone https://github.com/STMicroelectronics/meta-st-x-linux-azure.git -b v6.0.1

1.2.2. Clone the meta-st-x-linux-tpm Git repository

cd <Distribution Package installation directory>/layers/meta-st
git clone https://github.com/STMicroelectronics/meta-st-x-linux-tpm.git -b 6.0.0

1.2.3. Clone the meta-iotedge Git repository and change layer compatibility

cd <Distribution Package installation directory>/layers
git clone https://github.com/Azure/meta-iotedge.git -b main

1.2.4. Clone the meta-virtualization Git repository

cd <Distribution Package installation directory>/layers 
git clone https://git.yoctoproject.org/meta-virtualization -b scarthgap

1.2.5. Clone the meta-security Git repository

cd <Distribution Package installation directory>/layers 
git clone https://git.yoctoproject.org/meta-security -b scarthgap

1.2.6. Clone the meta-clang Git repository

cd <Distribution Package installation directory>/layers 
git clone https://github.com/kraj/meta-clang.git -b scarthgap

1.2.7. Configure Yocto Project®

  • For a new environment

Source the build environment with the correct board and layers:

cd <Distribution Package installation directory>
MACHINE=stm32mp2 DISTRO=openstlinux-weston BSP_DEPENDENCY='layers/meta-openembedded/meta-filesystems layers/meta-security layers/meta-security/meta-tpm layers/meta-st/meta-st-x-linux-tpm layers/meta-st/meta-st-x-linux-azure layers/meta-iotedge layers/meta-virtualization layers/meta-clang' source layers/meta-st/scripts/envsetup.sh
  • For an already installed environment

Add the layers to the Yocto environment:

cd <Distribution Package installation directory>
source layers/meta-st/scripts/envsetup.sh
bitbake-layers add-layer ../layers/meta-st/meta-st-x-linux-azure/ layers/meta-openembedded/meta-filesystems layers/meta-security/meta-tpm ../layers/meta-st/meta-st-x-linux-tpm ../layers/meta-iotedge ../layers/meta-security ../layers/meta-virtualization ../layers/meta-clang

1.3. Build the image

bitbake st-image-azure

1.4. Program the built image

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

  • For STM32MP257F-DK Discovery kit More info green.png
cd <Distribution Package installation directory>/build-openstlinuxweston-stm32mp2/tmp-glibc/deploy/images/stm32mp2
STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-azure/optee/FlashLayout_sdcard_stm32mp257f-dk-optee.tsv
  • For STM32MP257x-EV1 Evaluation board More info green.png
cd <Distribution Package installation directory>/build-openstlinuxweston-stm32mp2/tmp-glibc/deploy/images/stm32mp2
STM32_Programmer_CLI -c port=usb1 -w flashlayout_st-image-azure/optee/FlashLayout_sdcard_stm32mp257f-ev1-optee.tsv

2. How to use the X-LINUX-AZURE expansion package

Go to X-LINUX-AZURE_package_software_setup.

3. Main software modifications

Through the X-LINUX-AZURE Distribution Package, the OpenSTLinux distribution is mainly changed at two levels:

  • The Linux® kernel configuration and Device tree level with the X-LINUX-TPM expansion package integration.
  • User space bringing necessary libraries and tools to use Azure IoT Edge, OP-TEE, and the TPM expansion board features.