STM32MP15 U-Boot

1 STM32MP15 in U-Boot[edit]

For detailed information, please read the file in the delivered U-Boot code = board/st/stm32mp1/README

Also available in official U-Boot Git: board/st/stm32mp1/README

1.1 STM32MP15 support[edit]

Code :

  • arch/arm/mach-stm32mp : arch specific code for all STM32 Arm® Cortex® MPUs
  • board/st/stm32mp1: generic STMicroelectronics board for STMP32MP1
  • drivers/*/*stm32* : drivers

Configuration Files:

  • defconfig file
    • configs/stm32mp15_basic_defconfig
    • configs/stm32mp15_optee_defconfig
    • configs/stm32mp15_trusted_defconfig
  • config files
    • include/configs/stm32mp1.h
  • Device tree
    • arch/arm/dts/stm32mp157*-<board>.dts : same as kernel
    • arch/arm/dts/stm32mp157*-<board>-u-boot.dtsi : addition for u-boot ( <<device tree>>-u-boot.dtsi automatically included in build process)

1.2 Selecting targets : choose defconfig and Device Tree[edit]

Each boot chain is supported by one U-Boot configuration with defconfig

Boot chain defconfig FSBL SSBL TEE support
Trusted Boot stm32mp15_trusted_defconfig TF-A U-Boot
u-boot.stm32
-
Trusted Boot with OP-TEE stm32mp15_optee_defconfig TF-A U-Boot
u-boot.stm32
yes
Basic Boot stm32mp15_basic_defconfig SPL
u-boot-spl.stm32
U-Boot
u-boot.img
-
Warning.png The basic boot chain is not supported/promoted by STMicroelectronics to make product (see Boot chains overview for details).

Several targets/ boards are supported with the associated device-tree (same name as kernel):

Board part number Description Device tree
STM32MP157C-EV1 Evaluation board
PMIC = MB1262+MB1263
stm32mp157c-ev1
STM32MP157C-ED1 Evaluation daughter board
PMIC = MB1263
stm32mp157c-ed1
STM32MP157A-DK1 Discovery kit
MB1272
stm32mp157a-dk1
STM32MP157C-DK2 Discovery kit
MB1272 + DSI screen
stm32mp157c-dk2

1.3 Compilation[edit]

see U-Boot_overview#U-Boot_build

With <mode> = 'basic', 'trusted' or 'optee'

 $> make stm32mp15_<mode>_defconfig
 $> make DEVICE_TREE=<device tree name> all
  • DEVICE_TREE: select in arch/arm/dts the device tree that is used
  • KBUILD_OUTPUT: change the destination directory for the build
  • EXT_DTB: select external device tree

2 Examples[edit]

2.1 EV1 trusted boot[edit]

 $> make stm32mp15_trusted_defconfig
 $> make DEVICE_TREE=stm32mp157c-ev1 all

2.2 DK2 trusted boot[edit]

Using export to select the device tree

 $> export KBUILD_OUTPUT=../build/trusted
 $> export DEVICE_TREE=stm32mp157c-dk2
 $> make stm32mp15_trusted_defconfig
 $> make all

2.3 ED1 basic boot[edit]

 $> export KBUILD_OUTPUT=../build/basic
 $> make stm32mp15_basic_defconfig
 $> make DEVICE_TREE=stm32mp157c-ed1 all

2.4 Trusted boot chain with external device tree[edit]

 $> make stm32mp15_trusted_defconfig
 $> make EXT_DTB=boot/stm32mp157c-myboard.dtb all