This article gives details about updating the bootloader objects of NOR memory, located onto STM32MP157x-EV1 (e.g.), using STM32CubeIDE.
1. Overview[edit source]
Here is the process used:
- NOR is first initialized with Starter Package image thanks to STM32CubeProgrammer.
- The trusted image is built inside STM32CubeIDE with device tree configured using embedded STM32CubeMX.
- Next step is to update STM32MP15 board; this means the STM32MP15 board is up and running with network access: target status is green.
- The way to check this customization is to compare version appearing in boot message.
NOR memory contains only TF-A BL2 and FIP partitions, Linux partitions are located on SD-Card.
2. Bootloader version after update with Starter Package[edit source]
Here are the TF-A BL2, U-boot version and the used extlinux.conf file used in Starter Package.
They all appear in boot messages.
- TF-A BL2 version, booting from NOR memory
- U-boot version & extlinux.conf file used, booting from NOR memory
- extlinux.conf content before update.
3. Customizing bootloader with STM32CubeIDE[edit source]
After compiling device tree generated by STM32CubeMX we need to :
- update MP15 target bootfs with new .dtb under /boot
- and adjust /boot/mmc0_extlinux/stm32mp157c-ev1_extlinux.conf in order to declare new device tree and set it as default. Note that this setup is done on SD card memory since Linux partitions are located there.
This is done thanks to Cortex-A Linux® Deployment shortcut configuration available from Linux® project Run As... menu.
- Linux® deployment configuration
- NOR Linux® deployment message
- NOR Linux® device tree update
Then, select Cortex-A project and right click to get Cortex-A Bootloader Deployment shortcut.
Connection is automatically set and you need to scan MP15 target storage. This storage list depends on the board and on boot storage used. Then, select:
- the storage to update, NOR #0 here;
- TF-A BL2 & FIP image to update from FIP_artifacts/ .
- NOR bootloader deployment configuration
- NOR bootloader deployment message
4. Bootloader version after customization wit STM32CubeIDE[edit source]
After the update, TF-A BL2 and U-Boot versions are modified and Linux® uses the generated Device Tree. Here are the boot messages now:
- TF-A BL2 updated version, booting from NOR memory
- U-Boot updated version & Linux® device tree, booting from NOR memory