Registered User |
Registered User mNo edit summary |
||
Line 1: | Line 1: | ||
{{ApplicableFor | <noinclude>{{ApplicableFor | ||
|MPUs list=STM32MP13x | |MPUs list=STM32MP13x | ||
|MPUs checklist=STM32MP13x, STM32MP15x | |MPUs checklist=STM32MP13x, STM32MP15x | ||
}} | }}</noinclude> | ||
This article briefly describes the {{MicroprocessorDevice | device=13}} support in [[U-Boot_overview|U-Boot]]. | This article briefly describes the {{MicroprocessorDevice | device=13}} support in [[U-Boot_overview|U-Boot]]. | ||
Revision as of 09:09, 13 October 2021
This article briefly describes the STM32MP13x lines support in U-Boot.
1. STM32MP13x lines
support[edit | edit source]
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 :
- arch/arm/mach-stm32mp : arch specific code for STM32 Arm® Cortex® MPUs
- arch/arm/mach-stm32mp/Kconfig : generic configuration for STM32 Arm® Cortex® MPUs
- arch/arm/mach-stm32mp/Kconfig.13x : specific configuration for STM32MP13x lines
- arch/arm/mach-stm32mp/Kconfig : generic configuration for STM32 Arm® Cortex® MPUs
- board/st/common : STMicroelectronics common code
- board/st/stm32mp1 : generic STMicroelectronics board for STM32MP1 Series
- drivers/*/*stm32* : drivers
Configuration Files:
- defconfig file
- config files
- STM32MP13_device_tree in arch/arm/dts : stm32mp13*.dts*
- <Device tree>.dts : same as kernel
- <Device tree>-u-boot.dtsi : addition for u-boot automatically included in build process
2. Selecting targets : choose defconfig and Device Tree[edit | edit source]
The U-Boot configuration with defconfig is stm32mp13_defconfig
The STM32MP13 boards are supported with the associated device-tree (same name as kernel):
Board part number | Device tree | Description |
---|---|---|
STM32MP135F-DK unknown board type identifier | stm32mp135f-dk | MB1635 |
3. Compilation[edit | edit source]
see U-Boot_overview#U-Boot_build
For STM32MP135F-DK unknown board type identifier , the device tree is already selected in defconfig stm32mp13_defconfig
stm32mp13_defconfig PC $> make allPC $> make
For other boards, you need to select the correct device tree
stm32mp13_defconfig PC $> make DEVICE_TREE=<Device tree> allPC $> make
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, used to generated FIP, are u-boot-nodtb.bin and u-boot.dtb.
4. U-Boot integration in FIP[edit | edit source]
U-Boot binary and its associated device tree are part of the FIP binary, created with TF-A Makefile option :
- BL33_CFG = u-boot.dtb
- BL33 = u-boot-nodtb.bin
or updated with fiptools
:
- --hw-config u-boot.dtb
- --nt-fw u-boot-nodtb.bin
Example for fip upddate of STM32MP135F-DK unknown board type identifier :
--verbose update --nt-fw u-boot-nodtb.bin \ --hw-config u-boot.dtb \ tf-a-fip-stm32mp135f-dk.bin DEBUG: Replacing nt-fw with .../u-boot-nodtb.bin DEBUG: Replacing hw-config with .../u-boot.dtb DEBUG: Metadata size: ... bytes DEBUG: Payload size: ... bytesPC $> fiptool
5. Examples[edit | edit source]
5.1. STM32MP135F-DK unknown board type identifier[edit | edit source]
stm32mp13_defconfig PC $> make allPC $> make
or
stm32mp13_defconfig PC $> make DEVICE_TREE=stm32mp135f-dk allPC $> make
and
--nt-fw u-boot-nodtb.bin \ --hw-config u-boot.dtb \ tf-a-fip-stm32mp135f-dk.binPC $> fiptool update
5.2. STM32MP135F-DK unknown board type identifier with export[edit | edit source]
stm32mp135f-dk PC $> make stm32mp13_defconfig PC $> make allPC $> export KBUILD_OUTPUT=../build/stm32mp13 PC $> export DEVICE_TREE=
--nt-fw $KBUILD_OUTPUT/u-boot-nodtb.bin \ --hw-config $KBUILD_OUTPUT/u-boot.dtb \ tf-a-fip-stm32mp135f-dk.binPC $> fiptool update
5.3. Custom board with external device tree[edit | edit source]
stm32mp13_defconfig PC $> make EXT_DTB=stm32mp131a-myboard.dtb allPC $> make
--nt-fw u-boot-nodtb.bin \ --hw-config u-boot.dtb \ tf-a-fip-stm32mp131a-myboard.binPC $> fiptool update