All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: sven.schultschik@siemens.com, cip-dev@lists.cip-project.org
Subject: Re: [isar-cip-core][PATCH 5/8] add recipe for trusted firmware a qemu arm64
Date: Fri, 28 Oct 2022 07:50:33 +0200	[thread overview]
Message-ID: <22a6890a-c594-77a6-13b8-a74abe668186@siemens.com> (raw)
In-Reply-To: <20221024122725.383791-6-sven.schultschik@siemens.com>

On 24.10.22 14:27, sven.schultschik@siemens.com wrote:
> From: Sven Schultschik <sven.schultschik@siemens.com>
> 
> provide a recipe to generate the needed binary to start a secure boot qemu with integrated optee and active RPMB replay protected memory emulation within u-boot
> 
> Signed-off-by: Sven Schultschik <sven.schultschik@siemens.com>
> ---
>  .../trusted-firmware-a-qemu-arm64_2.7.0.bb    | 61 +++++++++++++++++++
>  1 file changed, 61 insertions(+)
>  create mode 100644 recipes-bsp/trusted-firmware-a/trusted-firmware-a-qemu-arm64_2.7.0.bb
> 
> diff --git a/recipes-bsp/trusted-firmware-a/trusted-firmware-a-qemu-arm64_2.7.0.bb b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-qemu-arm64_2.7.0.bb
> new file mode 100644
> index 000000000..791089a21
> --- /dev/null
> +++ b/recipes-bsp/trusted-firmware-a/trusted-firmware-a-qemu-arm64_2.7.0.bb
> @@ -0,0 +1,61 @@
> +#
> +# CIP Core, generic profile
> +#
> +# Copyright (c) Siemens AG, 2022
> +#
> +# Authors:
> +#  Sven Schultschik <sven.schultschik@siemens.com>
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +HOMEPAGE = "https://www.trustedfirmware.org/projects/tf-a/"
> +MAINTAINER = "Sven Schultschik <sven.schultschik@siemens.com>"
> +LICENSE = "BSD-3-Clause"
> +
> +require recipes-bsp/trusted-firmware-a/trusted-firmware-a-custom.inc
> +
> +SRC_URI += " \
> +            git://review.trustedfirmware.org/TF-A/trusted-firmware-a;branch=master;protocol=https;destsuffix=git;rev=v${PV} "

Better pull the release tarball, see e.g.
https://github.com/siemens/meta-iot2050/blob/master/recipes-bsp/optee-os/optee-os-iot2050_3.19.0.bb

BTW, why 2.7.0? Latest is 3.19.

> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS = "optee-os-${MACHINE} u-boot-qemu-arm64"
> +DEBIAN_BUILD_DEPENDS   += " \
> +    debhelper(>= 11~), \
> +    optee-os-${MACHINE}, \
> +    u-boot-qemu-arm64, \
> +    libssl-dev, "
> +
> +TEEHEADER = "/usr/lib/optee-os/${MACHINE}/tee-header_v2.bin"
> +TEEPAGER = "/usr/lib/optee-os/${MACHINE}/tee-pager_v2.bin"
> +TEEPAGEABLE = "/usr/lib/optee-os/${MACHINE}/tee-pageable_v2.bin"
> +BL33 = "/usr/lib/u-boot/${MACHINE}/u-boot.bin"
> +
> +TF_A_EXTRA_BUILDARGS = "BL32=${TEEHEADER} \
> +        BL32_EXTRA1=${TEEPAGER} \
> +        BL32_EXTRA2=${TEEPAGEABLE} \
> +        BL33=${BL33} \
> +        BL32_RAM_LOCATION=tdram SPD=opteed ${DEBUG} all fip"
> +
> +TF_A_PLATFORM = "qemu"
> +
> +TF_A_BINARIES = "release/bl1.bin release/fip.bin"
> +
> +ISAR_CROSS_COMPILE = "0"

Huh? Wasn't this resolved?

