STM32MP15 U-Boot
This article briefly describes the {{#vardefine:info|}}{{#vardefine:dev|MP15x lines}}{{#vardefine:info| }}STM32{{#var:dev}}{{#var:info}} support in U-Boot.
目录
- 1 {{#vardefine:info|}}{{#vardefine:dev|MP15x lines}}{{#vardefine:info| }}STM32{{#var:dev}}{{#var:info}} support
- 2 Selecting targets : choose defconfig and Device Tree
- 3 Compilation
-
4 Examples
- 4.1 {{#vardefine:info|}}{{#vardefine:typ|}}{{#vardefine:typ| Evaluation board}}{{#vardefine:info|}}STM32MP157C-EV1{{#var:typ}} {{#var:info}} trusted boot
- 4.2 {{#vardefine:info|}}{{#vardefine:typ|}}{{#vardefine:typ| Discovery kit}}{{#vardefine:info|}}STM32MP157C-DK2{{#var:typ}} {{#var:info}} trusted boot
- 4.3 STM32MP157C-ED1 Evaluation daughterboard basic boot
- 4.4 Trusted boot chain with external device tree
{{#vardefine:info|}}{{#vardefine:dev|MP15x lines}}{{#vardefine:info| }}STM32{{#var:dev}}{{#var:info}} support
For detailed information, please read the file in the delivered U-Boot code = board/st/stm32mp1/README| |}} board/st/stm32mp1/README
Also available in official U-Boot Git.
Code :
- arch/arm/mach-stm32mp| |}} arch/arm/mach-stm32mp : arch specific code for {{#vardefine:info|}}{{#vardefine:dev| Arm® Cortex® MPUs}}{{#vardefine:info| }}STM32{{#var:dev}}{{#var:info}}
- board/st/stm32mp1| |}} board/st/stm32mp1 : generic STMicroelectronics board for {{#vardefine:info|}}{{#vardefine:dev|MP1 Series}}STM32{{#var:dev}}{{#var:info}}
- drivers/*/*stm32* : drivers
Configuration Files:
- defconfig file
- config files
- Device tree in arch/arm/dts | |}} arch/arm/dts
- stm32mp157*-<board>.dts : same as kernel
- stm32mp157*-<board>-u-boot.dtsi : addition for u-boot ( <<device tree>>-u-boot.dtsi automatically included in build process)
Selecting targets : choose defconfig and Device Tree
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 |
- |
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 |
---|---|---|
}}{{#vardefine:typ|}}{{#vardefine:typ| Evaluation board}}{{#vardefine:info|}}STM32MP157C-EV1{{#var:typ}} {{#var:info}} | MB1262+MB1263 | |}} stm32mp157c-ev1 ] |
STM32MP157C-ED1 Evaluation daughterboard | MB1263 | |}} stm32mp157c-ed1 ] |
}}{{#vardefine:typ|}}{{#vardefine:typ| Discovery kit}}{{#vardefine:info|}}STM32MP157A-DK1{{#var:typ}} {{#var:info}} | MB1272 | |}} stm32mp157a-dk1 ] |
}}{{#vardefine:typ|}}{{#vardefine:typ| Discovery kit}}{{#vardefine:info|}}STM32MP157C-DK2{{#var:typ}} {{#var:info}} | MB1272+MB1407 | |}} stm32mp157c-dk2 ] |
Compilation
see U-Boot_overview#U-Boot_build
With <mode> = 'basic', 'trusted' or 'optee'
PC $> make stm32mp15_<mode>_defconfig PC $> 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
Examples
{{#vardefine:info|}}{{#vardefine:typ|}}{{#vardefine:typ| Evaluation board}}{{#vardefine:info|}}STM32MP157C-EV1{{#var:typ}} {{#var:info}} trusted boot
PC $> make stm32mp15_trusted_defconfig PC $> make DEVICE_TREE=stm32mp157c-ev1 all
{{#vardefine:info|}}{{#vardefine:typ|}}{{#vardefine:typ| Discovery kit}}{{#vardefine:info|}}STM32MP157C-DK2{{#var:typ}} {{#var:info}} trusted boot
Using export to select the device tree
PC $> export KBUILD_OUTPUT=../build/trusted PC $> export DEVICE_TREE=stm32mp157c-dk2 PC $> make stm32mp15_trusted_defconfig PC $> make all
STM32MP157C-ED1 Evaluation daughterboard basic boot
PC $> export KBUILD_OUTPUT=../build/basic PC $> make stm32mp15_basic_defconfig PC $> make DEVICE_TREE=stm32mp157c-ed1 all
Trusted boot chain with external device tree
PC $> make stm32mp15_trusted_defconfig PC $> make EXT_DTB=boot/stm32mp157c-myboard.dtb all
<securetransclude src="ProtectedTemplate:PublicationRequestId" params="12895 | 2019-08-01 |"></securetransclude>