All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denys Dmytriyenko <denis@denix.org>
To: emekcan.aras@arm.com
Cc: meta-arm@lists.yoctoproject.org, Ross.Burton@arm.com,
	Jon.Mason@arm.com, nd@arm.com
Subject: Re: [meta-arm] [PATCH 2/5] arm/optee: support optee 3.19
Date: Thu, 12 Jan 2023 12:58:59 -0500	[thread overview]
Message-ID: <20230112175859.GZ22689@denix.org> (raw)
In-Reply-To: <20221221143942.15196-3-emekcan.aras@arm.com>

On Wed, Dec 21, 2022 at 02:39:39PM +0000, emekcan.aras@arm.com wrote:
> From: Emekcan Aras <emekcan.aras@arm.com>
> 
> From: Emekcan <emekcan.aras@arm.com>
> 
> This commits adds a recipe to support optee-os 3.19.
> 
> Signed-off-by: Emekcan Aras <emekcan.aras@arm.com>

Unfortunately, this breaks downstream users with own bbappends and 
customizations on top. Please pay close attention to the naming 
conventions. Thanks.

Also, what about updating optee-client, optee-test and optee-examples 
to 3.19?


> ---
> diff --git a/meta-arm/recipes-security/optee/optee-os-3_19.inc b/meta-arm/recipes-security/optee/optee-os-3_19.inc
> new file mode 100644
> index 00000000..8adb6996
> --- /dev/null
> +++ b/meta-arm/recipes-security/optee/optee-os-3_19.inc

While not critical, why does this inc file has "3_19" version in the name?


> @@ -0,0 +1,82 @@
> +SUMMARY = "OP-TEE Trusted OS"
> +DESCRIPTION = "Open Portable Trusted Execution Environment - Trusted side of the TEE"
> +HOMEPAGE = "https://www.op-tee.org/"
> +
> +LICENSE = "BSD-2-Clause"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=c1f21c4f72f372ef38a5a4aee55ec173"
> +
> +inherit deploy python3native
> +require optee.inc
> +
> +FILESEXTRAPATHS:prepend := "${THISDIR}/optee-os-3_19:"

Now, this is critical - why is there "3_19" version in the directory name?


> +CVE_PRODUCT = "linaro:op-tee op-tee:op-tee_os"
> +
> +DEPENDS = "python3-pyelftools-native python3-cryptography-native"
> +
> +DEPENDS:append:toolchain-clang = " compiler-rt"
> +
> +SRC_URI = "git://github.com/OP-TEE/optee_os.git;branch=master;protocol=https"
> +
> +SRC_URI:append = " \
> +    file://0006-allow-setting-sysroot-for-libgcc-lookup.patch \
> +    file://0007-allow-setting-sysroot-for-clang.patch \
> +    file://0008-no-warn-rwx-segments.patch \
> +   "
> +
> +S = "${WORKDIR}/git"
> +B = "${WORKDIR}/build"
> +
> +EXTRA_OEMAKE += " \
> +    PLATFORM=${OPTEEMACHINE} \
> +    CFG_${OPTEE_CORE}_core=y \
> +    CROSS_COMPILE_core=${HOST_PREFIX} \
> +    CROSS_COMPILE_ta_${OPTEE_ARCH}=${HOST_PREFIX} \
> +    NOWERROR=1 \
> +    ta-targets=ta_${OPTEE_ARCH} \
> +    O=${B} \
> +"
> +EXTRA_OEMAKE += " HOST_PREFIX=${HOST_PREFIX}"
> +EXTRA_OEMAKE += " CROSS_COMPILE64=${HOST_PREFIX}"
> +
> +CFLAGS[unexport] = "1"
> +LDFLAGS[unexport] = "1"
> +CPPFLAGS[unexport] = "1"
> +AS[unexport] = "1"
> +LD[unexport] = "1"
> +
> +do_compile:prepend() {
> +	PLAT_LIBGCC_PATH=$(${CC} -print-libgcc-file-name)
> +}
> +
> +do_compile() {
> +    oe_runmake -C ${S} all
> +}
> +do_compile[cleandirs] = "${B}"
> +
> +do_install() {
> +    #install core in firmware
> +    install -d ${D}${nonarch_base_libdir}/firmware/
> +    install -m 644 ${B}/core/*.bin ${B}/core/tee.elf ${D}${nonarch_base_libdir}/firmware/
> +}
> +
> +PACKAGE_ARCH = "${MACHINE_ARCH}"
> +
> +do_deploy() {
> +    install -d ${DEPLOYDIR}/${MLPREFIX}optee
> +    install -m 644 ${D}${nonarch_base_libdir}/firmware/* ${DEPLOYDIR}/${MLPREFIX}optee
> +}
> +
> +addtask deploy before do_build after do_install
> +
> +SYSROOT_DIRS += "${nonarch_base_libdir}/firmware"
> +
> +FILES:${PN} = "${nonarch_base_libdir}/firmware/"
> +
> +# note: "textrel" is not triggered on all archs
> +INSANE_SKIP:${PN} = "textrel"
> +# Build paths are currently embedded
> +INSANE_SKIP:${PN} += "buildpaths"
> +INSANE_SKIP:${PN}-dev = "staticdev"
> +INHIBIT_PACKAGE_STRIP = "1"
> +
> diff --git a/meta-arm/recipes-security/optee/optee-os_3.19.0.bb b/meta-arm/recipes-security/optee/optee-os_3.19.0.bb
> new file mode 100644
> index 00000000..9ad8a148
> --- /dev/null
> +++ b/meta-arm/recipes-security/optee/optee-os_3.19.0.bb
> @@ -0,0 +1,5 @@
> +require optee-os-3_19.inc
> +
> +DEPENDS += "dtc-native"
> +
> +SRCREV = "afacf356f9593a7f83cae9f96026824ec242ff52"
> -- 
> 2.17.1


  parent reply	other threads:[~2023-01-12 17:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 14:39 [PATCH 0/5] Add optee-os 3.19 recipe emekcan.aras
2022-12-21 14:39 ` [PATCH 1/5] arm/optee: Move optee-3.18 patches emekcan.aras
2022-12-21 14:39 ` [PATCH 2/5] arm/optee: support optee 3.19 emekcan.aras
2023-01-05 15:30   ` Ross Burton
2023-01-10 16:37     ` Jon Mason
2023-01-11  9:22       ` Emekcan Aras
2023-01-12 17:58   ` Denys Dmytriyenko [this message]
2023-01-12 18:15     ` [meta-arm] " Ross Burton
2023-01-13  9:52     ` Emekcan Aras
2023-01-13 10:38       ` Ross Burton
2022-12-21 14:39 ` [PATCH 3/5] arm-bsp/optee-os: Adds 3.19 bbappend emekcan.aras
2022-12-21 14:39 ` [PATCH 4/5] arm-bsp/optee-os: N1SDP support for optee-os 3.19 emekcan.aras
2022-12-21 14:39 ` [PATCH 5/5] arm/qemuarm-secureboot: pin optee-os version emekcan.aras
2022-12-21 15:37   ` [meta-arm] " Sumit Garg
2022-12-21 15:59     ` Emekcan Aras
2022-12-22  6:48       ` Sumit Garg
2022-12-22  8:42         ` Emekcan Aras
2022-12-23  5:47           ` Sumit Garg
2023-01-05 15:31             ` Ross Burton
2023-01-09 16:23 ` [PATCH 0/5] Add optee-os 3.19 recipe Jon Mason
2023-01-10 18:27 ` Jon Mason
2023-01-13 18:05 ` 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=20230112175859.GZ22689@denix.org \
    --to=denis@denix.org \
    --cc=Jon.Mason@arm.com \
    --cc=Ross.Burton@arm.com \
    --cc=emekcan.aras@arm.com \
    --cc=meta-arm@lists.yoctoproject.org \
    --cc=nd@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.