2021-10-29 10:23 AM
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.
Solved! Go to Solution.
2021-11-01 02:06 AM
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
2021-11-01 02:06 AM
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