All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Denys Dmytriyenko" <denis@denix.org>
To: Joshua Watt <JPEWhacker@gmail.com>
Cc: meta-arm@lists.yoctoproject.org
Subject: Re: [meta-arm][PATCH v2 1/3] optee-{os,examples,client,test}: Build out of tree
Date: Sun, 17 May 2020 12:35:16 -0400	[thread overview]
Message-ID: <20200517163516.GI11927@denix.org> (raw)
In-Reply-To: <20200515160240.16395-2-JPEWhacker@gmail.com>

On Fri, May 15, 2020 at 11:02:38AM -0500, Joshua Watt wrote:
> Modifies the optee recipes to all build out of tree. This is cleaner and
> helps prevent build error from stale builds when dependencies change.
> Also allows the elimination of the OPTEEOUTPUTMACHINE variable in
> optee-os.

Thanks, this looks fine. Can you please ping me when this gets into master or 
dunfell, as it will break our bbappend in the middle of the release...

Reviewed-by: Denys Dmytriyenko <denys@ti.com>

> Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
> ---
>  .../recipes-security/optee/optee-client_git.bb  | 17 +++++++++++++----
>  .../optee/optee-examples_git.bb                 |  8 ++++++--
>  meta-arm/recipes-security/optee/optee-os_git.bb | 10 ++++++----
>  .../recipes-security/optee/optee-test_git.bb    |  8 ++++++--
>  4 files changed, 31 insertions(+), 12 deletions(-)
> 
> diff --git a/meta-arm/recipes-security/optee/optee-client_git.bb b/meta-arm/recipes-security/optee/optee-client_git.bb
> index bae7b20..ec0826c 100644
> --- a/meta-arm/recipes-security/optee/optee-client_git.bb
> +++ b/meta-arm/recipes-security/optee/optee-client_git.bb
> @@ -18,20 +18,29 @@ SRC_URI = " \
>  "
>  
>  S = "${WORKDIR}/git"
> +B = "${WORKDIR}/build"
>  
>  SYSTEMD_SERVICE_${PN} = "tee-supplicant.service"
>  
> +EXTRA_OEMAKE = "O=${B}"
> +
> +do_compile() {
> +    cd ${S}
> +    oe_runmake
> +}
> +do_compile[cleandirs] = "${B}"
> +
>  do_install() {
> -    oe_runmake install
> +    (cd ${S} && oe_runmake install)
>  
> -    install -D -p -m0755 ${S}/out/export/usr/sbin/tee-supplicant ${D}${sbindir}/tee-supplicant
> +    install -D -p -m0755 ${B}/export/usr/sbin/tee-supplicant ${D}${sbindir}/tee-supplicant
>  
> -    install -D -p -m0644 ${S}/out/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0
> +    install -D -p -m0644 ${B}/export/usr/lib/libteec.so.1.0 ${D}${libdir}/libteec.so.1.0
>      ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so
>      ln -sf libteec.so.1.0 ${D}${libdir}/libteec.so.1
>  
>      install -d ${D}${includedir}
> -    install -p -m0644 ${S}/out/export/usr/include/*.h ${D}${includedir}
> +    install -p -m0644 ${B}/export/usr/include/*.h ${D}${includedir}
>  
>      sed -i -e s:/etc:${sysconfdir}:g \
>             -e s:/usr/bin:${bindir}:g \
> diff --git a/meta-arm/recipes-security/optee/optee-examples_git.bb b/meta-arm/recipes-security/optee/optee-examples_git.bb
> index 996e2cd..04cc5fd 100644
> --- a/meta-arm/recipes-security/optee/optee-examples_git.bb
> +++ b/meta-arm/recipes-security/optee/optee-examples_git.bb
> @@ -17,6 +17,7 @@ SRC_URI = "git://github.com/linaro-swg/optee_examples.git"
>  SRCREV = "559b2141c16bf0f57ccd72f60e4deb84fc2a05b0"
>  
>  S = "${WORKDIR}/git"
> +B = "${WORKDIR}/build"
>  
>  OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
>  TEEC_EXPORT = "${STAGING_DIR_HOST}${prefix}"
> @@ -28,17 +29,20 @@ EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
>                   HOST_CROSS_COMPILE=${TARGET_PREFIX} \
>                   TA_CROSS_COMPILE=${TARGET_PREFIX} \
>                   V=1 \
> +                 OUTPUT_DIR=${B} \
>                 "
>  
>  do_compile() {
> +    cd ${S}
>      oe_runmake
>  }
> +do_compile[cleandirs] = "${B}"
>  
>  do_install () {
>      mkdir -p ${D}${nonarch_base_libdir}/optee_armtz
>      mkdir -p ${D}${bindir}
> -    install -D -p -m0755 ${S}/out/ca/* ${D}${bindir}
> -    install -D -p -m0444 ${S}/out/ta/* ${D}${nonarch_base_libdir}/optee_armtz
> +    install -D -p -m0755 ${B}/ca/* ${D}${bindir}
> +    install -D -p -m0444 ${B}/ta/* ${D}${nonarch_base_libdir}/optee_armtz
>  }
>  
>  FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/"
> diff --git a/meta-arm/recipes-security/optee/optee-os_git.bb b/meta-arm/recipes-security/optee/optee-os_git.bb
> index dfff6d1..d58b89f 100644
> --- a/meta-arm/recipes-security/optee/optee-os_git.bb
> +++ b/meta-arm/recipes-security/optee/optee-os_git.bb
> @@ -19,10 +19,9 @@ SRC_URI = " \
>  "
>  
>  S = "${WORKDIR}/git"
> +B = "${WORKDIR}/build"
>  
>  OPTEEMACHINE ?= "${MACHINE}"
> -OPTEEOUTPUTMACHINE ?= "${MACHINE}"
> -
>  OPTEE_ARCH = "null"
>  OPTEE_ARCH_armv7a = "arm32"
>  OPTEE_ARCH_aarch64 = "arm64"
> @@ -37,6 +36,7 @@ EXTRA_OEMAKE = " \
>      V=1 \
>      ta-targets=ta_${OPTEE_ARCH} \
>      LIBGCC_LOCATE_CFLAGS=--sysroot=${STAGING_DIR_HOST} \
> +    O=${B} \
>  "
>  
>  CFLAGS[unexport] = "1"
> @@ -48,17 +48,19 @@ LD[unexport] = "1"
>  do_configure[noexec] = "1"
>  
>  do_compile() {
> +    cd ${S}
>      oe_runmake all CFG_TEE_TA_LOG_LEVEL=0
>  }
> +do_compile[cleandirs] = "${B}"
>  
>  do_install() {
>      #install core in firmware
>      install -d ${D}${nonarch_base_libdir}/firmware/
> -    install -m 644 ${B}/out/arm-plat-${OPTEEOUTPUTMACHINE}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
> +    install -m 644 ${B}/core/*.bin ${D}${nonarch_base_libdir}/firmware/
>  
>      #install TA devkit
>      install -d ${D}${includedir}/optee/export-user_ta/
> -    for f in ${B}/out/arm-plat-${OPTEEOUTPUTMACHINE}/export-ta_${OPTEE_ARCH}/* ; do
> +    for f in ${B}/export-ta_${OPTEE_ARCH}/* ; do
>          cp -aR $f ${D}${includedir}/optee/export-user_ta/
>      done
>  }
> diff --git a/meta-arm/recipes-security/optee/optee-test_git.bb b/meta-arm/recipes-security/optee/optee-test_git.bb
> index ee73a2c..f699972 100644
> --- a/meta-arm/recipes-security/optee/optee-test_git.bb
> +++ b/meta-arm/recipes-security/optee/optee-test_git.bb
> @@ -16,6 +16,7 @@ SRCREV = "30481e381cb4285706e7516853495a7699c93b2c"
>  SRC_URI = "git://github.com/OP-TEE/optee_test.git"
>  
>  S = "${WORKDIR}/git"
> +B = "${WORKDIR}/build"
>  
>  OPTEE_CLIENT_EXPORT = "${STAGING_DIR_HOST}${prefix}"
>  TEEC_EXPORT         = "${STAGING_DIR_HOST}${prefix}"
> @@ -27,21 +28,24 @@ EXTRA_OEMAKE = " TA_DEV_KIT_DIR=${TA_DEV_KIT_DIR} \
>                   CROSS_COMPILE_HOST=${TARGET_PREFIX} \
>                   CROSS_COMPILE_TA=${TARGET_PREFIX} \
>                   V=1 \
> +                 O=${B} \
>                 "
>  
>  do_compile() {
> +    cd ${S}
>      # Top level makefile doesn't seem to handle parallel make gracefully
>      oe_runmake xtest
>      oe_runmake ta
>  }
> +do_compile[cleandirs] = "${B}"
>  
>  do_install () {
> -    install -D -p -m0755 ${S}/out/xtest/xtest ${D}${bindir}/xtest
> +    install -D -p -m0755 ${B}/xtest/xtest ${D}${bindir}/xtest
>  
>      # install path should match the value set in optee-client/tee-supplicant
>      # default TEEC_LOAD_PATH is /lib
>      mkdir -p ${D}${nonarch_base_libdir}/optee_armtz/
> -    install -D -p -m0444 ${S}/out/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/
> +    install -D -p -m0444 ${B}/ta/*/*.ta ${D}${nonarch_base_libdir}/optee_armtz/
>  }
>  
>  FILES_${PN} += "${nonarch_base_libdir}/optee_armtz/"
> -- 
> 2.17.1
> 

