Skip to content

Commit

Permalink
boot/uboot: add support for bundling TEE in ELF format into U-Boot
Browse files Browse the repository at this point in the history
Some U-Boot platforms (e.g. rockchip) can bundle OPTEE's tee.elf
into the U-Boot image. This patch brings the necessary changes to
enable this feature.

Signed-off-by: Christoph Muellner <[email protected]>
Signed-off-by: Thomas Petazzoni <[email protected]>
  • Loading branch information
cmuellner authored and tpetazzoni committed Dec 30, 2021
1 parent 0979a9e commit 5521539
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions boot/uboot/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,15 @@ config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF

endchoice

config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE
bool "U-Boot needs OPTEE TEE"
depends on BR2_TARGET_OPTEE_OS_CORE
help
Some platforms (such as Rockchip) encapsulate the TEE inside
U-Boot. This option makes sure optee-os gets built prior to
U-Boot, and that the TEE variable pointing to OPTEE's
tee.elf, is passed during the Buildroot build.

config BR2_TARGET_UBOOT_NEEDS_OPENSBI
bool "U-Boot needs OpenSBI"
depends on BR2_TARGET_OPENSBI
Expand Down
5 changes: 5 additions & 0 deletions boot/uboot/uboot.mk
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,11 @@ UBOOT_PRE_BUILD_HOOKS += UBOOT_COPY_ATF_FIRMWARE
endif
endif

ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE),y)
UBOOT_DEPENDENCIES += optee-os
UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
endif

ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPENSBI),y)
UBOOT_DEPENDENCIES += opensbi
UBOOT_MAKE_OPTS += OPENSBI=$(BINARIES_DIR)/fw_dynamic.bin
Expand Down

0 comments on commit 5521539

Please sign in to comment.