diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in index a58f7b75723..bffb7cfb19b 100644 --- a/boot/uboot/Config.in +++ b/boot/uboot/Config.in @@ -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 diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk index c89216fac47..574fc7089a5 100644 --- a/boot/uboot/uboot.mk +++ b/boot/uboot/uboot.mk @@ -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