From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users@googlegroups.com
Subject: [PATCH v4 11/11] optee-ftpm-stm32mp15x: Add patch to fix parallel build issues
Date: Mon, 31 Jul 2023 14:17:29 +0200 [thread overview]
Message-ID: <20230731121729.16972-12-ubely@ilbers.de> (raw)
In-Reply-To: <20230731121729.16972-1-ubely@ilbers.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
.../0001-Fix-parallel-build-of-optee_ta.patch | 59 +++++++++++++++++++
.../optee-ftpm-stm32mp15x_0~230316+git.bb | 1 +
2 files changed, 60 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..383ef9f7
--- /dev/null
+++ b/meta-isar/recipes-bsp/optee-ftpm/files/0001-Fix-parallel-build-of-optee_ta.patch
@@ -0,0 +1,59 @@
+From ee13738d203aca490c0fb3d1f79cee1d8f9e0c88 Mon Sep 17 00:00:00 2001
+From: Uladzimir Bely <ubely@ilbers.de>
+Date: Mon, 31 Jul 2023 14:42:52 +0300
+Subject: [PATCH] Fix parallel build of optee_ta
+
+TA devkit build system runs creating tpm and wolf symlinks in parallel
+with building ftpm. This sometimes causes build fail:
+
+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....
+
+It's easy to reproduce by adding a small sleep to the makefile rules
+that create these symlinks just before 'ln -s' called.
+
+Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
+---
+ Samples/ARM32-FirmwareTPM/optee_ta/Makefile | 1 +
+ Samples/ARM32-FirmwareTPM/optee_ta/fTPM/Makefile | 6 ++++++
+ 2 files changed, 7 insertions(+)
+
+diff --git a/Samples/ARM32-FirmwareTPM/optee_ta/Makefile b/Samples/ARM32-FirmwareTPM/optee_ta/Makefile
+index ddf6784..2053c01 100644
+--- a/Samples/ARM32-FirmwareTPM/optee_ta/Makefile
++++ b/Samples/ARM32-FirmwareTPM/optee_ta/Makefile
+@@ -3,6 +3,7 @@ export V?=0
+
+ .PHONY: all
+ all:
++ $(MAKE) -C fTPM create_ftpm_lib_symlinks
+ $(MAKE) -C fTPM CROSS_COMPILE=$(TA_CROSS_COMPILE)
+
+ .PHONY: clean
+diff --git a/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/Makefile b/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/Makefile
+index c71eecd..2b4309c 100644
+--- a/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/Makefile
++++ b/Samples/ARM32-FirmwareTPM/optee_ta/fTPM/Makefile
+@@ -11,3 +11,9 @@ clean: clean_stripped_file
+ clean_stripped_file:
+ rm -f $(BINARY).stripped.elf
+
++.PHONY: create_ftpm_lib_symlinks
++create_ftpm_lib_symlinks:
++ @echo Establishing tpm_symlink.
++ ln -fs ../../$(TPM_ROOT) ./lib/tpm/tpm_symlink
++ @echo Establishing wolf_symlink.
++ ln -fs ../../$(WOLF_ROOT) ./lib/wolf/wolf_symlink
+--
+2.41.0
+
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 441bc4ac..c92620e1 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
@@ -12,6 +12,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"
--
2.20.1
next prev parent reply other threads:[~2023-07-31 12:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-31 12:17 [PATCH v4 00/11] Fixes, cleanups and updates for OP-TEE and TAs Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 01/11] optee-client: Add missing runtime dependency Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 02/11] optee-client: Unbind ftpm, rather than remove its driver Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 03/11] optee-examples-stm32mp15x: Fix parsing error for non-stm32mp15x machines Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 04/11] linux-mainline: Add fTPM support Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 05/11] initramfs-tee-{ftpm,supplicant}-hook: Move sync loop to ftpm-hook Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 06/11] initramfs-tee-supplicant-hook: Account for modular optee Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 07/11] initramfs-tee-ftpm-hook: Lift timeout to 30 s Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 08/11] Drop stm32mp15x-initramfs in favor of image enabling Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 09/11] optee-ftpm-stm32mp15x: Recipe cleanups Uladzimir Bely
2023-07-31 12:17 ` [PATCH v4 10/11] optee-ftpm-stm32mp15x: Update WolfSSL to 5.6.3 Uladzimir Bely
2023-07-31 12:17 ` Uladzimir Bely [this message]
2023-08-02 4:11 ` [PATCH v4 00/11] Fixes, cleanups and updates for OP-TEE and TAs Uladzimir Bely
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=20230731121729.16972-12-ubely@ilbers.de \
--to=ubely@ilbers.de \
--cc=isar-users@googlegroups.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