Booting Linux from SD Card Print

 

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

Please note that the installation will erase files previously installed on your SD Card. The SD card size should be at least 2GB for the Linux kernel and filesystem images to fit on the card.

Here is the procedure:

  1. Download the SD Card bootable image from the Emcraft site to your Linux development host.
  2. Insert an empty SD Card into the development host. Install the image to the SD card, as follows. Note that you need to specify the whole device as the destination for the dd command (i.e. do not install the image to a partition):
  3. $ bzip2 -dc flashlayout_emcraft-rootfs_FlashLayout_sdcard_stm32mp1-som-trusted-2.8.0.raw.bz2 | sudo dd of=dev/sd<X> bs=8M conv=fdatasync
    ...

  4. Insert the SD Card to the SD Card holder on the SOM-BSB board. Configure the board for booting from the SD Card. Set the S4 DIP switch boot selection for the SD Card boot, as described in Selecting Boot Device.
  5. Connect with a wire JP3.1 and JP2 (any pin) on the baseboard. This will provide initial 3.3V power to SD Card.
  6. Re-apply the power. The system will boot to the Linux prompt:
  7. U-Boot 2018.09-stm32mp-r2-2.8.0 (Feb 14 2019 - 15:13:06 +0000)

    CPU: STM32MP15x.B
    Model: Emcraft STM32MP1 SOM Rev 1A, www.emcraft.com
    Board: stm32mp1 in trusted mode
    Watchdog enabled
    DRAM: 1 GiB
    Clocks:
    - MPU : 650 MHz
    - MCU : 196.608 MHz
    - AXI : 266.500 MHz
    - PER : 24 MHz
    MMC: STM32 SDMMC2: 0, STM32 SDMMC2: 1
    In: serial
    Out: vidconsole
    Err: vidconsole
    Model: Emcraft STM32MP1 SOM Rev 1A, www.emcraft.com
    Board: stm32mp1 in trusted mode
    Error: 16 bit/pixel mode, but BMP has 24 bit/pixel
    Net: eth0: ethernet@5800a000
    Boot over mmc0!
    Hit any key to stop autoboot: 0
    STM32MP1-SOM>
    ...

Troubleshooting

If the target board does not boot (no activity on the console), verify the following items:

  1. If the SD Card was programmed on a virtual machine (e.g. VmWare), program the SD Card on a native Linux PC.
  2. Verify that the power LED DS1 switch lits up when you power-on the board.
  3. Verify that all S4 switches are set to the positions described above.
  4. If suggestions above do not help, please contact Emcraft at This e-mail address is being protected from spambots. You need JavaScript enabled to view it to provide us with the following materials:
    • Photo of your SOM-BSB board (a top-side view with jumpers);
    • Full log of the U-Boot build, SD preparation and installation procedures;
    • The U-Boot binary ready for installing onto SD Card.