2023-12-28 07:33 AM - edited 2023-12-28 04:18 PM
Hello all,
As part of the evaluation of the 32MP15 series, I was trying to build the u-boot and TF-A binaries.
I tried the u-boot SPL bring up and it seems to be working fine (except for failure to launch the Linux Kernel, as per your late updates).
For U-boot, I used : https://github.com/STMicroelectronics/u-boot
And Build commands:
$ make -j12 stm32mp15_defconfig
$ make -j12 DEVICE_TREE=stm32mp157d-dk1 all
For TF-A binary, I used : https://github.com/STMicroelectronics/arm-trusted-firmware/tree/v2.8-stm32mp
And Build command of BL32 (SP MIN mode):
$ make -j12 ARM_ARCH_MAJOR=7 ARCH=aarch32 PLAT=stm32mp1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157d-dk1.dtb bl32 dtbs
and Build command of BL2:
make -j12 ARM_ARCH_MAJOR=7 ARCH=aarch32 PLAT=stm32mp1 STM32MP_SDMMC=1 STM32MP15=1 DTB_FILE_NAME=stm32mp157d-dk1.dtb LOG_LEVEL=40 DEBUG=1
and to generate FIP binary from TF-A Makefile, I used:
$ make ARM_ARCH_MAJOR=7 ARCH=aarch32 PLAT=stm32mp1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157d-dk1.dtb BL33=../u-boot/build_custom_stmp32mp15/u-boot-nodtb.bin BL33_CFG=../u-boot/build_custom_stmp32mp15/u-boot.dtb fip
Using the fip.bin & tf-a-stm32mp157d-dk1.stm32 ,
The TF-A failed to load the kernel and kept resetting, the following log was showed up:
NOTICE: CPU: STM32MP157DAC Rev.Z
NOTICE: Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
NOTICE: Board: MB1272 Var3.0 Rev.C-02
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: PMIC version = 0x21
INFO: FCONF: Reading TB_FW firmware configuration file from: 0x2ffe2000
INFO: FCONF: Reading firmware configuration information for: stm32mp_io
INFO: Using SDMMC
INFO: Instance 1
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.4-r2.3(debug):v2.4-stm32mp-r2.3
NOTICE: BL2: Built : 23:18:08, Dec 28 2023
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-DDR3L 16bits 533000kHz
INFO: Memory size = 0x20000000 (512 MB)
INFO: BL2: Loading image id 31
INFO: Loading image id=31 at address 0x2ffff000
INFO: Image id=31 loaded: 0x2ffff000 - 0x2ffff226
INFO: FCONF: Reading FW_CONFIG firmware configuration file from: 0x2ffff000
INFO: FCONF: Reading firmware configuration information for: dyn_cfg
INFO: FCONF: Reading firmware configuration information for: stm32mp1_firewall
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2ffc5000
INFO: Image id=4 loaded: 0x2ffc5000 - 0x2ffd6590
WARNING: Not a known TEE, use default loading options.
INFO: BL2: Skip loading image id 21
INFO: BL2: Skip loading image id 22
INFO: BL2: Loading image id 23
INFO: Loading image id=23 at address 0xc0500000
INFO: Image id=23 loaded: 0xc0500000 - 0xc051ee40
INFO: BL2: Loading image id 26
INFO: Loading image id=26 at address 0x2ffc0000
INFO: Image id=26 loaded: 0x2ffc0000 - 0x2ffc477d
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0xc0100000
INFO: Image id=5 loaded: 0xc0100000 - 0xc01f1d6c
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2ffc5000
INFO: SPSR = 0x1d3
NOTICE: SP_MIN: v2.4-r2.3(release):v2.4-stm32mp-r2.3
NOTICE: SP_MIN: Built : 23:17:24, Dec 28 2023
NOTICE: CPU: STM32MP157DAC Rev.Z
NOTICE: Model: STMicroelectronics STM32MP157D-DK1 Discovery Board
NOTICE: Board: MB1272 Var3.0 Rev.C-02
INFO: Reset reason (0x54):
INFO: System reset generated by MPU (MPSYSRST)
INFO: PMIC version = 0x21
Note that if I replace the fip and TF-A with the ones generated by Yocto build, the Linux Kernel boots up.
So what could be causing TF-A to reboot right after boot BL32?
Solved! Go to Solution.
2024-01-02 05:44 AM
Hello @MuhammadTharwat ,
On which OpenSTLinux are you working on ? Could you consider to use OP-TEE instead of sp_min ? SP_MIN is no more supported on our recent deliveries.
Kind regards,
Erwan.
2024-01-02 05:44 AM
Hello @MuhammadTharwat ,
On which OpenSTLinux are you working on ? Could you consider to use OP-TEE instead of sp_min ? SP_MIN is no more supported on our recent deliveries.
Kind regards,
Erwan.
2024-01-02 05:54 AM
Hello Erwan,
The problem is not OpenSTLinux , I can confirm that it is the problem of U-boot.
I was using v2022.10-stm32mp & v2021.10-stm32mp and that did have the problem. When I switched to v2020.10-stm32mp, it works as expected.
So could that be attributed to the deprecated use of SP Min ?
BR,
Muhammad
2024-01-02 06:06 AM
@MuhammadTharwat ,
Great to hear that you tackled your issue. Hard to confirm for SP_MIN as I do not have enough information to do it. What is sure is that components version delivered in one OpenSTLinux release should be kept aligned to work properly.
Kind regards,
Erwan.
2024-01-02 06:12 AM
I'm using openstlinux-5.10.
That still uses U-boot v2020.10-stm32mp-r2.2 in SP Min mode (as per the commit history and U-boot start-up logs)
so the U-boot versions v2022.10-stm32mp & v2021.10-stm32mp are broken ???
2024-01-02 06:20 AM
@MuhammadTharwat ,
OpenSTLinux is the Ecosystem distribution version. If you have a Linux kernel 5-10, it means that you are on OpenSTLinux v3.
To know the version of the components that must be kept aligned with this release, you can check this article : https://wiki.st.com/stm32mpu-ecosystem-v3/wiki/STM32MP15_OpenSTLinux_release_note_-_v3.0.0#Delivered_features
Kind regards,
Erwan.
2024-01-02 06:36 AM
Indeed OpenSTLinux v3. is using U-Boot v2020.10-stm32mp-r1.
Since OpenSTLinux v3. is the latest release, it means U-boot v2022.10-stm32mp & v2021.10-stm32mp have never been part of a formal release ??
2024-01-02 06:40 AM
@MuhammadTharwat ,
OpenSTLinux v3 has been released 2/3 years ago. We had OpenSTLinux v4 and v5 between.
V4 Release : https://wiki.st.com/stm32mpu-ecosystem-v4/wiki/STM32_MPU_OpenSTLinux_release_note_-_v4.0.0#Main_software_components
Current Release (v5 at the moment I write this message) : https://wiki.st.com/stm32mpu/wiki/STM32_MPU_OpenSTLinux_release_note#Release_content
Kind regards,
Erwan.