I recently bought a new device for my etnaviv board farm - STM32MP157C-DK2 Discovery Board.

The big problem is that the stock boot-chain can not boot a mainline kernel - it simply hangs.


Trusted Firmware-A (TF-A) is a reference implementation of secure-world software used on this platform. It implements a secure monitor with various interface standards:

  • The power state coordination interface (PSCI)
  • Trusted board boot requirements (TBBR)
  • SMC calling convention
  • System control and management interface

More information can be found at the official website at https://www.trustedfirmware.org/.

On kernel side when you need to access to secure feature (like clocks, resets …) you need to discuss it with this secure monitor using secure APIs. This APIs have not yet been pushed to mainline kernel. So It means that a mainline kernel can’t access to secure resources and it is the reason for the boot hang.

u-boot - the solution

It looks like that we can replace the current secure boot chain with u-boot in non-secure boot mode and call it a day.

This will generate two build artifacts:

  • u-boot-spl.stm32
  • u-boot.img

Lets copy these artifacts with dd directly to the suitable partition. ST has a quite nice wiki where we can find some more details.

  • u-boot-spl.stm32 -> fsbl1
  • u-boot.img -> ssbl

Lets boot it …

Connect all your cables and have a look at you serial console:

And from there you can simply boot your mainline kernel: