STM32MP157A-EV1 image for eMMC

Hi, any advice to create eMMC flashable image and how to flash it?

@sgufa, it wouldn’t take too much to convert the “flasher’s” we use for BeagleBoard.org products…

The biggest gotcha, is the STM32MP15x’s need sgdisk, which isn’t usually installed by default…

https://www.digikey.com/eewiki/display/linuxonarm/STM32MP1#STM32MP1-SetupmicroSDcard

Here’s a quick example from for the BeagleBone’s eMMC flasher

First to get converted would be sfdisk -> sgdisk

You could script it, or just hard code the values…

sudo sgdisk -o ${DISK}

sudo sgdisk --resize-table=128 -a 1 \
        -n 1:34:545    -c 1:fsbl1   \
        -n 2:546:1057  -c 2:fsbl2   \
        -n 3:1058:5153 -c 3:ssbl    \
        -n 4:5154:     -c 4:rootfs  \
        -p ${DISK}

sudo sgdisk -A 4:set:2 ${DISK}

Then the booloader install would be converted from 2 dd’s to 3 dd’s here:

Then convert all “1” ext4 partition’s would need to be converted to STM32MP’s “4th” ext partition configuration. (luckily other than dd’ing into Partition 1, 2, and 3 not much needs to be done with them…

Regards,

Hello Robert,
if i’m not wrong, in this way you always need to boot the system from sd card and then you can flash the emmc from sd, right? Isn’t there a way to flash directly emmc maybe using STM32CubeProgrammer?

@sgufa, it looks like ST supports flashing the eMMC thru STM32CubeProgrammer:

https://wiki.st.com/stm32mpu/wiki/STM32MP15_ecosystem_release_note#STM32CubeProgrammer-2C_Signing_tool-2C_Keygen

The full directions are a little lite:

https://wiki.st.com/stm32mpu/wiki/How_to_use_STM32CubeProgrammer_to_populate_a_board

Regards,

Regards,

Hello Robert,
Please share with me the modified scripts.
Thanks,
Qizhang