STM32MP2 EV1: Booting Linux from eMMC

 

Use the procedure documented below to install the U-Boot firmware, Linux kernel and filesystem images to the eMMC on the STM32MP2 module will be bootable from. Having completed the installation, the STM32MP2 SOM will boot to Linux from the eMMC on next reset / power on.

Note that the procedure will erase all data previously present on the eMMC.

Here is the procedure:

  1. Follow the instructions in the Setting up the STM32MP257F-EV1 Evaluation Board | Installing the STM32CubeProgrammer tool to install the STM32CubeProgrammer Tool to your host.

  2. Add STM32_Programmer_CLI to your PATH:

    $ export PATH=$PATH:/bin: $ STM32_Programmer_CLI [psl@sergmir programmer]$ STM32_Programmer_CLI       -------------------------------------------------------------------                         STM32CubeProgrammer v2.17.0                       ------------------------------------------------------------------- Usage : STM32_Programmer_CLI.exe [command_1] [Arguments_1][[command_2][Arguments_2]...] ...
  3. Power off the board and select the USB Serial Downloader mode (see in Selecting STM32MP2 EV1 Boot Device ).

  4. Attach USB-C (for STM32MP2 EV) cable to connector CN15 and to the Linux host.

  5. Power on the board, attaching another USB-C cable to connector CN15.

  6. Check that the programming USB port appeared on the host (note the "Device Index" in the output):

    ------------------------------------------------------------------- STM32CubeProgrammer v2.17.0 ------------------------------------------------------------------- ===== DFU Interface ===== Total number of available STM32 device in DFU mode: 1 Device Index : USB1 USB Bus Number : 002 USB Address Number : 007 Product ID : DFU in HS Mode @Device ID /0x505, @Revision ID /0x2000 Serial number : 002A00194136500B00363653 Firmware version : 0x0110 Device ID : 0x0505
  7. Download the Emcraft release images from Emcraft site and unpack them into the arbitrary directory. (If you are installing the images built by Yocto, navigate to the 
    builddir/tmp-glibc/deploy/images/stm32mp25-eval directory):

    $ tar xfj stm32mp2-4.3.0.tgz $ cd stm32mp2-4.3.0 $ ls -l total 1287524 drwxr-xr-x 2 psl psl 4096 Oct 7 02:43 arm-trusted-firmware -rw-r--r-- 1 psl psl 1201 Apr 5 2011 build-emcraft-rootfs-openstlinux-weston-stm32mp25-eval -rw-r--r-- 1 psl psl 1066606592 Oct 7 02:39 emcraft-rootfs-openstlinux-weston-stm32mp25-eval.ext4 -rw-r--r-- 1 psl psl 116724 Oct 7 02:38 emcraft-rootfs-openstlinux-weston-stm32mp25-eval.manifest drwxrwxr-x 2 psl psl 4096 Oct 7 02:28 fip drwxr-xr-x 4 psl psl 4096 Oct 7 02:42 flashlayout_emcraft-rootfs drwxr-xr-x 2 psl psl 4096 Sep 23 03:11 scripts -rw-r--r-- 1 psl psl 67108864 Oct 4 01:41 st-image-bootfs-openstlinux-weston-stm32mp25-eval.ext4 -rw-r--r-- 1 psl psl 179 Oct 4 01:41 st-image-bootfs-openstlinux-weston-stm32mp25-eval.manifest -rw-r--r-- 1 psl psl 134217728 Oct 4 01:33 st-image-userfs-openstlinux-weston-stm32mp25-eval.ext4 -rw-r--r-- 1 psl psl 5794 Oct 4 01:33 st-image-userfs-openstlinux-weston-stm32mp25-eval.manifest -rw-r--r-- 1 psl psl 50331648 Oct 4 01:32 st-image-vendorfs-openstlinux-weston-stm32mp25-eval.ext4 -rw-r--r-- 1 psl psl 842 Oct 4 01:32 st-image-vendorfs-openstlinux-weston-stm32mp25-eval.manifest
  8. Use the SD card Flash Layout file for programming the images to SD card:

  9. Disconnect the cables CN21 (for STM32MP2 EV1).

  10. Set the boot mode for booting from eMMC. (Refer to Selecting STM32MP2 EV1 Boot Device .)

  11. Connect USB-C cable to connector CN21 for STM32MP2 EV1, this powers the board on.

  12. Connect to the serial console: