From: Mikko Rapeli <mikko.rapeli@linaro.org>
To: Ross Burton <ross.burton@arm.com>
Cc: meta-arm@lists.yoctoproject.org, nd@arm.com
Subject: Re: [meta-arm] [PATCH 5/5] arm/scp-firmware: fix intermittent compile failures
Date: Mon, 31 Jul 2023 11:00:46 +0300 [thread overview]
Message-ID: <ZMdqLuZASkp4MRf8@nuoska> (raw)
In-Reply-To: <20230710130916.3414041-5-ross.burton@arm.com>
Hi,
On Mon, Jul 10, 2023 at 02:09:16PM +0100, Ross Burton wrote:
> From: Ross Burton <ross.burton@arm.com>
>
> scp-firmware passes -I/core/include to the compiler which doesn't exist,
> and sometimes gcc emits a fatal error. It's unclear why this doesn't
> happen for everyone, but this workaround appears to be the correct
> solution.
Thanks, I was also struggling with this when SCP_OPTEE_DIR wasn't set on all
configurations.
Cheers,
-Mikko
> Signed-off-by: Ross Burton <ross.burton@arm.com>
> ---
> .../files/optee-private-includes.patch | 34 +++++++++++++++++++
> .../scp-firmware/scp-firmware_2.12.0.bb | 5 +--
> 2 files changed, 37 insertions(+), 2 deletions(-)
> create mode 100644 meta-arm/recipes-bsp/scp-firmware/files/optee-private-includes.patch
>
> diff --git a/meta-arm/recipes-bsp/scp-firmware/files/optee-private-includes.patch b/meta-arm/recipes-bsp/scp-firmware/files/optee-private-includes.patch
> new file mode 100644
> index 00000000..c2d86022
> --- /dev/null
> +++ b/meta-arm/recipes-bsp/scp-firmware/files/optee-private-includes.patch
> @@ -0,0 +1,34 @@
> +Change the optee module includes to be private instead of public, so they don't get used
> +in every build, which can result in compile failures as /core/include/ doesn't exit.
> +
> +For some reason this behaviour isn't deterministic, a ticket has been filed with upstream.
> +
> +Upstream-Status: Pending
> +Signed-off-by: Ross Burton <ross.burton@arm.com>
> +
> +diff --git a/module/optee/console/CMakeLists.txt b/module/optee/console/CMakeLists.txt
> +index aebb7cc79..942aa98c8 100644
> +--- a/module/optee/console/CMakeLists.txt
> ++++ b/module/optee/console/CMakeLists.txt
> +@@ -14,7 +14,7 @@ target_include_directories(${SCP_MODULE_TARGET}
> + # Those includes are needed for mutex definitnion that is used in optee_smt
> + # notification
> + target_include_directories(${SCP_MODULE_TARGET}
> +- PUBLIC "${SCP_OPTEE_DIR}/core/arch/arm/include/"
> ++ PRIVATE "${SCP_OPTEE_DIR}/core/arch/arm/include/"
> + "${SCP_OPTEE_DIR}/core/include/"
> + "${SCP_OPTEE_DIR}/lib/libutils/ext/include/"
> + "${SCP_OPTEE_DIR}/lib/libutee/include/")
> +diff --git a/module/optee/mbx/CMakeLists.txt b/module/optee/mbx/CMakeLists.txt
> +index 305fa42b7..783a7970c 100644
> +--- a/module/optee/mbx/CMakeLists.txt
> ++++ b/module/optee/mbx/CMakeLists.txt
> +@@ -15,7 +15,7 @@ target_include_directories(${SCP_MODULE_TARGET}
> + # Those includes are needed for mutex defifitnion that is used in optee_smt
> + # notification
> + target_include_directories(${SCP_MODULE_TARGET}
> +- PUBLIC "${SCP_OPTEE_DIR}/core/include/"
> ++ PRIVATE "${SCP_OPTEE_DIR}/core/include/"
> + "${SCP_OPTEE_DIR}/lib/libutils/ext/include/"
> + "${SCP_OPTEE_DIR}/lib/libutee/include/")
> +
> diff --git a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.12.0.bb b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.12.0.bb
> index 25cd1dcd..58482cd3 100644
> --- a/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.12.0.bb
> +++ b/meta-arm/recipes-bsp/scp-firmware/scp-firmware_2.12.0.bb
> @@ -7,9 +7,10 @@ LIC_FILES_CHKSUM = "file://license.md;beginline=5;md5=9db9e3d2fb8d9300a6c3d15101
> file://contrib/cmsis/git/LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
>
> SRC_URI_SCP_FIRMWARE ?= "gitsm://github.com/ARM-software/SCP-firmware.git;protocol=https"
> -SRC_URI = "${SRC_URI_SCP_FIRMWARE};branch=${SRCBRANCH}"
> -SRCBRANCH = "master"
> +SRC_URI = "${SRC_URI_SCP_FIRMWARE};branch=${SRCBRANCH} \
> + file://optee-private-includes.patch"
>
> +SRCBRANCH = "master"
> SRCREV = "0c7236b1851d90124210a0414fd982dc55322c7c"
>
> PROVIDES += "virtual/control-processor-firmware"
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#4875): https://lists.yoctoproject.org/g/meta-arm/message/4875
> Mute This Topic: https://lists.yoctoproject.org/mt/100057036/7159507
> Group Owner: meta-arm+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/meta-arm/unsub [mikko.rapeli@linaro.org]
> -=-=-=-=-=-=-=-=-=-=-=-
>
next prev parent reply other threads:[~2023-07-31 8:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 13:09 [PATCH 1/5] arm/scp-firmware: set default SCP_PLATFORM to MACHINE ross.burton
2023-07-10 13:09 ` [PATCH 2/5] arm-bsp/scp-firmware: remove redundant SCP_PLATFORM ross.burton
2023-07-10 13:09 ` [PATCH 3/5] arm/scp-firware: update compiler variables ross.burton
2023-07-10 13:09 ` [PATCH 4/5] arm/scp-firmware: log what platform/firmware/type is being built ross.burton
2023-07-10 13:09 ` [PATCH 5/5] arm/scp-firmware: fix intermittent compile failures ross.burton
2023-07-31 8:00 ` Mikko Rapeli [this message]
2023-07-10 21:20 ` [PATCH 1/5] arm/scp-firmware: set default SCP_PLATFORM to MACHINE Jon Mason
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=ZMdqLuZASkp4MRf8@nuoska \
--to=mikko.rapeli@linaro.org \
--cc=meta-arm@lists.yoctoproject.org \
--cc=nd@arm.com \
--cc=ross.burton@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.