Registered User mNo edit summary |
Registered User mNo edit summary Tag: 2017 source edit |
||
(26 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude>{{ApplicableFor | ||
{{ApplicableFor | MPUs list=STM32MP15x | MPUs checklist=STM32MP13x, STM32MP15x}} | | MPUs list=STM32MP15x | ||
</noinclude> | | MPUs checklist=STM32MP13x, STM32MP15x}}</noinclude> | ||
This article explains how to update the bootloader objects of the NOR memory, located on the {{Board | type=157x-EV1}}, using [[STM32CubeIDE]]. | |||
{{Warning|In this article, explanations are applicable to any version of Yocto-based OpenSTLinux embedded software.}} | |||
[[File:BackToNavigationTree button.png| | [[File:BackToNavigationTree button.png|300px|link=How to manage STM32MP1 OpenSTLinux projects in STM32CubeIDE]] | ||
==Overview== | ==Overview== | ||
The different steps to update NOR with customized trusted image are the following ones: | The different steps to update a NOR memory with a customized trusted image are the following ones: | ||
* Initialize the NOR with Starter Package image | * Initialize the NOR memory with the Starter Package image by means of the [[STM32CubeProgrammer]] | ||
* Within STM32CubeIDE: | * Within STM32CubeIDE: | ||
** customize the trusted image, | ** customize the trusted image, using the device trees generated by the embedded STM32CubeMX | ||
** compile corresponding Linux<sup>®</sup> device tree | ** compile the corresponding Linux<sup>®</sup> device tree and bootloader images | ||
** update them on running | ** update them on the running {{Board | type=157x-EV1}} | ||
* Check the new customization is correctly set up | * Check that the new customization is correctly set up | ||
<br> | <br> | ||
NOR memory contains only TF-A BL2 and FIP partitions | The NOR memory contains only the TF-A BL2 and FIP partitions. The Linux<sup>®</sup> partitions are located in the SD™ card. <br> | ||
All those steps are explained in chapters below. | All those steps are explained in the chapters below. | ||
==Initialize NOR with Starter Package== | ==Initialize the NOR memory with the Starter Package== | ||
Initialize the NOR with [[:Category:Starter_Package | Starter Package]] image | Initialize the NOR memory with the [[:Category:Starter_Package | Starter Package]] image with [[STM32CubeProgrammer]].<br> | ||
For that select the Starter package corresponding to the targeted | For that purpose, select the Starter package corresponding to the targeted {{Board | type=157x-EV1}} and jump to chapter [[STM32MP15_Evaluation_boards_-_Starter_Package#Downloading_the_image_and_flashing_it_on_the_board| Downloading the image and flashing it on the board]]. | ||
Before executing the next step, check the bootloader version, visible in ''boot messages'': | Before executing the next step, check the bootloader version, which is visible in ''boot messages'': | ||
* TF-A BL2 version, booting from NOR memory | * TF-A BL2 version, booting from the NOR memory | ||
[[File:NO-before-1.png|center | [[File:NO-before-1.png|600px|center|NOR initial setting: TF-A BL2 version| link=]] | ||
* U-boot version | * U-boot version and extlinux.conf file used, booting from the NOR memory | ||
[[File:NO-before-2.png|center | [[File:NO-before-2.png|600px|center|NOR initial setting: U-boot version & extlinux.conf| link=]] | ||
* extlinux.conf content before update | * extlinux.conf content before update | ||
[[File:NO-before-3.png|center | [[File:NO-before-3.png|400px|center|NOR initial setting: extlinux.conf content | link=]] | ||
==Customize bootloader images | == Customize and update bootloader images on the running {{Board | type=157x-EV1 | name=short}} board == | ||
===Build the ''trusted image'' inside STM32CubeIDE with the new expected device trees=== | ===Build the ''trusted image'' inside STM32CubeIDE with the new expected device trees=== | ||
After customization of hardware resources within embedded STM32CubeMX, new device trees for Linux<sup>®</sup> and for bootloader are generated. <br> | After the customization of hardware resources within the embedded STM32CubeMX, new device trees for Linux<sup>®</sup> and for the bootloader are generated.<br> | ||
The next step is to build an update of the new trusted image; this is covered also within STM32CubeIDE with: | |||
* bootloader images generation, as explained in [[How to manage OpenSTLinux projects in STM32CubeIDE#Bootloader_projects]] | * bootloader images generation, as explained in [[How to manage OpenSTLinux projects in STM32CubeIDE#Bootloader_projects]] | ||
* and Linux<sup>®</sup> device tree compilation [[How_to_manage_OpenSTLinux_projects_in_STM32CubeIDE#Linux_project]] | * and Linux<sup>®</sup> device tree compilation [[How_to_manage_OpenSTLinux_projects_in_STM32CubeIDE#Linux_project]] | ||
Note that for Linux<sup>®</sup>, only device tree | Note that for Linux<sup>®</sup>, only the device tree needs to be updated as described hereafter. | ||
=== | === {{Board | type=157x-EV1 | name=short}} board update with new Linux<sup>®</sup> device tree=== | ||
In this step, | In this step, the {{Board | type=157x-EV1}} is up and running with network access: [[How to use the Target Status widget in STM32CubeIDE|target status]] is green. | ||
After having compiled device tree generated by STM32CubeMX , you | After having compiled the device tree generated by STM32CubeMX, you must: | ||
* update | * update the STM32MP15x target bootfs with the new '''''.dtb''''' under '''''/boot''''' | ||
* and adjust '''''/boot/mmc0_extlinux/ | * and adjust '''''/boot/mmc0_extlinux/extlinux.conf''''' to declare the new device tree and set it as default. Note that this setup is done in the SD™ card memory since the Linux<sup>®</sup> partitions are located there. | ||
For that, follow steps explained below: | For that purpose, follow the steps explained below: | ||
* select the '''''Cortex-A Linux<sup>®</sup> Deployment''''' shortcut configuration available from Linux<sup>®</sup> project '''''Run As...''''' menu. | * select the '''''Cortex-A Linux<sup>®</sup> Deployment''''' shortcut configuration available from Linux<sup>®</sup> project '''''Run As...''''' menu. | ||
[[File:NO-init-1.png|850px|center|Linux<sup>®</sup> deployment configuration| link=]] | [[File:NO-init-1.png|850px|center|Linux<sup>®</sup> deployment configuration| link=]] | ||
*Validate your choice and use '''''Run''''' button. You get in a dedicated '''''Linux<sup>®</sup> Deployment''''' console a message like this: | *Validate your choice and use the '''''Run''''' button. You get in a dedicated '''''Linux<sup>®</sup> Deployment''''' console a message like this one: | ||
[[File: | [[File:NO-init-2.png|850px|center|NOR Linux<sup>®</sup> deployment message |link= ]] | ||
*Check extlinux.conf content after NOR Linux<sup>®</sup> device tree update (DEFAULT and LABEL have changed) | *Check extlinux.conf content after the NOR Linux<sup>®</sup> device tree update (DEFAULT and LABEL have changed) | ||
[[File:NO-init-3.png|600px|center|NOR Linux<sup>®</sup> device tree update |link=]] | [[File:NO-init-3.png|600px|center|NOR Linux<sup>®</sup> device tree update |link=]] | ||
=== | ==={{Board | type=157x-EV1 | name=short}} board update with new bootloader images=== | ||
In this step, | In this step, the {{Board | type=157x-EV1}} is up and running with network access: [[How to use the Target Status widget in STM32CubeIDE|target status]] is green.<br> | ||
After having built customized bootloader images, you | After having built customized bootloader images, you must update the {{Board | type=157x-EV1}}. | ||
* Select Cortex-A project in STM32CubeIDE and click | * Select the Cortex-A project in STM32CubeIDE and right-click to get the '''''Cortex-A Bootloader Deployment''''' shortcut. | ||
[[File:SD-init-0.png|850px|center|Bootloader update shortcut]] | [[File:SD-init-0.png|850px|center|Bootloader update shortcut]] | ||
The connection is automatically set and you need to scan the STM32MP15x target storage, using the '''''Scan...''''' button.<br> | |||
This storage list depends on the board and on the | This storage list depends on the board and on the boot storage used. | ||
Then, select the storage to update (NOR #0 here) and the TF-A BL2 | Then, select the storage to update (NOR #0 here), and the TF-A BL2 and FIP image to update from FIP_artifacts/.<br> | ||
Here is the corresponding ''STM32 Cortex-A Bootloader Deployment'' configuration: | Here is the corresponding ''STM32 Cortex-A Bootloader Deployment'' configuration: | ||
[[File:NO-init-4.png| | [[File:NO-init-4.png|750px|center|NOR Bootloader deployment configuration| link=]] | ||
* Click on '''''Run''''' | * Click on '''''Run'''''. You get in a dedicated '''''Bootloader Deployment''''' console the following message: | ||
[[File:NO-init-5.png| | [[File:NO-init-5.png|750px|center|NOR Bootloader deployment message| link=]] | ||
==Check new bootloader version after customization with STM32CubeIDE== | ==Check the new bootloader version after the customization with STM32CubeIDE== | ||
After the update, the new bootloader version can be checked by comparing | After the update, the new bootloader version can be checked by comparing the versions appearing in ''boot messages'': the TF-A BL2 and U-Boot versions are modified and Linux<sup>®</sup> uses the generated device tree.<br> | ||
Here are the new ''boot messages'' : | Here are the new ''boot messages'': | ||
* TF-A BL2 updated version, | * TF-A BL2 updated version, booting from the NOR memory | ||
[[File:NO-after-1.png|600px|center|NOR updated TF-A BL2 version| link=]] | [[File:NO-after-1.png|600px|center|NOR updated TF-A BL2 version| link=]] | ||
* U-Boot updated version | * U-Boot updated version and Linux<sup>®</sup> device tree, booting from the NOR memory | ||
[[File:NO-after-2.png| | [[File:NO-after-2.png|600px|center|NOR updated U-Boot version & Linux<sup>®</sup> device tree| link=]] | ||
[[File:BackToNavigationTree button.png|300px|link=How to manage STM32MP1 OpenSTLinux projects in STM32CubeIDE]] | |||
<noinclude> | |||
{{PublicationRequestId | 26422 |2023-03-10 }} | |||
</noinclude> |
Latest revision as of 09:02, 23 July 2025
This article explains how to update the bootloader objects of the NOR memory, located on the STM32MP157x-EV1 Evaluation board , using STM32CubeIDE.
1. Overview[edit | edit source]
The different steps to update a NOR memory with a customized trusted image are the following ones:
- Initialize the NOR memory with the Starter Package image by means of the STM32CubeProgrammer
- Within STM32CubeIDE:
- Check that the new customization is correctly set up
The NOR memory contains only the TF-A BL2 and FIP partitions. The Linux® partitions are located in the SD™ card.
All those steps are explained in the chapters below.
2. Initialize the NOR memory with the Starter Package[edit | edit source]
Initialize the NOR memory with the Starter Package image with STM32CubeProgrammer.
For that purpose, select the Starter package corresponding to the targeted STM32MP157x-EV1 Evaluation board and jump to chapter Downloading the image and flashing it on the board.
Before executing the next step, check the bootloader version, which is visible in boot messages:
- TF-A BL2 version, booting from the NOR memory

- U-boot version and extlinux.conf file used, booting from the NOR memory

- extlinux.conf content before update

3. Customize and update bootloader images on the running STM32MP157x-EV1
board[edit | edit source]
3.1. Build the trusted image inside STM32CubeIDE with the new expected device trees[edit | edit source]
After the customization of hardware resources within the embedded STM32CubeMX, new device trees for Linux® and for the bootloader are generated.
The next step is to build an update of the new trusted image; this is covered also within STM32CubeIDE with:
- bootloader images generation, as explained in How to manage OpenSTLinux projects in STM32CubeIDE#Bootloader_projects
- and Linux® device tree compilation How_to_manage_OpenSTLinux_projects_in_STM32CubeIDE#Linux_project
Note that for Linux®, only the device tree needs to be updated as described hereafter.
3.2. STM32MP157x-EV1
board update with new Linux® device tree[edit | edit source]
In this step, the STM32MP157x-EV1 Evaluation board is up and running with network access: target status is green.
After having compiled the device tree generated by STM32CubeMX, you must:
- update the STM32MP15x target bootfs with the new .dtb under /boot
- and adjust /boot/mmc0_extlinux/extlinux.conf to declare the new device tree and set it as default. Note that this setup is done in the SD™ card memory since the Linux® partitions are located there.
For that purpose, follow the steps explained below:
- select the Cortex-A Linux® Deployment shortcut configuration available from Linux® project Run As... menu.

- Validate your choice and use the Run button. You get in a dedicated Linux® Deployment console a message like this one:

- Check extlinux.conf content after the NOR Linux® device tree update (DEFAULT and LABEL have changed)

3.3. STM32MP157x-EV1
board update with new bootloader images[edit | edit source]
In this step, the STM32MP157x-EV1 Evaluation board is up and running with network access: target status is green.
After having built customized bootloader images, you must update the STM32MP157x-EV1 Evaluation board .
- Select the Cortex-A project in STM32CubeIDE and right-click to get the Cortex-A Bootloader Deployment shortcut.
The connection is automatically set and you need to scan the STM32MP15x target storage, using the Scan... button.
This storage list depends on the board and on the boot storage used.
Then, select the storage to update (NOR #0 here), and the TF-A BL2 and FIP image to update from FIP_artifacts/.
Here is the corresponding STM32 Cortex-A Bootloader Deployment configuration:

- Click on Run. You get in a dedicated Bootloader Deployment console the following message:

4. Check the new bootloader version after the customization with STM32CubeIDE[edit | edit source]
After the update, the new bootloader version can be checked by comparing the versions appearing in boot messages: the TF-A BL2 and U-Boot versions are modified and Linux® uses the generated device tree.
Here are the new boot messages:
- TF-A BL2 updated version, booting from the NOR memory

- U-Boot updated version and Linux® device tree, booting from the NOR memory
