cancel
Showing results for 
Search instead for 
Did you mean: 

there's a way to update a microSD partition without touch the boot mode switch?

FPini.1
Associate II

Hi, i'm using Yocto to build a custom openstlinux image for a stm32mp157d-dk1, but i would like to upload the image using the mass storage mode, enabled with u-boot, or something like that.

1 ACCEPTED SOLUTION

Accepted Solutions
Cindy_GE
ST Employee

1. Reboot the board, and hit any key to stop in the U-boot shell

Board $> reboot

[...]

Hit any key to stop autoboot: 0 

STM32MP> 

2. Connect a USB cable between the host machine and the board via the USB OTG ports, in the U-Boot shell, call the USB mass storage function

STM32MP> ums 0 mmc 0

Note here: "mmc 0" is SD card, if your boot device is Emmc, it should be "mmc 1"

3. check the partition associated with the secondary stage boot loader (ssbl): sdc3 here

PC $> ls -l /dev/disk/by-partlabel/

total 0

lrwxrwxrwx 1 root root 10 Jan 17 18:05 bootfs -> ../../sdc4

lrwxrwxrwx 1 root root 10 Jan 17 18:05 fsbl1 -> ../../sdc1

lrwxrwxrwx 1 root root 10 Jan 17 18:05 fsbl2 -> ../../sdc2

lrwxrwxrwx 1 root root 10 Jan 17 18:05 rootfs -> ../../sdc5

lrwxrwxrwx 1 root root 10 Jan 17 18:05 ssbl -> ../../sdc3

lrwxrwxrwx 1 root root 10 Jan 17 18:05 userfs -> ../../sdc6

4. Copy the binary (u-boot.stm32) to the dedicated partition

PC $> dd if=u-boot-<board name>-trusted.stm32 of=/dev/sdc3 bs=1M conv=fdatasync

View solution in original post

1 REPLY 1
Cindy_GE
ST Employee

1. Reboot the board, and hit any key to stop in the U-boot shell

Board $> reboot

[...]

Hit any key to stop autoboot: 0 

STM32MP> 

2. Connect a USB cable between the host machine and the board via the USB OTG ports, in the U-Boot shell, call the USB mass storage function

STM32MP> ums 0 mmc 0

Note here: "mmc 0" is SD card, if your boot device is Emmc, it should be "mmc 1"

3. check the partition associated with the secondary stage boot loader (ssbl): sdc3 here

PC $> ls -l /dev/disk/by-partlabel/

total 0

lrwxrwxrwx 1 root root 10 Jan 17 18:05 bootfs -> ../../sdc4

lrwxrwxrwx 1 root root 10 Jan 17 18:05 fsbl1 -> ../../sdc1

lrwxrwxrwx 1 root root 10 Jan 17 18:05 fsbl2 -> ../../sdc2

lrwxrwxrwx 1 root root 10 Jan 17 18:05 rootfs -> ../../sdc5

lrwxrwxrwx 1 root root 10 Jan 17 18:05 ssbl -> ../../sdc3

lrwxrwxrwx 1 root root 10 Jan 17 18:05 userfs -> ../../sdc6

4. Copy the binary (u-boot.stm32) to the dedicated partition

PC $> dd if=u-boot-<board name>-trusted.stm32 of=/dev/sdc3 bs=1M conv=fdatasync