From c45735988ef19aa7085bc89a5e9e2327248ab3e5 Mon Sep 17 00:00:00 2001 From: Breno Lima Date: Thu, 14 Aug 2025 09:50:42 -0400 Subject: [PATCH] configs/freescale_imx93evk: Add OP-TEE OS support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add OP-TEE OS Support. NXP BSP lf-6.12.3-1.0.0 version. The i.MX93 Boot Container requires a raw TEE binary without a TEE header. Update the imx9-bootloader-prepare.sh script and Config.in accordingly to ensure compatibility with this requirement. Signed-off-by: Fabio Estevam Signed-off-by: Breno Lima Reviewed-by: Sébastien Szymanski [Julien: remove empty line in hash file to fix check-package error] Signed-off-by: Julien Olivain --- board/freescale/common/imx/imx9-bootloader-prepare.sh | 2 +- board/freescale/imx93evk/patches/optee-os/optee-os.hash | 2 ++ boot/optee-os/Config.in | 2 +- configs/freescale_imx93evk_defconfig | 7 +++++++ 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 board/freescale/imx93evk/patches/optee-os/optee-os.hash diff --git a/board/freescale/common/imx/imx9-bootloader-prepare.sh b/board/freescale/common/imx/imx9-bootloader-prepare.sh index 2db887a785..a267114d43 100755 --- a/board/freescale/common/imx/imx9-bootloader-prepare.sh +++ b/board/freescale/common/imx/imx9-bootloader-prepare.sh @@ -20,7 +20,7 @@ main () "${HOST_DIR}/bin/mkimage_imx8" -soc IMX9 -c \ -ap "${BINARIES_DIR}/bl31.bin" a55 ${ATF_LOAD_ADDR} \ -ap "${BINARIES_DIR}/u-boot-hash.bin" a55 0x80200000 \ - -ap "${BINARIES_DIR}/tee.bin" a55 0x96000000 \ + -ap "${BINARIES_DIR}/tee-raw.bin" a55 0x96000000 \ -out "${BINARIES_DIR}/u-boot-atf-container.img" else "${HOST_DIR}/bin/mkimage_imx8" -soc IMX9 -c \ diff --git a/board/freescale/imx93evk/patches/optee-os/optee-os.hash b/board/freescale/imx93evk/patches/optee-os/optee-os.hash new file mode 100644 index 0000000000..6ab7c41aa1 --- /dev/null +++ b/board/freescale/imx93evk/patches/optee-os/optee-os.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 4b685080a094cb0f0489b8114ae8b73c37ec13eda9f5618c8b6311ff1f472f57 imx-optee-os-lf-6.12.3-1.0.0.tar.gz diff --git a/boot/optee-os/Config.in b/boot/optee-os/Config.in index 433dae90d8..e737d2a0ac 100644 --- a/boot/optee-os/Config.in +++ b/boot/optee-os/Config.in @@ -167,7 +167,7 @@ config BR2_TARGET_OPTEE_OS_ADDITIONAL_VARIABLES config BR2_TARGET_OPTEE_OS_CORE_IMAGES string "Binary boot images" - default "tee.bin tee-*_v2.bin" + default "tee.bin tee-raw.bin tee-*_v2.bin" help Names of generated image files that are installed in the output images/ directory. diff --git a/configs/freescale_imx93evk_defconfig b/configs/freescale_imx93evk_defconfig index 1140747825..0a39859342 100644 --- a/configs/freescale_imx93evk_defconfig +++ b/configs/freescale_imx93evk_defconfig @@ -25,6 +25,13 @@ BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL=y BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,imx-atf,lf-6.12.3-1.0.0)/imx-atf-lf-6.12.3-1.0.0.tar.gz" BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="imx93" BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE=y +BR2_TARGET_OPTEE_OS=y +BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL=y +BR2_TARGET_OPTEE_OS_CUSTOM_TARBALL_LOCATION="$(call github,nxp-imx,imx-optee-os,lf-6.12.3-1.0.0)/imx-optee-os-lf-6.12.3-1.0.0.tar.gz" +BR2_TARGET_OPTEE_OS_NEEDS_PYTHON_CRYPTOGRAPHY=y +BR2_TARGET_OPTEE_OS_PLATFORM="imx" +BR2_TARGET_OPTEE_OS_PLATFORM_FLAVOR="mx93evk" BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_CUSTOM_TARBALL=y