@@ -268,13 +268,26 @@ config BR2_TARGET_UBOOT_NEEDS_ATF_BL31_ELF
endchoice
config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE
- bool "U-Boot needs OPTEE TEE"
+ bool "U-Boot needs OP-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.
+ U-Boot. This option makes sure optee-os is built prior to
+ U-Boot, and that the TEE variable, pointing to the OP-TEE
+ binary, is passed during the Buildroot build.
+
+choice
+ prompt "U-Boot OP-TEE format"
+ default BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_ELF
+ depends on BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE
+
+config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_ELF
+ bool "tee.elf"
+
+config BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_PAGER_V2_BIN
+ bool "tee-pager_v2.bin"
+
+endchoice
config BR2_TARGET_UBOOT_NEEDS_OPENSBI
bool "U-Boot needs OpenSBI"
@@ -196,7 +196,11 @@ endif
ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE),y)
UBOOT_DEPENDENCIES += optee-os
+ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_ELF),y)
UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee.elf
+else ifeq ($(BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_PAGER_V2_BIN),y)
+UBOOT_MAKE_OPTS += TEE=$(BINARIES_DIR)/tee-pager_v2.bin
+endif
endif
# TI K3 devices needs at least ti-sysfw (System Firmware) provided
@@ -37,12 +37,13 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="j721e_beagleboneai64_a72"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_PAGER_V2_BIN=y
BR2_TARGET_UBOOT_USE_BINMAN=y
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="tispl.bin_unsigned"
-BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
@@ -42,6 +42,8 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_beagleplay_a53"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_PAGER_V2_BIN=y
BR2_TARGET_UBOOT_USE_BINMAN=y
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
BR2_TARGET_UBOOT_FORMAT_IMG=y
@@ -49,7 +51,6 @@ BR2_TARGET_UBOOT_FORMAT_CUSTOM=y
BR2_TARGET_UBOOT_FORMAT_CUSTOM_NAME="u-boot.img_unsigned"
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="tispl.bin_unsigned"
-BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
@@ -34,12 +34,13 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62ax_evm_a53"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_PAGER_V2_BIN=y
BR2_TARGET_UBOOT_USE_BINMAN=y
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
-BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
@@ -37,12 +37,13 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_evm_a53"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_PAGER_V2_BIN=y
BR2_TARGET_UBOOT_USE_BINMAN=y
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
-BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
@@ -37,12 +37,13 @@ BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am64x_evm_a53"
BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE=y
+BR2_TARGET_UBOOT_NEEDS_OPTEE_TEE_PAGER_V2_BIN=y
BR2_TARGET_UBOOT_USE_BINMAN=y
# BR2_TARGET_UBOOT_FORMAT_BIN is not set
BR2_TARGET_UBOOT_FORMAT_IMG=y
BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="tispl.bin"
-BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="TEE=$(BINARIES_DIR)/tee-pager_v2.bin"
BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y
There are a few different versions of OP-TEE we can select. Rather than manually adding these in the BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS field, allow them to be selectable from the U-Boot menu. Signed-off-by: Bryan Brattlof <bb@ti.com> --- boot/uboot/Config.in | 21 +++++++++++++++++---- boot/uboot/uboot.mk | 4 ++++ configs/beagleboneai64_defconfig | 3 ++- configs/beagleplay_defconfig | 3 ++- configs/ti_am62ax_sk_defconfig | 3 ++- configs/ti_am62x_sk_defconfig | 3 ++- configs/ti_am64x_sk_defconfig | 3 ++- 7 files changed, 31 insertions(+), 9 deletions(-) --- base-commit: 0ad7035fce67cbe91db9dea7d81e6a4bc0691ad1 change-id: 20241014-optee-cleanup-1a7fcce5e828 Best regards,