STM32MP15 U-Boot

Stable: 12.07.2023 - 16:10 / Revision: 12.07.2023 - 16:10

I am here to prevent the first-page-empty bug!

This article briefly describes the STM32MP15x lines More info.png support in U-Boot.

1 STM32MP15x lines More info.png support

For detailed information, please read the file in the delivered U-Boot code = doc/board/st/stm32mp1.rst or the stm32mp1 documentation generated by make htlmdocs[1].

Also available in official U-Boot Git.

Code :

Configuration Files:

2 Selecting targets : choose defconfig and Device Tree

The STM32 MPU boot chain is supported by one U-Boot configuration with defconfig = stm32mp15_trusted_defconfig

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

Board part number Device tree Description
STM32MP157A-EV1 Evaluation board Warning.png stm32mp157a-ev1 MB1262+MB1263
STM32MP157C-EV1 Evaluation board Warning.png stm32mp157c-ev1
STM32MP157D-EV1 Evaluation board More info green.png stm32mp157d-ev1
STM32MP157F-EV1 Evaluation board More info green.png stm32mp157f-ev1
STM32MP157A-DK1 Discovery kit Warning.png stm32mp157a-dk1 MB1272
STM32MP157D-DK1 Discovery kit More info green.png stm32mp157d-dk1
STM32MP157C-DK2 Discovery kit Warning.png stm32mp157c-dk2 MB1272+MB1407
STM32MP157F-DK2 Discovery kit More info green.png stm32mp157f-dk2

For information the 'Evaluation' daughter-board only (MB1263 without MB1262) is also supported by stm32mp15*-ed1.dts device tree files.

3 Compilation

see U-Boot_overview#U-Boot_build

With the defconfig file: stm32mp15_trusted_defconfig

  make stm32mp15_trusted_defconfig
  make DEVICE_TREE=<Device tree> all

The supported variables are:

  • 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

The ouput file is u-boot.stm32.

4 SPL compilation

The alternate boot chain with SPL is also supported by "stm32mp15_basic_defconfig" but only for U-Boot_SPL:_DDR_interactive_mode

The resulting U-Boot files are located in your build directory:

  • u-boot-spl.stm32 : FSBL = SPL binary with STM32 image header, loaded by ROM code
  • u-boot.img : SSBL = U-Boot binary with U-Boot image header (uImage), loaded by SPL
Warning white.png Warning
This alternate boot chain with SPL is not supported/promoted by STMicroelectronics to make product.

5 Examples

5.1 STM32MP157F-EV1 Evaluation board More info green.png

  make stm32mp15_trusted_defconfig
  make DEVICE_TREE=stm32mp157f-ev1 all

5.2 STM32MP157C-EV1 Evaluation board Warning.png

  make stm32mp15_trusted_defconfig
  make DEVICE_TREE=stm32mp157c-ev1 all

5.3 STM32MP157D-DK1 Discovery kit More info green.png

  make stm32mp15_trusted_defconfig
  make DEVICE_TREE=stm32mp157d-dk1 all

5.4 STM32MP157C-DK2 Discovery kit Warning.png

Using export to select the device tree

  export KBUILD_OUTPUT=../build/stm32mp15_trusted
  export DEVICE_TREE=stm32mp157c-dk2
  make stm32mp15_trusted_defconfig
  make all

5.5 Custom board with external device tree

  make stm32mp15_trusted_defconfig
  make EXT_DTB=stm32mp151a-myboard.dtb all

5.6 SPL for STM32MP157F-EV1 Evaluation board More info green.png

  make stm32mp15_basic_defconfig
  make DEVICE_TREE=stm32mp157f-ev1 all
IMPORTANT NOTICE – READ CAREFULLY
STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, enhancements, modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and conditions of sale in place at the time of order acknowledgment.

Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for application assistance or the design of purchasers’ products.

No license, express or implied, to any intellectual property right is granted by ST herein.

Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product.

ST and the ST logo are trademarks of ST. For additional information about ST trademarks, refer to www.st.com/trademarks. All other product or service names are the property of their respective owners.

Information in this document supersedes and replaces information previously supplied in any prior versions of this document.