Skip to contentSkip to conversation

rk3399: Loading OP-TEE by SPL?

DISCUSSION Christoph Fritz 2 participants 2 messages Feb 21, 2023 – Feb 22, 2023

lore
Share & tools
lore
#0 lore raw

Hello,

my goal is to load OP-TEE after BL31 and before u-boot, so I enabled CONFIG_SPL_OPTEE_IMAGE.

But it fails to build (tested current master):

 $ make -j$(nproc) CROSS_COMPILE=aarch64-linux-gnu- rock-pi-4-rk3399_defconfig all

./arch/arm/include/asm/unified.h: Assembler messages:
./arch/arm/include/asm/unified.h:12: Error: unknown pseudo-op: .syntax' common/spl/spl_optee.S:11: Error: operand 1 must be an integer register -- mov pc,r3' make[3]: *** [scripts/Makefile.build:292: spl/common/spl/spl_optee.o] Error 1 make[2]: *** [scripts/Makefile.spl:533: spl/common/spl] Error 2
make[2]: *** Waiting for unfinished jobs....

Without CONFIG_SPL_OPTEE_IMAGE the board starts like this:
TPL -> SPL -> BL31 -> u-boot

What's the correct way to start OP-TEE on rk3399?

Any ideas?

Thanks
-- Christoph

#1 lore raw

Hi Christoph,

    The SPL_OPTEE_IMAGE is suppose to use like ATF for armv7:

    TPL->SPL->BL31/ATF/OPTEE->U-Boot.

    But not for OPTEE use as a BL32 after BL31.

    BL31 and U-Boot is package as a itb file, so it's easy to add a BL32, but you may need to

study how BL31 get entry to BL32 and then add support for it.

Thanks,

- Kever

Quoted 26 lines · Christoph Fritz

Hello,

my goal is to load OP-TEE after BL31 and before u-boot, so I enabled CONFIG_SPL_OPTEE_IMAGE.

But it fails to build (tested current master):

  $ make -j$(nproc) CROSS_COMPILE=aarch64-linux-gnu- rock-pi-4-rk3399_defconfig all

./arch/arm/include/asm/unified.h: Assembler messages:
./arch/arm/include/asm/unified.h:12: Error: unknown pseudo-op: .syntax' common/spl/spl_optee.S:11: Error: operand 1 must be an integer register -- mov pc,r3' make[3]: *** [scripts/Makefile.build:292: spl/common/spl/spl_optee.o] Error 1 make[2]: *** [scripts/Makefile.spl:533: spl/common/spl] Error 2
make[2]: *** Waiting for unfinished jobs....

Without CONFIG_SPL_OPTEE_IMAGE the board starts like this:
TPL -> SPL -> BL31 -> u-boot

What's the correct way to start OP-TEE on rk3399?

Any ideas?

Thanks
-- Christoph