From 30555357320e352b1078107fdcf89a3bb24b3366 Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Thu, 28 Nov 2024 14:15:24 +0100 Subject: [PATCH 1/2] [WIP] op-tee: update to OP-TEE 4.2 tag Update our fork to 4.2.0 Requires that we test all affected platforms. - need to check TEGRA still on 3.21 probably broken Signed-off-by: Jorge Ramirez-Ortiz --- ...client_3.21.0.bb => optee-client_4.2.0.bb} | 2 +- ...ples_3.21.0.bb => optee-examples_4.2.0.bb} | 0 ....21.0.bb => optee-os-fio-mfgtool_4.2.0.bb} | 0 .../optee/optee-os-fio_3.21.0.bb | 4 ---- .../optee/optee-os-fio_4.2.0.bb | 4 ++++ ...t_3.21.0.bb => optee-os-tadevkit_4.2.0.bb} | 0 .../0001-regression-1000-disable-1039.patch | 15 +++++++----- ...tee-test_3.21.0.bb => optee-test_4.2.0.bb} | 2 +- .../machine/include/lmp-machine-custom.inc | 24 +++++++++---------- ...0.bbappend => optee-client_4.2.0.bbappend} | 0 ...d => optee-os-fio-mfgtool_4.2.0%.bbappend} | 0 ...x.bb => optee-os-fio-mfgtool_4.2.0-imx.bb} | 0 .../optee/optee-os-fio_3.21.0-imx.bb | 6 ----- ....bbappend => optee-os-fio_4.2.0%.bbappend} | 0 .../optee/optee-os-fio_4.2.0-imx.bb | 6 +++++ ...pend => optee-os-tadevkit_4.2.0%.bbappend} | 0 ...-imx.bb => optee-os-tadevkit_4.2.0-imx.bb} | 4 ++-- ...1.0.bbappend => optee-test_4.2.0.bbappend} | 0 18 files changed, 35 insertions(+), 32 deletions(-) rename meta-lmp-base/recipes-security/optee/{optee-client_3.21.0.bb => optee-client_4.2.0.bb} (70%) rename meta-lmp-base/recipes-security/optee/{optee-examples_3.21.0.bb => optee-examples_4.2.0.bb} (100%) rename meta-lmp-base/recipes-security/optee/{optee-os-fio-mfgtool_3.21.0.bb => optee-os-fio-mfgtool_4.2.0.bb} (100%) delete mode 100644 meta-lmp-base/recipes-security/optee/optee-os-fio_3.21.0.bb create mode 100644 meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb rename meta-lmp-base/recipes-security/optee/{optee-os-tadevkit_3.21.0.bb => optee-os-tadevkit_4.2.0.bb} (100%) rename meta-lmp-base/recipes-security/optee/{optee-test_3.21.0.bb => optee-test_4.2.0.bb} (68%) rename meta-lmp-bsp/recipes-security/optee/{optee-client_3.21.0.bbappend => optee-client_4.2.0.bbappend} (100%) rename meta-lmp-bsp/recipes-security/optee/{optee-os-fio-mfgtool_3.21.0%.bbappend => optee-os-fio-mfgtool_4.2.0%.bbappend} (100%) rename meta-lmp-bsp/recipes-security/optee/{optee-os-fio-mfgtool_3.21.0-imx.bb => optee-os-fio-mfgtool_4.2.0-imx.bb} (100%) delete mode 100644 meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0-imx.bb rename meta-lmp-bsp/recipes-security/optee/{optee-os-fio_3.21.0%.bbappend => optee-os-fio_4.2.0%.bbappend} (100%) create mode 100644 meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb rename meta-lmp-bsp/recipes-security/optee/{optee-os-tadevkit_3.21.0%.bbappend => optee-os-tadevkit_4.2.0%.bbappend} (100%) rename meta-lmp-bsp/recipes-security/optee/{optee-os-tadevkit_3.21.0-imx.bb => optee-os-tadevkit_4.2.0-imx.bb} (53%) rename meta-lmp-bsp/recipes-security/optee/{optee-test_3.21.0.bbappend => optee-test_4.2.0.bbappend} (100%) diff --git a/meta-lmp-base/recipes-security/optee/optee-client_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-client_4.2.0.bb similarity index 70% rename from meta-lmp-base/recipes-security/optee/optee-client_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-client_4.2.0.bb index 4fba709b53..9468369d4a 100644 --- a/meta-lmp-base/recipes-security/optee/optee-client_3.21.0.bb +++ b/meta-lmp-base/recipes-security/optee/optee-client_4.2.0.bb @@ -1,6 +1,6 @@ require optee-client-fio.inc -SRCREV = "8533e0e6329840ee96cf81b6453f257204227e6c" +SRCREV = "3eac340a781c00ccd61b151b0e9c22a8c6e9f9f0" SRC_URI += " \ file://0001-FIO-extras-pkcs11-change-UUID-to-avoid-conflict-with.patch \ diff --git a/meta-lmp-base/recipes-security/optee/optee-examples_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-examples_4.2.0.bb similarity index 100% rename from meta-lmp-base/recipes-security/optee/optee-examples_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-examples_4.2.0.bb diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio-mfgtool_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-fio-mfgtool_4.2.0.bb similarity index 100% rename from meta-lmp-base/recipes-security/optee/optee-os-fio-mfgtool_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-os-fio-mfgtool_4.2.0.bb diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-fio_3.21.0.bb deleted file mode 100644 index 146f53f118..0000000000 --- a/meta-lmp-base/recipes-security/optee/optee-os-fio_3.21.0.bb +++ /dev/null @@ -1,4 +0,0 @@ -require optee-os-fio.inc - -SRCREV = "9048d3d2873b7d7d9f2b5594ce55c342b4cb6049" -SRCBRANCH = "3.21+fio" diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb new file mode 100644 index 0000000000..b8ce0ce712 --- /dev/null +++ b/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb @@ -0,0 +1,4 @@ +require optee-os-fio.inc + +SRCREV = "a88bd7ef912657e9a73bf87ef7c0a0f76db1cbd4" +SRCBRANCH = "4.2.0+fio" diff --git a/meta-lmp-base/recipes-security/optee/optee-os-tadevkit_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-tadevkit_4.2.0.bb similarity index 100% rename from meta-lmp-base/recipes-security/optee/optee-os-tadevkit_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-os-tadevkit_4.2.0.bb diff --git a/meta-lmp-base/recipes-security/optee/optee-test/0001-regression-1000-disable-1039.patch b/meta-lmp-base/recipes-security/optee/optee-test/0001-regression-1000-disable-1039.patch index 7be63fac2b..448d086e94 100644 --- a/meta-lmp-base/recipes-security/optee/optee-test/0001-regression-1000-disable-1039.patch +++ b/meta-lmp-base/recipes-security/optee/optee-test/0001-regression-1000-disable-1039.patch @@ -1,6 +1,6 @@ -From 9cdaa16531f91c28621d8d8592560df817860eb0 Mon Sep 17 00:00:00 2001 +From 9c6fd3bba91930deaf7d86f4af1739999e805934 Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz -Date: Wed, 29 Mar 2023 14:16:55 +0200 +Date: Wed, 20 Nov 2024 17:43:27 +0100 Subject: [PATCH] regression 1000: disable 1039 This test requires the TA to be signed with a key located @@ -17,10 +17,10 @@ Signed-off-by: Jorge Ramirez-Ortiz 1 file changed, 2 insertions(+) diff --git a/host/xtest/regression_1000.c b/host/xtest/regression_1000.c -index de32c41..1aa2e8b 100644 +index 9981d01..226e5dc 100644 --- a/host/xtest/regression_1000.c +++ b/host/xtest/regression_1000.c -@@ -3197,6 +3197,7 @@ out: +@@ -3269,6 +3269,7 @@ out: ADBG_CASE_DEFINE(regression, 1038, xtest_tee_test_1038, "Test MTE (Memory Tag Extension)"); @@ -28,11 +28,14 @@ index de32c41..1aa2e8b 100644 static void xtest_tee_test_1039(ADBG_Case_t *c) { TEEC_Session session = { }; -@@ -3221,3 +3222,4 @@ static void xtest_tee_test_1039(ADBG_Case_t *c) - +@@ -3291,6 +3292,7 @@ static void xtest_tee_test_1039(ADBG_Case_t *c) + } ADBG_CASE_DEFINE(regression, 1039, xtest_tee_test_1039, "Test subkey verification"); +#endif + + struct test_1040_thread_arg { + TEEC_Result res; -- 2.34.1 diff --git a/meta-lmp-base/recipes-security/optee/optee-test_3.21.0.bb b/meta-lmp-base/recipes-security/optee/optee-test_4.2.0.bb similarity index 68% rename from meta-lmp-base/recipes-security/optee/optee-test_3.21.0.bb rename to meta-lmp-base/recipes-security/optee/optee-test_4.2.0.bb index 6697608b4f..3a18853cba 100644 --- a/meta-lmp-base/recipes-security/optee/optee-test_3.21.0.bb +++ b/meta-lmp-base/recipes-security/optee/optee-test_4.2.0.bb @@ -1,6 +1,6 @@ require optee-test-fio.inc -SRCREV = "9c872638bc38324d8c65b9296ebec3d124e19466" +SRCREV = "526d5bac1b65f907f67c05cd07beca72fbab88dd" # Due OpenSSL 3.0 deprecated warnings CFLAGS += "-Wno-error=deprecated-declarations" diff --git a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc index 047d816cfa..4381aceeda 100644 --- a/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc +++ b/meta-lmp-bsp/conf/machine/include/lmp-machine-custom.inc @@ -288,9 +288,9 @@ PREFERRED_PROVIDER_u-boot-default-script:mx8ulp-generic-bsp = "u-boot-base-scr" PREFERRED_PROVIDER_u-boot-default-script:sota:mx8ulp-generic-bsp = "u-boot-ostree-scr-fit" SOTA_CLIENT_FEATURES:append:mx8ulp-generic-bsp = " ubootenv" LMP_BOOT_FIRMWARE_FILES:mx8ulp-nxp-bsp = "imx-boot u-boot.itb" -PREFERRED_VERSION_optee-os-fio:mx8ulp-nxp-bsp = "3.21.0-imx" -PREFERRED_VERSION_optee-os-fio-mfgtool:mx8ulp-nxp-bsp = "3.21.0-imx" -PREFERRED_VERSION_optee-os-tadevkit:mx8ulp-nxp-bsp = "3.21.0-imx" +PREFERRED_VERSION_optee-os-fio:mx8ulp-nxp-bsp = "4.2.0-imx" +PREFERRED_VERSION_optee-os-fio-mfgtool:mx8ulp-nxp-bsp = "4.2.0-imx" +PREFERRED_VERSION_optee-os-tadevkit:mx8ulp-nxp-bsp = "4.2.0-imx" PREFERRED_VERSION_u-boot-fio:mx8ulp-nxp-bsp ?= "imx-2023.04" ## iMX8ULP LPDDR4 EVK UBOOT_SIGN_ENABLE:sota:imx8ulp-lpddr4-evk ?= "1" @@ -506,9 +506,9 @@ PREFERRED_PROVIDER_u-boot-default-script:mx93-generic-bsp = "u-boot-base-scr" PREFERRED_PROVIDER_u-boot-default-script:sota:mx93-generic-bsp = "u-boot-ostree-scr-fit" SOTA_CLIENT_FEATURES:append:mx93-generic-bsp = " ubootenv" LMP_BOOT_FIRMWARE_FILES:mx93-nxp-bsp = "imx-boot u-boot.itb" -PREFERRED_VERSION_optee-os-fio:mx93-nxp-bsp = "3.21.0-imx" -PREFERRED_VERSION_optee-os-fio-mfgtool:mx93-nxp-bsp = "3.21.0-imx" -PREFERRED_VERSION_optee-os-tadevkit:mx93-nxp-bsp = "3.21.0-imx" +PREFERRED_VERSION_optee-os-fio:mx93-nxp-bsp = "4.2.0-imx" +PREFERRED_VERSION_optee-os-fio-mfgtool:mx93-nxp-bsp = "4.2.0-imx" +PREFERRED_VERSION_optee-os-tadevkit:mx93-nxp-bsp = "4.2.0-imx" PREFERRED_PROVIDER_virtual/kernel:mx93-nxp-bsp ?= "linux-lmp-fslc-imx" PREFERRED_VERSION_u-boot-fio:mx93-nxp-bsp ?= "imx-2023.04" # linux-lmp-fslc-imx_6.1 does't have this devicetrees @@ -814,12 +814,12 @@ OSTREE_KERNEL_ARGS:sun8i ?= "earlycon console=ttyS0,115200 ${OSTREE_KERNEL_ARGS_ ## iMX targets should use the u-boot release based on the NXP BSP PREFERRED_VERSION_u-boot-fio:imx-nxp-bsp ?= "imx-2022.04" ## Prefer OP-TEE releases from our layer instead of using the .imx fork -PREFERRED_VERSION_optee-client:mx8-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-client:mx9-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-examples:mx8-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-examples:mx9-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-test:mx8-nxp-bsp = "3.21.0" -PREFERRED_VERSION_optee-test:mx9-nxp-bsp = "3.21.0" +PREFERRED_VERSION_optee-client:mx8-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-client:mx9-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-examples:mx8-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-examples:mx9-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-test:mx8-nxp-bsp = "4.2.0" +PREFERRED_VERSION_optee-test:mx9-nxp-bsp = "4.2.0" ## We don't use imx-boot-container just yet UBOOT_PROVIDES_BOOT_CONTAINER:mx8m-generic-bsp = "0" ## No need to install u-boot, already a WKS dependency diff --git a/meta-lmp-bsp/recipes-security/optee/optee-client_3.21.0.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-client_4.2.0.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-client_3.21.0.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-client_4.2.0.bbappend diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_3.21.0%.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_4.2.0%.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_3.21.0%.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_4.2.0%.bbappend diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_3.21.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_4.2.0-imx.bb similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_3.21.0-imx.bb rename to meta-lmp-bsp/recipes-security/optee/optee-os-fio-mfgtool_4.2.0-imx.bb diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0-imx.bb deleted file mode 100644 index 99301a0404..0000000000 --- a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0-imx.bb +++ /dev/null @@ -1,6 +0,0 @@ -require recipes-security/optee/optee-os-fio.inc - -SRCREV = "380f236654c9fb3221848bc50ad9c4b759ac848d" -SRCBRANCH = "3.21+fio-imx" - -DEFAULT_PREFERENCE = "-1" diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0%.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0%.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-os-fio_3.21.0%.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0%.bbappend diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb new file mode 100644 index 0000000000..a640807ab1 --- /dev/null +++ b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb @@ -0,0 +1,6 @@ +require recipes-security/optee/optee-os-fio.inc + +SRCREV = "5891192fbbc290cab0567744dec5be784b72b311" +SRCBRANCH = "4.2.0+fio-imx" + +DEFAULT_PREFERENCE = "-1" diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0%.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0%.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0%.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0%.bbappend diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0-imx.bb similarity index 53% rename from meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0-imx.bb rename to meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0-imx.bb index 67feec1f62..7c75deb03d 100644 --- a/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_3.21.0-imx.bb +++ b/meta-lmp-bsp/recipes-security/optee/optee-os-tadevkit_4.2.0-imx.bb @@ -1,6 +1,6 @@ # Needed an explicit PV setting due the require/include chain -PV = "3.21.0-imx" +PV = "4.2.0-imx" -require recipes-security/optee/optee-os-tadevkit_3.21.0.bb +require recipes-security/optee/optee-os-tadevkit_4.2.0.bb DEFAULT_PREFERENCE = "-1" diff --git a/meta-lmp-bsp/recipes-security/optee/optee-test_3.21.0.bbappend b/meta-lmp-bsp/recipes-security/optee/optee-test_4.2.0.bbappend similarity index 100% rename from meta-lmp-bsp/recipes-security/optee/optee-test_3.21.0.bbappend rename to meta-lmp-bsp/recipes-security/optee/optee-test_4.2.0.bbappend From 7af2dcf8457d6c1f9bf3835135458fe982281666 Mon Sep 17 00:00:00 2001 From: Jorge Ramirez-Ortiz Date: Tue, 3 Dec 2024 06:54:46 +0100 Subject: [PATCH 2/2] [WIP] op-tee: use the 4.2.0 wip branches Signed-off-by: Jorge Ramirez-Ortiz --- meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb | 2 +- meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb b/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb index b8ce0ce712..4e70bf6590 100644 --- a/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb +++ b/meta-lmp-base/recipes-security/optee/optee-os-fio_4.2.0.bb @@ -1,4 +1,4 @@ require optee-os-fio.inc SRCREV = "a88bd7ef912657e9a73bf87ef7c0a0f76db1cbd4" -SRCBRANCH = "4.2.0+fio" +SRCBRANCH = "4.2.0+fio-wip" diff --git a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb index a640807ab1..1251fb7b5d 100644 --- a/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb +++ b/meta-lmp-bsp/recipes-security/optee/optee-os-fio_4.2.0-imx.bb @@ -1,6 +1,6 @@ require recipes-security/optee/optee-os-fio.inc SRCREV = "5891192fbbc290cab0567744dec5be784b72b311" -SRCBRANCH = "4.2.0+fio-imx" +SRCBRANCH = "4.2.0+fio-imx-wip" DEFAULT_PREFERENCE = "-1"