> 


  reply	other threads:[~2020-05-17 16:35 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 22:11 [meta-arm][PATCH] Add support for booting qemu with TFA and optee Joshua Watt
2020-05-13 22:27 ` Denys Dmytriyenko
2020-05-13 22:42   ` Joshua Watt
2020-05-15 16:02 ` [meta-arm][PATCH v2 0/3] " Joshua Watt
2020-05-15 16:02   ` [meta-arm][PATCH v2 1/3] optee-{os,examples,client,test}: Build out of tree Joshua Watt
2020-05-17 16:35     ` Denys Dmytriyenko [this message]
2020-05-21  5:12     ` [PATCH " Diego Sueiro
2020-05-15 16:02   ` [meta-arm][PATCH v2 2/3] optee-client: Add sysVinit service Joshua Watt
2020-05-17 16:44     ` Denys Dmytriyenko
2020-05-18 17:04       ` William Mills
2020-05-18 18:03         ` Joshua Watt
2020-05-18 18:58           ` Denys Dmytriyenko
2020-05-18 21:52             ` Joshua Watt
2020-05-18 21:57             ` William Mills
2020-05-18 22:06               ` Joshua Watt
2020-05-18 22:41                 ` Denys Dmytriyenko
2020-05-19 10:03                   ` William Mills
2020-05-15 16:02   ` [meta-arm][PATCH v2 3/3] Add support for booting qemu with TFA and optee Joshua Watt
2020-05-17 16:58     ` Denys Dmytriyenko
2020-05-18 16:30       ` Joshua Watt
2020-05-21 14:22 ` [meta-arm][PATCH v3 0/3] " Joshua Watt
2020-05-21 14:22   ` [meta-arm][PATCH v3 1/3] optee-{os,examples,client,test}: Build out of tree Joshua Watt
2020-05-22  7:19     ` [PATCH " Diego Sueiro
2020-05-24 18:28       ` [meta-arm] " Denys Dmytriyenko
2020-05-21 14:22   ` [meta-arm][PATCH v3 2/3] optee-client: Add sysVinit service Joshua Watt
2020-05-22  7:20     ` [PATCH " Diego Sueiro
2020-05-24 18:29       ` [meta-arm] " Denys Dmytriyenko
2020-05-21 14:22   ` [meta-arm][PATCH v3 3/3] Add support for booting qemu with TFA and optee Joshua Watt
2020-05-24 20:08     ` Denys Dmytriyenko
2020-05-28 20:30   ` [meta-arm][PATCH v3 0/3] " 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=20200517163516.GI11927@denix.org \
    --to=denis@denix.org \
    --cc=JPEWhacker@gmail.com \
    --cc=meta-arm@lists.yoctoproject.org \
    /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.