Skip to main content
Visitor II
October 29, 2021
Solved

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

  • October 29, 2021
  • 1 reply
  • 879 views

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.

    This topic has been closed for replies.
    Best answer by Cindy_GE

    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

    1 reply

    Cindy_GEAnswer
    ST Employee
    November 1, 2021

    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