cancel
Showing results for 
Search instead for 
Did you mean: 

STM32MP157F-DK2 TF-A Build Error

bblouin
Associate III

Hi, I'm trying to set up the TF-A sp_min for the 157F-DK2. Here is the info I have.

  1. Build Environment
    1. Ubuntu 22.04
      1. Used for OpenSSL 3.0 support
        1. Needed because trusted-firmware-a cert_create requires 3.0; ST calls are deprecated.
    2. Toolchains
      1. GCC: arm-none-eabi-gcc --version = 10.3.1
      2. Linaro: arm-linux-gnueabihf- --version = 12.0.1 (20220205)
    3. KeyGen_CLI
STM32MP_KEYGEN_CLI --abs=/home/<user>/keys/ -pwd <password>
  1. SigningTool_CLI
STM32MP_SigningTool_CLI -bin $HOME/starter-image/stm32mp1-openstlinux-5.10-dunfell-mp1-21-11-17/images/stm32mp1/arm-trusted-firmware/tf-a-stm32mp157f-dk2-sdcard.stm32 -pubk $HOME/keys/publicKey.pem -prvk $HOME/keys/privateKey.pem -pwd <password> -t fsbl -o $HOME/signedFile.bin
  1. This works, I can boot the FSBL authenticated.
    1. 0693W00000NrKFYQA3.png

  1. Build ST U-Boot
make CROSS_COMPILE=arm-none-eabi- DEVICE_TREE=stm32mp157f-dk2 all 
  1. Build TF-A
make CROSS_COMPILE=arm-none-eabi- PLAT=stm32mp1 ARCH=aarch32 ARM_ARCH_MAJOR=7 AARCH32_SP=sp_min BL33=$HOME/u-boot/u-boot-nodtb.bin BL33_CFG=$HOME/u-boot/u-boot.dtb DTB_FILE_NAME=stm32mp157f-dk2 TRUSTED_BOARD_BOOT=1 GENERATE_COT=1 ROT_KEY=$HOME/keys/privateKey.pem fip

ERROR

When I build with the command above it finishes but references the 157C-dk2 during BL2 building.

0693W00000NrKHKQA3.pngWhen I build with the STM32MP_SDMMC=1 I get the following DFU boot error.

0693W00000NrKIhQAN.pngWhen I flash I get this error in U-Boot DFU mode using the FIP without the SDMMC code I get an error

can not erease FIP

GOALS

I need to have the most basic sp_min setup for the 157F-DK2 working.

There are many walkthroughs from ST and ARM TF-A; I'd like to have one that actually works.

1 ACCEPTED SOLUTION

Accepted Solutions
OlivierK
ST Employee

Hi bblouin (Community Member),

For the Build TF-A you need to specify the DTB file name:

DTB_FILE_NAME=stm32mp157f-dk2.dtb

https://wiki.st.com/stm32mpu/wiki/How_to_configure_TF-A_SP-MIN

Also, you'd better source the SDK environment so that your cross compile variable will be set

$ echo $CROSS_COMPILE

arm-ostl-linux-gnueabi-

https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package#Installing_the_SDK

Regards,

Olivier

View solution in original post

1 REPLY 1
OlivierK
ST Employee

Hi bblouin (Community Member),

For the Build TF-A you need to specify the DTB file name:

DTB_FILE_NAME=stm32mp157f-dk2.dtb

https://wiki.st.com/stm32mpu/wiki/How_to_configure_TF-A_SP-MIN

Also, you'd better source the SDK environment so that your cross compile variable will be set

$ echo $CROSS_COMPILE

arm-ostl-linux-gnueabi-

https://wiki.st.com/stm32mpu/wiki/STM32MP1_Developer_Package#Installing_the_SDK

Regards,

Olivier