Registered User mNo edit summary |
Registered User m (Reverted edits by Registered User (-) to last revision by Registered User) Tag: Rollback |
||
(21 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
= | This article briefly describes the {{MicroprocessorDevice | device=15}} support in [[U-Boot_overview|U-Boot]]. | ||
== {{MicroprocessorDevice | device=15}} support == | |||
= | For detailed information, please read the file in the delivered U-Boot code = {{CodeSource | U-Boot | doc/board/st/stm32mp1.rst}} or the stm32mp1 documentation generated by <code>make htlmdocs</code><ref>https://u-boot.readthedocs.io/en/stable/board/st/stm32mp1.html</ref>. | ||
Also available in official U-Boot Git. | |||
Code : | Code : | ||
* arch/arm/mach-stm32mp : arch specific code for | * {{CodeSource | U-Boot | arch/arm/mach-stm32mp}}: arch specific code for {{MicroprocessorDevice | device=Class}} | ||
* board/st/stm32mp1: generic STMicroelectronics board for | * {{CodeSource | U-Boot | board/st/common}}: STMicroelectronics common code | ||
* {{CodeSource | U-Boot | board/st/stm32mp1}}: generic STMicroelectronics board for {{MicroprocessorDevice | device=1}} | |||
* drivers/*/*stm32* : drivers | * drivers/*/*stm32* : drivers | ||
Configuration Files: | Configuration Files: | ||
* defconfig file | * defconfig file | ||
** configs/stm32mp15_basic_defconfig | ** {{CodeSource | U-Boot | configs/stm32mp15_basic_defconfig}} | ||
** | ** {{CodeSource | U-Boot | configs/stm32mp15_trusted_defconfig}} | ||
* config files | * config files | ||
** include/configs/stm32mp1.h | ** {{CodeSource | U-Boot | include/configs/stm32mp1.h}} | ||
* | * [[STM32MP15_device_tree]] in {{CodeSource | U-Boot | arch/arm/dts }} : stm32mp15*.dts* | ||
** {{HighlightParam|<Device tree>}}.dts : same as kernel | |||
** | ** {{HighlightParam|<Device tree>}}-u-boot.dtsi : addition for u-boot automatically included in build process | ||
== Selecting targets : choose defconfig and Device Tree == | |||
The [[Boot_chain_overview|STM32 MPU boot chain]] is supported by one [[U-Boot_overview#Kbuild|U-Boot configuration with defconfig]] = {{HighlightParam|stm32mp15_trusted_defconfig}} | |||
Several [[STM32MP15_boards|boards]] are supported with the associated device-tree (same name as kernel): | |||
{| class=" | {| class="st-table" | ||
|- | |- | ||
! | ! Board part number !! {{HighlightParam|Device tree}} !! Description | ||
|- | |- | ||
| '''{{Board | type=157A-EV1}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp157a-ev1.dts|stm32mp157a-ev1}} || rowspan="4" | [[MB1262]]+[[MB1263]] | |||
|- | |- | ||
| | | '''{{Board | type=157C-EV1}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp157c-ev1.dts|stm32mp157c-ev1}} | ||
|- | |- | ||
| '''{{Board | type=157D-EV1}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp157d-ev1.dts|stm32mp157d-ev1}} | |||
|- | |- | ||
| '''{{Board | type=157F-EV1}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp157f-ev1.dts|stm32mp157f-ev1}} | |||
|- | |- | ||
| ''' | | '''{{Board | type=157A-DK1}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp157a-dk1.dts|stm32mp157a-dk1}} || rowspan="2" | [[MB1272]] | ||
|- | |- | ||
| ''' | | '''{{Board | type=157D-DK1}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp157d-dk1.dts|stm32mp157d-dk1}} | ||
|- | |- | ||
| ''' | | '''{{Board | type=157C-DK2}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp157c-dk2.dts|stm32mp157c-dk2}} || rowspan="2" | [[MB1272]]+[[MB1407]] | ||
|- | |- | ||
| ''' | | '''{{Board | type=157F-DK2}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp157f-dk2.dts|stm32mp157f-dk2}} | ||
|} | |} | ||
For information the 'Evaluation' daughter-board only ([[MB1263]] without [[MB1262]]) is also supported by stm32mp15*-ed1.dts device tree files. | |||
== Compilation == | |||
see [[U-Boot_overview#U-Boot_build]] | see [[U-Boot_overview#U-Boot_build]] | ||
With | With the defconfig file: {{HighlightParam|stm32mp15_trusted_defconfig}} | ||
$ | {{PC$}} make {{HighlightParam|stm32mp15_trusted_defconfig}} | ||
$ | {{PC$}} make DEVICE_TREE={{HighlightParam|<Device tree>}} all | ||
*'''DEVICE_TREE''': select in arch/arm/dts the device tree that is used | 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 | * '''KBUILD_OUTPUT''': change the destination directory for the build | ||
* '''EXT_DTB''': select external device tree | * '''EXT_DTB''': select external device tree | ||
The ouput file is {{Highlight|'''u-boot.stm32'''}}. | |||
== 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 | This alternate boot chain with SPL is not supported/promoted by STMicroelectronics to make product.}} | |||
== Examples == | == Examples == | ||
===EV1 | === {{Board | type=157F-EV1}} === | ||
$ | {{PC$}} make {{HighlightParam|stm32mp15_trusted_defconfig}} | ||
$ | {{PC$}} make DEVICE_TREE={{HighlightParam|stm32mp157f-ev1}} all | ||
=== {{Board | type=157C-EV1}} === | |||
{{PC$}} make {{HighlightParam|stm32mp15_trusted_defconfig}} | |||
{{PC$}} make DEVICE_TREE={{HighlightParam|stm32mp157c-ev1}} all | |||
=== {{Board | type=157D-DK1}} === | |||
{{PC$}} make {{HighlightParam|stm32mp15_trusted_defconfig}} | |||
{{PC$}} make DEVICE_TREE={{HighlightParam|stm32mp157d-dk1}} all | |||
=== DK2 | === {{Board | type=157C-DK2}} === | ||
Using export to select the device tree | Using export to select the device tree | ||
$ | {{PC$}} export KBUILD_OUTPUT=../build/stm32mp15_trusted | ||
$ | {{PC$}} export DEVICE_TREE={{HighlightParam|stm32mp157c-dk2}} | ||
$ | {{PC$}} make {{HighlightParam|stm32mp15_trusted_defconfig}} | ||
$ | {{PC$}} make all | ||
=== | === Custom board with external device tree === | ||
$ | {{PC$}} make {{HighlightParam|stm32mp15_trusted_defconfig}} | ||
{{PC$}} make EXT_DTB={{HighlightParam|stm32mp151a-myboard.dtb}} all | |||
$ | |||
=== | === SPL for {{Board | type=157F-EV1}} === | ||
$ | {{PC$}} make stm32mp15_basic_defconfig | ||
$ | {{PC$}} make DEVICE_TREE={{HighlightParam|stm32mp157f-ev1}} all | ||
<noinclude> | <noinclude> |
Latest revision as of 19:14, 1 February 2021
This article briefly describes the STM32MP15x lines support in U-Boot.
1. STM32MP15x lines
support[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
- board/st/common : STMicroelectronics common code
- board/st/stm32mp1 : generic STMicroelectronics board for STM32MP1 Series
- drivers/*/*stm32* : drivers
Configuration Files:
- defconfig file
- config files
- STM32MP15_device_tree in arch/arm/dts : stm32mp15*.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 source]
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 ![]() |
stm32mp157a-ev1 | MB1262+MB1263 |
STM32MP157C-EV1 Evaluation board ![]() |
stm32mp157c-ev1 | |
STM32MP157D-EV1 Evaluation board ![]() |
stm32mp157d-ev1 | |
STM32MP157F-EV1 Evaluation board ![]() |
stm32mp157f-ev1 | |
STM32MP157A-DK1 Discovery kit ![]() |
stm32mp157a-dk1 | MB1272 |
STM32MP157D-DK1 Discovery kit ![]() |
stm32mp157d-dk1 | |
STM32MP157C-DK2 Discovery kit ![]() |
stm32mp157c-dk2 | MB1272+MB1407 |
STM32MP157F-DK2 Discovery kit ![]() |
stm32mp157f-dk2 |
For information the 'Evaluation' daughter-board only (MB1263 without MB1262) is also supported by stm32mp15*-ed1.dts device tree files.
3. Compilation[edit source]
see U-Boot_overview#U-Boot_build
With the defconfig file: stm32mp15_trusted_defconfig
stm32mp15_trusted_defconfig make DEVICE_TREE=<Device tree> allmake
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[edit source]
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
5. Examples[edit source]
5.1. STM32MP157F-EV1 Evaluation board
[edit source]
stm32mp15_trusted_defconfig make DEVICE_TREE=stm32mp157f-ev1 allmake
5.2. STM32MP157C-EV1 Evaluation board
[edit source]
stm32mp15_trusted_defconfig make DEVICE_TREE=stm32mp157c-ev1 allmake
5.3. STM32MP157D-DK1 Discovery kit
[edit source]
stm32mp15_trusted_defconfig make DEVICE_TREE=stm32mp157d-dk1 allmake
5.4. STM32MP157C-DK2 Discovery kit
[edit source]
Using export to select the device tree
stm32mp157c-dk2 make stm32mp15_trusted_defconfig make allexport KBUILD_OUTPUT=../build/stm32mp15_trusted export DEVICE_TREE=
5.5. Custom board with external device tree[edit source]
stm32mp15_trusted_defconfig make EXT_DTB=stm32mp151a-myboard.dtb allmake
5.6. SPL for STM32MP157F-EV1 Evaluation board
[edit source]
stm32mp157f-ev1 allmake stm32mp15_basic_defconfig make DEVICE_TREE=