2022-04-17 07:39 AM
I followed some of the steps to integrate OPTEE with Yocto builds as below.
meta-bsp-stm32mp1/conf/machine/stm32mp157f.conf
MACHINE_FEATURES +="optee"
BOOTSCHEME_LABELS += "optee"
meta-product-stm32mp157x-dk2/conf/distro/pxred-stm32mp1-dk2.conf - distro changes
DISTRO_FEATURES_append = " px-red-kinit-e2fsprogs \
optee \ "
The following is the boot message I get on terminal
NOTICE: CPU: STM32MP157FAC Rev.Z
NOTICE: Model: STMicroelectronics STM32MP157F-DK2 Discovery Board
NOTICE: Board: MB1272 Var4.0 Rev.C-02
INFO: Reset reason (0x15):
INFO: Power-on Reset (rst_por)
INFO: PMIC version = 0x20
INFO: Using SDMMC
INFO: Instance 1
INFO: Boot used partition fsbl1
NOTICE: BL2: v2.2-r2.3(debug):v2.2-dirty
NOTICE: BL2: Built : 08:34:06, Apr 17 2022
INFO: Using crypto library 'stm32_crypto_lib'
INFO: BL2: Doing platform setup
INFO: RAM: DDR3-DDR3L 16bits 533000Khz
INFO: Memory size = 0x20000000 (512 MB)
INFO: BL2 runs OP-TEE setup
INFO: BL2: Loading image id 4
INFO: Loading image id=4 at address 0x2ffc0000
INFO: STM32 Image size : 512
INFO: Image id=4 loaded: 0x2ffc0000 - 0x2ffc0200
WARNING: Skip signature check (header option)
NOTICE: ROTPK is not deployed on platform. Skipping ROTPK verification.
INFO: OPTEE ep=0x2ffc0000
INFO: OPTEE header info:
INFO: magic=0x4554504f
INFO: version=0x2
INFO: arch=0x0
INFO: flags=0x0
INFO: nb_images=0x2
INFO: BL2: Loading image id 21
INFO: Loading image id=21 at address 0x2ffc0000
INFO: STM32 Image size : 68960
INFO: Image id=21 loaded: 0x2ffc0000 - 0x2ffd0d60
WARNING: Skip signature check (header option)
NOTICE: ROTPK is not deployed on platform. Skipping ROTPK verification.
INFO: BL2: Loading image id 22
INFO: Loading image id=22 at address 0xde000000
INFO: STM32 Image size : 233472
INFO: Image id=22 loaded: 0xde000000 - 0xde039000
WARNING: Skip signature check (header option)
NOTICE: ROTPK is not deployed on platform. Skipping ROTPK verification.
INFO: BL2: Loading image id 5
INFO: Loading image id=5 at address 0xc0100000
INFO: STM32 Image size : 904892
INFO: Image id=5 loaded: 0xc0100000 - 0xc01dcebc
WARNING: Skip signature check (header option)
NOTICE: ROTPK is not deployed on platform. Skipping ROTPK verification.
NOTICE: BL2: Booting BL32
INFO: Entry point address = 0x2ffc0000
INFO: SPSR = 0x1d3
I/TC: Early console on UART#4
I/TC:
I/TC: Pager is enabled. Hashes: 1920 bytes
I/TC: Pager pool size: 112kB
I/TC: No non-secure external DT
I/TC: Embedded DTB found
I/TC: OP-TEE version: 3.9.0-dev (gcc version 9.3.0 (GCC)) #1 Sun Apr 17 08:35:13 UTC 2022 arm
I/TC: Platform stm32mp1: flavor PLATFORM_FLAVOR - DT stm32mp157f-dk2.dts
I/TC: DT clock tree configurations were ignored
I/TC: DTB enables console (non-secure)
I/TC: Initialized
U-Boot 2020.01-stm32mp-r2.2 (Apr 17 2022 - 08:21:32 +0000)
CPU: STM32MP157FAC Rev.Z
Model: STMicroelectronics STM32MP157F-DK2 Discovery Board
Board: stm32mp1 in trusted mode (st,stm32mp157f-dk2)
Board: MB1272 Var4.0 Rev.C-02
DRAM: 512 MiB
Clocks:
- MPU : 800 MHz
- MCU : 208.878 MHz
- AXI : 266.500 MHz
- PER : 24 MHz
- DDR : 533 MHz
WDT: Started with servicing (32s timeout)
NAND: 0 MiB
MMC: STM32 SD/MMC: 0, STM32 SD/MMC: 1
Loading Environment from MMC... *** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: eth0: ethernet@5800a000
Hit any key to stop autoboot: 0
** Unrecognized filesystem type **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
My Flashlayout file generated has following sections
#Opt Id Name Type IP Offset Binary
- 0x01 fsbl1-boot Binary none 0x0 arm-trusted-firmware/tf-a-stm32mp157f-dk2-serialboot.stm32
- 0x03 ssbl-boot Binary none 0x0 bootloader/u-boot-stm32mp157f-dk2-optee.stm32
P 0x04 fsbl1 Binary mmc0 0x00004400 arm-trusted-firmware/tf-a-stm32mp157f-dk2-optee.stm32
P 0x05 fsbl2 Binary mmc0 0x00044400 arm-trusted-firmware/tf-a-stm32mp157f-dk2-optee.stm32
PD 0x06 ssbl Binary mmc0 0x00084400 bootloader/u-boot-stm32mp157f-dk2-optee.stm32
PD 0x0A teeh Binary mmc0 0x00284400 optee/tee-header_v2-stm32mp157f-dk2-optee.stm32
P 0x0B teed Binary mmc0 0x002C4400 optee/tee-pageable_v2-stm32mp157f-dk2-optee.stm32
P 0x0C teex Binary mmc0 0x00344400 optee/tee-pager_v2-stm32mp157f-dk2-optee.stm32
P 0x21 boot System mmc0 0x00384400 st-image-bootfs-pxred-stm32mp1-dk2-stm32mp157f.ext4
P 0x22 vendorfs FileSystem mmc0 0x04384400 st-image-vendorfs-pxred-stm32mp1-dk2-stm32mp157f.ext4
P 0x23 rootfs FileSystem mmc0 0x05384400 px-red-image-stm32mp157f.ext4
P 0x24 userfs FileSystem mmc0 0x33D84400 st-image-userfs-pxred-stm32mp1-dk2-stm32mp157f.ext4