How to flash .gptimg in eMMC flash memory of STM32MP157C board

Hello @mirzak,

I have integrated mender support in STM32MP157C based custom board as per your instructions STM32MP157C Discovery Kit - Board Integrations / Yocto Project - Mender Hub.

I am able to do FW upgrade using mender in SD card. Now, I want to do the same thing in eMMC boot device.

I have done the modification accordingly in mender configurations and generated .gptimg to be flashed in eMMC.

I don’t find any way to upgrade .gptimg in eMMC using STM32CubeProgrammer. Can you please guide me how to flash .gptimg in eMMC?

Thanks & Regards,
Pratik Manvar

Hello All,

To upgrade full image (.sdcard, .gptimg, etc.) on stm32mp1 series platform using STMCubeProgrammer, directory structure of your images should be as bellow.

Mender_Package
├── arm-trusted-firmware
│ ├── tf-a-stm32mp157c-osd32mp1-brk-serialboot.stm32
│ └── tf-a-stm32mp157c-osd32mp1-brk-trusted.stm32
├── bootloader
│ └── u-boot-stm32mp157c-osd32mp1-brk-trusted.stm32
├── FlashLayout_emmc_stm32mp157c-osd32mp1-brk-trusted.tsv
├── st-image-weston-openstlinux-weston-stm32mp1-eval.img

The content of the .tsv should be as following.

Mender_Package$ cat FlashLayout_emmc_stm32mp157c-osd32mp1-brk-trusted.tsv
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-osd32mp1-brk-serialboot.stm32
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157c-osd32mp1-brk-trusted.stm32
P 0x10 sdcard RawImage mmc1 0x0 st-image-weston-openstlinux-weston-stm32mp1-eval.img

Thanks & Regards,
Pratik Manvar

Hello All,

To upgrade full image (.sdcard, .gptimg, etc.) on stm32mp1 series platform using STMCubeProgrammer, directory structure of your images should be as bellow.

Mender_Package
├── arm-trusted-firmware
│ ├── tf-a-stm32mp157c-osd32mp1-brk-serialboot.stm32
│ └── tf-a-stm32mp157c-osd32mp1-brk-trusted.stm32
├── bootloader
│ └── u-boot-stm32mp157c-osd32mp1-brk-trusted.stm32
├── FlashLayout_emmc_stm32mp157c-osd32mp1-brk-trusted.tsv
├── st-image-weston-openstlinux-weston-stm32mp1-eval.img

The content of the .tsv should be as following.

Mender_Package$ cat FlashLayout_emmc_stm32mp157c-osd32mp1-brk-trusted.tsv
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-osd32mp1-brk-serialboot.stm32
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157c-osd32mp1-brk-trusted.stm32
P 0x10 sdcard RawImage mmc1 0x0 st-image-weston-openstlinux-weston-stm32mp1-eval.img

Thanks & Regards,
Pratik Manvar

Hi All,

Follow below steps to flash full image (.sdcard or .gptimg) into the stm32mp1 series platform using STMCubeProgrammer.

  1. Your directory structure of images should be as below.
    Mender_Release_Package
    ├── arm-trusted-firmware
    │ ├── tf-a-stm32mp157c-osd32mp1-brk-serialboot.stm32
    │ └── tf-a-stm32mp157c-osd32mp1-brk-trusted.stm32
    ├── bootloader
    │ └── u-boot-stm32mp157c-osd32mp1-brk-trusted.stm32
    ├── FlashLayout_emmc_stm32mp157c-osd32mp1-brk-trusted.tsv
    ├── st-image-weston-openstlinux-weston-stm32mp1-eval.img

  2. The content of .tsv file should be as following.

$ cat FlashLayout_emmc_stm32mp157c-osd32mp1-brk-trusted.tsv
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157c-osd32mp1-brk-serialboot.stm32
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157c-osd32mp1-brk-trusted.stm32
P 0x10 sdcard RawImage mmc1 0x0 st-image-weston-openstlinux-weston-stm32mp1-eval.img

Thanks & Regards,
Pratik Manvar