From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7257912272538828800 X-Received: by 2002:a05:6402:31f3:b0:51e:166d:8e95 with SMTP id dy19-20020a05640231f300b0051e166d8e95mr959940edb.4.1689923847683; Fri, 21 Jul 2023 00:17:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:aa7:de06:0:b0:518:4a1d:669 with SMTP id h6-20020aa7de06000000b005184a1d0669ls991835edv.0.-pod-prod-07-eu; Fri, 21 Jul 2023 00:17:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlG0DJXw+YB14f63lsq9JgiKAlVL8hOs/Bz2Ltfhf1QL2eqPFS8aIBINYhQBT0i87NAzlwzq X-Received: by 2002:a05:6402:69a:b0:51b:ec86:b49a with SMTP id f26-20020a056402069a00b0051bec86b49amr887847edy.7.1689923845706; Fri, 21 Jul 2023 00:17:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689923845; cv=none; d=google.com; s=arc-20160816; b=DlTmX+nynTXPsbNchqwCIK/IPuzdFLE6hb4FA7jrA5LKcfvYSBqrFammuBdLs6VSVB hE0TOVYzykazveT5mFmPvsEyxf5yVESn2ckr+Dq6hPzShdr++XdpdeUuah2XbcPUMBPd ZZndfzFauiIc6MbQmc6hni6lhkerirO8Au7ZrjdH6AcWAOSisgl3BI16QYlsopU0hJ+H daKJI00dn60c5E8KXA2xSwRX6Sm2cAQa38ikLKz19gGxoB7S6uwFe56nd/BVZT9Y6mOF cdnc2c+mxAnBQuE7tFxB0llxv1slopvYLDJqwtjx4JLC9b2g27x9XkApnJnYrA0gbx/B XGCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id; bh=xDxVEFHpceEcYyp5uRC41lj3/JHphhNS6bO87Vc7ljo=; fh=cucbcKcf/+L24jKADeEhkqn7v7XRbkEJ4s9YhNG9zPY=; b=sRMnKNWvmnxJMVy1Xnd/5IYts78rKi9sv1dVzuoakLs4y0+8xG8JbtD6xpFGli1wYI hTY/lfe+tFMhEiepNSon0MGJnAOSskvigP0i3mpZoGgeUh4HY+hQwLnS+L42HR3oqvzX E8J1cat+WfPyROqPGzTN/MuetFF0km9faYpc014hrsrKaqUo5OJ4qSD7mOChw5L2oiWI ZXoqJD7bMYhEGUEC2wCLwlCGXMd48YwmCmuErtv/gixKJRchObSbnuODsDOCVoJhHS39 EXQ3wOpLDZZullKZ3dg0jLo8LuZi5J6/v7OIjYYGTHor9vufW8E1THK9C8x3OSaJxNNP /KKg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Return-Path: Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id g20-20020a056402321400b0051e6316130dsi192886eda.5.2023.07.21.00.17.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 21 Jul 2023 00:17:25 -0700 (PDT) Received-SPF: pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of ubely@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=ubely@ilbers.de Received: from [127.0.0.1] (host-80-81-17-52.static.customer.m-online.net [80.81.17.52]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 36L7HNR2029190 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Jul 2023 09:17:24 +0200 Message-ID: <70383060686f628e4f3284e4628224d6970d9006.camel@ilbers.de> Subject: Re: [RFT/RFC][PATCH] optee-ftpm-stm32mp15x: Add patch to fix parallel build issues From: Uladzimir Bely To: Jan Kiszka , isar-users Cc: "Su, Bao Cheng (RC-CN DF FA R&D)" Date: Fri, 21 Jul 2023 10:16:05 +0300 In-Reply-To: <424e2519-2dfa-5379-a16e-ca505e6135fe@siemens.com> References: <424e2519-2dfa-5379-a16e-ca505e6135fe@siemens.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.3 (by Flathub.org) MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: 0aWQL2UE5+am On Thu, 2023-07-20 at 16:46 +0200, Jan Kiszka wrote: > From: Jan Kiszka >=20 > Signed-off-by: Jan Kiszka > --- >=20 > Uladzimir, could you check if that helps in CI? I would then check if > we=20 > can also bring it upstream (though upstream looks... complicated). >=20 >=20 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. > =C2=A0.../0001-Fix-parallel-build-of-optee_ta.patch | 45 > +++++++++++++++++++ > =C2=A0.../optee-ftpm-stm32mp15x_0~230316+git.bb=C2=A0=C2=A0=C2=A0=C2=A0 |= =C2=A0 1 + > =C2=A02 files changed, 46 insertions(+) > =C2=A0create mode 100644 meta-isar/recipes-bsp/optee-ftpm/files/0001-Fix- > parallel-build-of-optee_ta.patch >=20 > 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 > +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: > + > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0TA_CROSS_COMPILE=3D \ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0TA_CPU=3Dcortex-a7 \ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0TA_DEV_KIT_DIR=3D/usr/lib/opte= e-os/stm32mp15x/export-ta_arm32 \ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0CFG_TEE_TA_LOG_LEVEL=3D2 \ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0CFG_FTPM_USE_WOLF=3Dy \ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0/usr/bin/make -j 24 > +make[2]: Entering directory '/<>/Samples/ARM32- > FirmwareTPM/optee_ta' > +/usr/bin/make -C fTPM CROSS_COMPILE=3D > +make[3]: Entering directory '/<>/Samples/ARM32- > FirmwareTPM/optee_ta/fTPM' > +Checking symlink to the TPM folder: /<> > +Checking symlink to the WolfSSL folder: > /<>/external/wolfssl > +Establishing symlink. > +=C2=A0 CC=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ../out/fTPM/platform/Cancel.o > +Establishing symlink. > +=C2=A0 CC=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ../out/fTPM/platform/AdminPPI.o > +=C2=A0 CC=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ../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'.=C2=A0 Stop. > +make[3]: *** Waiting for unfinished jobs.... > + > +Signed-off-by: Jan Kiszka > +--- > + 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 +=3D wolf_symlink/wolfcrypt/src/tfm.c > + srcs-y +=3D wolf_symlink/wolfcrypt/src/wolfmath.c > + srcs-y +=3D wolf_symlink/wolfcrypt/src/des3.c > + srcs-y +=3D wolf_symlink/wolfcrypt/src/random.c > ++ > ++$(srcs-y): wolf_symlink > +--=20 > +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 +=3D " \ > =C2=A0=C2=A0=C2=A0=C2=A0 > https://github.com/Microsoft/ms-tpm-20-ref/archive/${SRCREV}.tar.gz=C2=A0= \ > =C2=A0=C2=A0=C2=A0=C2=A0 > https://github.com/wolfSSL/wolfssl/archive/${SRCREV-wolfssl}.tar.gz;name= =3Dwolfssl > =C2=A0\ > =C2=A0=C2=A0=C2=A0=C2=A0 file://0001-add-enum-to-ta-flags.patch=C2=A0\ > +=C2=A0=C2=A0=C2=A0 file://0001-Fix-parallel-build-of-optee_ta.patch=C2= =A0\ > =C2=A0=C2=A0=C2=A0=C2=A0 " > =C2=A0 > =C2=A0SRCREV =3D "f74c0d9686625c02b0fdd5b2bbe792a22aa96cb6"