Building and Installing Linux uImage on the STM32H753I-EVAL Print


This note explains how to install a bootable Linux image to the SD Card of the STM32H753I-EVAL board. Having installed a Linux image to the SD Card, you would be able to boot Linux on the target automatically on any power up or reset cycle.

Instructions of how to build the sample Linux image (rootfs.uImage) from the Emcraft software distribution is described in Building Linux.

To install the sample Linux image (rootfs.uImage) from the Emcraft software distribution just follow the instructions:

  1. Make sure that SD Card is formatted.
  2. Remove SD Card from the STM32H-EVAL board, and plug it into PC.
  3. Find out a /dev/sdX device the system has assigned to your SD Card:
  4. $ dmesg | tail
    sd 1:0:0:0: [sdb] 31116288 512-byte logical blocks: (15.9GB/14.8 GiB)
    sd 1:0:0:0: [sdb] Cache data unavailable
    sd 1:0:0:0: [sdb] Assuming drive cache: write through
    sd 1:0:0:0: [sdb] Cache data unavailable
    sd 1:0:0:0: [sdb] Assuming drive cache: write through
    sdb: sdb1

  5. Mount the first partition of the SD Card, and copy rootfs.uImage file:
  6. $ sudo mount /dev/sdb1 /mnt
    $ cp rootfs.uImage /mnt

  7. Umount, and safely remove the SD Card:
  8. $ sudo umount /mnt
    $ sync

  9. Insert the SD Card back to the SD Card holder on the STM32H-EVAL board. Power on the board. Connect to the serial console, and make sure that Linux boot up to console:
  10. U-Boot 2019.04- (Aug 09 2023 - 10:31:06 +0000) Model: STMicroelectronics STM32H753i-EVAL board DRAM: 32 MiB Flash: 2 MiB MMC: STM32 SDMMC2: 0 Loading Environment from MMC... OK In: serial@40011000 Out: serial@40011000 Err: serial@40011000 Net: eth0: ethernet@40028000 Hit any key to stop autoboot: 0 8192999 bytes read in 535 ms (14.6 MiB/s) ## Booting kernel from Legacy Image at d0c00000 ... Image Name: Linux-6.1.28 Image Type: ARM Linux Multi-File Image (uncompressed) Data Size: 8192935 Bytes = 7.8 MiB Load Address: d0008000 Entry Point: d0008001 Contents: Image 0: 8176896 Bytes = 7.8 MiB Image 1: 16027 Bytes = 15.7 KiB Verifying Checksum ... OK ## Loading init Ramdisk from multi component Legacy Image at d0c00000 ... ## Flattened Device Tree from multi component Image at D0C00000 Booting using the fdt at 0xd13cc54c Loading Multi-File Image ... OK Loading Ramdisk to d1a7f000, end d1a82e9b ... OK ERROR: reserving fdt memory region failed (addr=d1c00000 size=300000) ERROR: reserving fdt memory region failed (addr=d1f00000 size=100000) Loading Device Tree to d1a78000, end d1a7ee9a ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 6.1.28 (sasha@workbench.emcraft.com) (arm-none-eabi-gcc (GNU Arm Embedded Toolchain 10.3-2021.10) 10.3.1 20210824 (release), GNU ld (GNU Arm Embedded Toolchain 10.3-2021.10) 2.36.1.20210621) #14 PREEMPT Wed Aug 9 10:18:28 UTC 2023 [ 0.000000] CPU: ARMv7-M [411fc271] revision 1 (ARMv7M), cr=00000000 [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache [ 0.000000] OF: fdt: Machine model: STMicroelectronics STM32H753i- EVAL board ... init started: BusyBox v1.24.2 (2023-08-08 13:33:53 UTC) [43] Jan 01 00:00:02 Running in background / # ls bin etc httpd lib proc sbin tmp var dev hello.ko init mnt root sys usr / #