Last edited 10 months ago

Cross-compile with OpenSTLinux SDK

Applicable for STM32MP13x lines  STM32MP15x lines  STM32MP25x lines



1. Article purpose[edit | edit source]

The pieces of software delivered as source code within the OpenSTLinux Developer Package (for example the Linux kernel) can be modified. External out-of-tree Linux kernel modules, and pieces of applicative software (for example Linux applications) can also be developed thanks to this Developer Package, and loaded onto the board.

The build of all these pieces of software by means of the SDK for OpenSTLinux distribution, and the deployment on-target of the resulting images is explained below.

Warning white.png Warning
To use the cross-compilation efficiently with the OpenSTLinux SDK, it is recommended that you read the Developer Package article relative to the series of your STM32 microprocessor: Category:Developer Package


1.1. Modifying the Linux kernel[edit | edit source]

Prerequisites:

The <Linux kernel installation directory>/README.HOW_TO.txt helper file gives the commands to:
configure the Linux kernel
cross-compile the Linux kernel
deploy the Linux kernel (that is, update the software on board)

You can refer to the following simple examples:

1.2. Adding Linux user space applications[edit | edit source]

Prerequisites:

Once a suitable cross-toolchain (OpenSTLinux SDK) is installed, it is easy to develop a project outside of the OpenEmbedded build system.
There are different ways to use the SDK toolchain directly, among which Makefile and Autotools.
Whatever the method, it relies on:

  • the sysroot that is associated with the cross-toolchain, and that contains the header files and libraries needed for generating binaries (see target sysroot)
  • the environment variables created by the SDK environment setup script (see SDK startup)

You can refer to the following simple example:

1.3. Modifying the U-Boot[edit | edit source]

Prerequisites:

The <U-Boot installation directory>/README.HOW_TO.txt helper file gives the commands to:
cross-compile the U-Boot
deploy the U-Boot (that is, update the software on board)

You can refer to the following simple example:

1.4. Modifying the TF-A[edit | edit source]

Prerequisites:

The <TF-A installation directory>/README.HOW_TO.txt helper file gives the commands to:
cross-compile the TF-A
deploy the TF-A (that is, update the software on board)

You can refer to the following simple example:

1.5. Modifying the OP-TEE[edit | edit source]

Prerequisites:

The <OP-TEE installation directory>/README.HOW_TO.txt helper file gives the commands to:
cross-compile the OP-TEE
deploy the OP-TEE (that is, update the software on board)

You can refer to the following simple example: