[PATCH v2 0/5] rockchip: Support OP-TEE binaries in ARM FIT images

Alex Bee knaerzche at gmail.com
Tue Jul 18 16:57:10 CEST 2023


This adds support for OP-TEE binaries to Rockchip's ARM FIT image 
generation by binman.

Currently there is an extra (and outdated) rockchip-optee.dtsi which can
create an u-boot.itb which can also hold the OP-TEE binary. It has to be
included manually in the respective SoC-specific device trees. But even if
that is done, it won't be merged in rockchip-u-boot.bin, which aims to be 
platform-consistent.
The bootable FIT image must therefore currently be created manually.

This will be done automatically with this patch-set and a single
u-boot-rockchip.bin file with an bootable FIT image containing all
binaries will be generated.

Additionally this series adds a configuration option which has to be
set if a vendor-provided OP-TEE binary is used. This is required as those
use a different calling convention.
For RK3036, RK3128 and RK3288 SoCs this currently the only option to get an
TEE, as no upstream implementation exists for them.
Those binaries can be found at [1]

There are also some adaptions for RK322x in order to successfully use that
FIT image and some changes to the documenation.

This series has been tested on RK3229 (both vendor and upstream OP-TEE) and
RK3288 (vendor implementation only).

[1] https://github.com/rockchip-linux/rkbin

Changes in v2:

1/5:
 * whitespace fixes in rockchip-u-boot.dtsi
2/5:
 * instead of dropping CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN, set it to the
   current default value
3/5:
 * fix: `select SPL_OPTEE_IMAGE` instead of `select CONFIG_SPL_OPTEE_IMAGE`
   in Kconfig
4/5:
 * refer to use "tee-raw.bin" instead of "tee-pager_v2.bin" in README
   (Jerome Forissier)
5/5:
 * drop empty line in Kconfig help text
 * fix subject "OPTEE" -> "OP-TEE"
 * ROCKCHIP_OPTEE_BINARY should depend on SPL_OPTEE_IMAGE only, as the
   latter depends on SPL_FIT already
   (via `depends on SPL_LOAD_FIT || SPL_LOAD_FIT_FULL`)

Alex Bee (5):
  rockchip: Support OP-TEE for ARM in FIT images created by binman
  configs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LEN
  rockchip: RK322x: Select SPL_OPTEE_IMAGE
  rockchip: evb_rk3229: Update/fix README
  optee: Support Rockchip OP-TEE binaries

 arch/arm/dts/rk3288-u-boot.dtsi   |  1 -
 arch/arm/dts/rockchip-optee.dtsi  | 64 ---------------------------
 arch/arm/dts/rockchip-u-boot.dtsi | 38 ++++++++++++++--
 arch/arm/mach-rockchip/Kconfig    |  9 ++++
 board/rockchip/evb_rk3229/README  | 72 ++++++++++++++++++++-----------
 common/spl/spl_optee.S            |  4 ++
 configs/evb-rk3229_defconfig      |  2 +-
 7 files changed, 97 insertions(+), 93 deletions(-)
 delete mode 100644 arch/arm/dts/rockchip-optee.dtsi


base-commit: 890233ca5569e5787d8407596a12b9fca80952bf
-- 
2.41.0



More information about the U-Boot mailing list