Skip to content

rockchip: Support OP-TEE binaries in ARM FIT images

Alex Bee u-boot 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 7 repliesIn review
  2. v15 patches 2 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5rockchip: Support OP-TEE for ARM in FIT images created by binmanarch/arm/dts/rk3288-u-boot.dtsi arch/arm/dts/rockchip-optee.dtsi arch/arm/dts/rockchip-u-boot.dtsi+35 -681 reply
2/5configs: evb-rk3229: Increase SPL_STACK_R_MALLOC_SIMPLE_LENconfigs/evb-rk3229_defconfig+1 -11 reply
3/5rockchip: RK322x: Select SPL_OPTEE_IMAGEarch/arm/mach-rockchip/Kconfig+1 -01 reply
4/5rockchip: evb_rk3229: Update/fix READMEboard/rockchip/evb_rk3229/README+48 -241 reply
5/5optee: Support Rockchip OP-TEE binariesarch/arm/mach-rockchip/Kconfig common/spl/spl_optee.S+12 -03 replies

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchKever Yang
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

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

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

Signature · 1 line
2.41.0