From: Uladzimir Bely <ubely@ilbers.de>
To: Jan Kiszka <jan.kiszka@siemens.com>,
isar-users <isar-users@googlegroups.com>
Cc: "Su, Bao Cheng (RC-CN DF FA R&D)" <baocheng.su@siemens.com>
Subject: Re: [RFT/RFC][PATCH] optee-ftpm-stm32mp15x: Add patch to fix parallel build issues
Date: Fri, 21 Jul 2023 10:16:05 +0300 [thread overview]
Message-ID: <70383060686f628e4f3284e4628224d6970d9006.camel@ilbers.de> (raw)
In-Reply-To: <424e2519-2dfa-5379-a16e-ca505e6135fe@siemens.com>
On Thu, 2023-07-20 at 16:46 +0200, Jan Kiszka wrote:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> Uladzimir, could you check if that helps in CI? I would then check if
> we
> can also bring it upstream (though upstream looks... complicated).
>
>
Yes, I've tested similar patch according to you hint. At least, 4 of 4
CI builds were OK with it, since previously they were failing with >50%
rate. So, the patch seems to work.
> .../0001-Fix-parallel-build-of-optee_ta.patch | 45
> +++++++++++++++++++
> .../optee-ftpm-stm32mp15x_0~230316+git.bb | 1 +
> 2 files changed, 46 insertions(+)
> create mode 100644 meta-isar/recipes-bsp/optee-ftpm/files/0001-Fix-
> parallel-build-of-optee_ta.patch
>
> diff --git a/meta-isar/recipes-bsp/optee-ftpm/files/0001-Fix-
> parallel-build-of-optee_ta.patch b/meta-isar/recipes-bsp/optee-
> ftpm/files/0001-Fix-parallel-build-of-optee_ta.patch
> new file mode 100644
> index 00000000..4ee20f41
> --- /dev/null
> +++ b/meta-isar/recipes-bsp/optee-ftpm/files/0001-Fix-parallel-build-
> of-optee_ta.patch
> @@ -0,0 +1,45 @@
> +From ff34f1a64bd5dbc83df26cfc8e74478f854a0acf Mon Sep 17 00:00:00
> 2001
> +From: Jan Kiszka <jan.kiszka@siemens.com>
> +Date: Thu, 20 Jul 2023 16:32:26 +0200
> +Subject: [PATCH] Fix parallel build of optee_ta
> +
> +The symlink must be established prio to building any of the source
> files
> +of WolfSSL, or things will fail:
> +
> + TA_CROSS_COMPILE= \
> + TA_CPU=cortex-a7 \
> + TA_DEV_KIT_DIR=/usr/lib/optee-os/stm32mp15x/export-ta_arm32 \
> + CFG_TEE_TA_LOG_LEVEL=2 \
> + CFG_FTPM_USE_WOLF=y \
> + /usr/bin/make -j 24
> +make[2]: Entering directory '/<<PKGBUILDDIR>>/Samples/ARM32-
> FirmwareTPM/optee_ta'
> +/usr/bin/make -C fTPM CROSS_COMPILE=
> +make[3]: Entering directory '/<<PKGBUILDDIR>>/Samples/ARM32-
> FirmwareTPM/optee_ta/fTPM'
> +Checking symlink to the TPM folder: /<<PKGBUILDDIR>>
> +Checking symlink to the WolfSSL folder:
> /<<PKGBUILDDIR>>/external/wolfssl
> +Establishing symlink.
> + CC ../out/fTPM/platform/Cancel.o
> +Establishing symlink.
> + CC ../out/fTPM/platform/AdminPPI.o
> + CC ../out/fTPM/platform/Entropy.o
> +make[3]: *** No rule to make target
> 'lib/wolf/wolf_symlink/wolfcrypt/src/aes.c', needed by
> '../out/fTPM/./lib/wolf/wolf_symlink/wolfcrypt/src/aes.o'. Stop.
> +make[3]: *** Waiting for unfinished jobs....
> +
> +Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> +---
> + Samples/ARM32-FirmwareTPM/optee_ta/fTPM/lib/wolf/sub.mk | 2 ++
> + 1 file changed, 2 insertions(+)
> +
> +diff --git a/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/lib/wolf/sub.mk
> b/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/lib/wolf/sub.mk
> +index 0a43f46..eb239e3 100644
> +--- a/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/lib/wolf/sub.mk
> ++++ b/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/lib/wolf/sub.mk
> +@@ -56,3 +56,5 @@ srcs-y += wolf_symlink/wolfcrypt/src/tfm.c
> + srcs-y += wolf_symlink/wolfcrypt/src/wolfmath.c
> + srcs-y += wolf_symlink/wolfcrypt/src/des3.c
> + srcs-y += wolf_symlink/wolfcrypt/src/random.c
> ++
> ++$(srcs-y): wolf_symlink
> +--
> +2.35.3
> +
> diff --git a/meta-isar/recipes-bsp/optee-ftpm/optee-ftpm-
> stm32mp15x_0~230316+git.bb b/meta-isar/recipes-bsp/optee-ftpm/optee-
> ftpm-stm32mp15x_0~230316+git.bb
> index fce13322..589c21fe 100644
> --- a/meta-isar/recipes-bsp/optee-ftpm/optee-ftpm-
> stm32mp15x_0~230316+git.bb
> +++ b/meta-isar/recipes-bsp/optee-ftpm/optee-ftpm-
> stm32mp15x_0~230316+git.bb
> @@ -13,6 +13,7 @@ SRC_URI += " \
>
> https://github.com/Microsoft/ms-tpm-20-ref/archive/${SRCREV}.tar.gz \
>
> https://github.com/wolfSSL/wolfssl/archive/${SRCREV-wolfssl}.tar.gz;name=wolfssl
> \
> file://0001-add-enum-to-ta-flags.patch \
> + file://0001-Fix-parallel-build-of-optee_ta.patch \
> "
>
> SRCREV = "f74c0d9686625c02b0fdd5b2bbe792a22aa96cb6"
prev parent reply other threads:[~2023-07-21 7:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-20 14:46 Jan Kiszka
2023-07-21 7:16 ` Uladzimir Bely [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70383060686f628e4f3284e4628224d6970d9006.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=baocheng.su@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox