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 products…

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

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…


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:

The full directions are a little lite: