Last edited one week ago

STM32 MPU Flash mapping for Android


This article shows the mapping used in STM32MPU Embedded Software distribution for Android™ for ST boards, which can be used as a starting point for other boards.

1. Supported flash memory technologies

The STM32MP2 series supports different types of flash memories. For Android, it has been limited to e•MMC devices connected to an SDMMC interface. As the eMMC area can be limited, a hybrid configuration is also available for test and demonstration purpose, using an SD card for data partitions.

2. Flash partitions

The tables below list the partitions defined for STM32MP2 boards in Cortex®-A main processor mode and give typical sizes with OpenSTDroid, which can be tuned depending on the targeted application needs.

Size Component Comment
Remaining area userdata The user file system. It contains user data and examples.
16 Mbytes metadata This partition contains the userdata metadata.
1.4 GKbytes super This partition contains Android system, system_ext, vendor, and product logical partitions.
512 Kbytes misc This partition contains a raw partition used to share information between Android and the bootloader.
512 Kbytes dtbo This partition contains the kernel device tree overlay (board configuration).
16 Mbytes vendor_boot This partition contains the kernel device tree (SoC configuration) and the vendor ramdisk.
64 Mbytes boot This partition contains the Linux® kernel image and the generic ramdisk.
512 Kbytes vbmeta This partition contains the metadata required for the verified boot mechanism.
512 Kbytes splash This partition contains the splash screen image (bmp format).
512 Kbytes u-boot-env This partition is used to store the U-Boot environment.
4 Mbytes fip The TF-A firmware image package (FIP) is a binary file that encapsulates several binaries, as well as their certificates (optionally, for authentication), which are loaded by TF-A BL2.

OpenSTDroid FIP contains:

512 Kbytes fsbl This partition contains at least two copies of the Arm® Trusted Firmware (TF-A) first stage bootloader.

3. eMMC memory mapping

The eMMC embeds four physical partitions:

  • Boot area partition 1: one copy of the FSBL
  • Boot area partition 2: one copy of the FSBL
  • User data area: formatted with GPT partitioning and used to store all remaining partitions
  • Replay Protected Memory Block (RPMB): not shown in the figure below.

The STM32CubeProgrammer must be used to prepare the eMMC with the layout shown below, and to populate each partition.

EMMC mapping for Android.png

4. Flashing the built images

When the distribution has been built, refer to the How to populate boards for Android page for how to flash your device.