> +
> +do_deploy[dirs] = "${DEPLOY_DIR_IMAGE}"
> +do_deploy() {
> +    dpkg --fsys-tarfile "${WORKDIR}/trusted-firmware-a-${MACHINE}_${PV}_${DISTRO_ARCH}.deb" | \
> +        tar xOf - "./usr/lib/trusted-firmware-a/${MACHINE}/bl1.bin" \
> +        > "${DEPLOY_DIR_IMAGE}/bl1.bin"
> +
> +    dpkg --fsys-tarfile "${WORKDIR}/trusted-firmware-a-${MACHINE}_${PV}_${DISTRO_ARCH}.deb" | \
> +        tar xOf - "./usr/lib/trusted-firmware-a/${MACHINE}/fip.bin" \
> +        > "${DEPLOY_DIR_IMAGE}/fip.bin"
> +
> +    dd if="${DEPLOY_DIR_IMAGE}/bl1.bin" of="${DEPLOY_DIR_IMAGE}/flash.bin" bs=4096 conv=notrunc
> +    dd if="${DEPLOY_DIR_IMAGE}/fip.bin" of="${DEPLOY_DIR_IMAGE}/flash.bin" seek=64 bs=4096 conv=notrunc

Conceptually, it would be nicer to do this construction as part of the
build (rules), package the result and only extract it here for
deployment. Would mean an own rules files, though, therefore not really
simpler.

Jan

-- 
Siemens AG, Technology
Competence Center Embedded Linux



  reply	other threads:[~2022-10-28  5:50 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-24 12:27 [isar-cip-core][PATCH 0/8] Secureboot on QEMU with EDK2, OP-TEE and RPBM sven.schultschik
2022-10-24 12:27 ` [isar-cip-core][PATCH 1/8] add recipe for edk2 sven.schultschik
2022-10-25  8:23   ` Su, Bao Cheng
2022-10-26 14:44     ` AW: " Schultschik, Sven
2022-10-27  1:39       ` Su, Bao Cheng
2022-10-27 16:14         ` AW: " Schultschik, Sven
2022-10-27 17:08           ` Jan Kiszka
2022-10-25  8:40   ` Su, Bao Cheng
2022-10-24 12:27 ` [isar-cip-core][PATCH 2/8] add recipe for optee qemu arm64 sven.schultschik
2022-10-24 12:27 ` [isar-cip-core][PATCH 3/8] Include optee into u-boot sven.schultschik
2022-10-26  7:36   ` Su, Bao Cheng
2022-10-26  8:52     ` Jan Kiszka
2022-10-26 15:27       ` AW: " Schultschik, Sven
2022-10-26 16:00         ` Jan Kiszka
2022-11-07 16:57           ` AW: " Schultschik, Sven
2022-11-07 17:50             ` Jan Kiszka
2022-11-10 11:01               ` AW: " Schultschik, Sven
2022-11-10 13:38                 ` Jan Kiszka
2022-10-24 12:27 ` [isar-cip-core][PATCH 4/8] add u-boot patch for qemu to support RPMB sven.schultschik
2022-10-24 12:27 ` [isar-cip-core][PATCH 5/8] add recipe for trusted firmware a qemu arm64 sven.schultschik
2022-10-28  5:50   ` Jan Kiszka [this message]
2022-10-28 15:46     ` AW: " Schultschik, Sven
2022-10-28 19:10       ` Jan Kiszka
2022-10-24 12:27 ` [isar-cip-core][PATCH 6/8] add kas files for building qemu secure boot images sven.schultschik
2022-10-27 17:17   ` Jan Kiszka
2022-11-07 10:43     ` AW: " Schultschik, Sven
2022-11-07 12:59       ` Jan Kiszka
2022-10-24 12:27 ` [isar-cip-core][PATCH 7/8] enhance start-qemu.sh for arm64 secure boot sven.schultschik
2022-10-24 12:27 ` [isar-cip-core][PATCH 8/8] no merge - manually instructions test " sven.schultschik
2022-10-25  8:36   ` Su, Bao Cheng
2022-10-25 15:23     ` AW: " Schultschik, Sven
2022-10-25  8:09 ` [isar-cip-core][PATCH 0/8] Secureboot on QEMU with EDK2, OP-TEE and RPBM Su, Bao Cheng
2022-10-25  8:16   ` Jan Kiszka
2022-11-20 20:47 [isar-cip-core][PATCH 0/8] Secureboot on QEMU with EDK2, OP-TEE and RPMB sven.schultschik
2022-11-20 20:47 ` [isar-cip-core][PATCH 5/8] add recipe for trusted firmware a qemu arm64 sven.schultschik

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=22a6890a-c594-77a6-13b8-a74abe668186@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=sven.schultschik@siemens.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.