[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 2/5] automation: Add the Dockerfile to build TF-A and U-Boot for FVP


  • To: Henry Wang <Henry.Wang@xxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Fri, 8 Dec 2023 09:39:33 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GLFA0sxO1id7jPf2s8b5pgDNGgRPZNPiSSZAOaKwLaA=; b=V170utopYhVjX7XzHBwj3gaAMEttyIV/YLtfX0g4BAE9sItZIOMzRvYSa8KYAGbBbH1zhXXMfs7Y91JpYzP+PcZ3HxjxqtKnL4IoxioB23FVyVmXXnhgVQL+Em94oQ/nayq0xKauQCqWwYiucypGFvpTPrRqtfvnAhqSxJdSQn44qxbs6wt5mG1BLaQh6SBD1+KzaVDrTqk/cGJKX7Yx7Aps3IScEfMU/+BuRXbViZnwR/PeIPlM/OIus7DdZPuyxZO0yER7lJYzdTtIh1QLXf1BEYdtM71La0Z0fGh8AWxZjcLTIFn+r+DX//F7SY56Xz5PhYnvjJXJ3ZL3m+PAnA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hPGZdsoGtESd9TUYey/Dw3tCic/fe1vGANMRBlicRTlv8IDTpV2NJJ0EJIkOFRtjjRME5shbB0kjh5kucXY3sVyJsoSHhPF8rGIRk60fMNQrruDgK5CWrxewfTROUmm3OEI/7WQfC3o6/SkEKFUjvIRHz5pONSs4eHC2z/MbP+3/1s+qCMx8l9SheULTnFUgHUGHX8adBS87wZLBTY/cPz5gQH++qgb/hZoRDHPhOmveg3j6yPmpmrenwd7P8p2sIJvyvyt9TcwVBd+82TRhFXiXSqTIqYVCXlti6ik2PmvKjXUWqIt+f2ht3IZrnZp7BW5mUzXpug6JbJ2UnAq/lA==
  • Cc: Doug Goldstein <cardoe@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Wei Chen <wei.chen@xxxxxxx>
  • Delivery-date: Fri, 08 Dec 2023 08:40:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi Henry,

On 08/12/2023 06:46, Henry Wang wrote:
> 
> 
> Unlike the emulators that currently being used in the CI pipelines,
> the FVP must start at EL3. Therefore we need the firmware, i.e. the
> TrustedFirmware-A (TF-A), for corresponding functionality.
> 
> There is a dedicated board (vexpress_fvp) in U-Boot (serve as the
> BL33 of the TF-A) for the FVP platform, so the U-Boot should also be
> compiled for the FVP platform instead of reusing the U-Boot for the
> existing emulators used in the CI pipelines.
> 
> To avoid compiling TF-A and U-Boot everytime in the job, adding a
> Dockerfile to the test artifacts to build TF-A v2.9.0 and U-Boot
> v2023.10 for FVP. The binaries for the TF-A and U-Boot, as well as
> the device tree for the FVP platform, will be saved (and exported by
> the CI job introduced by following commits). Note that, a patch for
> the TF-A will be applied before building to enable the virtio-net
> and the virtio-rng device on the FVP. The virtio-net device will
> provide the networking service for FVP, and the virtio-rng device
> will improve the speed of the FVP.
> 
> Signed-off-by: Henry Wang <Henry.Wang@xxxxxxx>
> Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx>
> ---
> v2:
> - Add Stefano's Reviewed-by tag.
> ---
>  .../2023.10-2.9.0-arm64v8.dockerfile          | 48 +++++++++++++++++++
>  1 file changed, 48 insertions(+)
>  create mode 100644 
> automation/tests-artifacts/armfvp-uboot-tfa/2023.10-2.9.0-arm64v8.dockerfile
> 
> diff --git 
> a/automation/tests-artifacts/armfvp-uboot-tfa/2023.10-2.9.0-arm64v8.dockerfile
>  
> b/automation/tests-artifacts/armfvp-uboot-tfa/2023.10-2.9.0-arm64v8.dockerfile
> new file mode 100644
> index 0000000000..6566b60545
> --- /dev/null
> +++ 
> b/automation/tests-artifacts/armfvp-uboot-tfa/2023.10-2.9.0-arm64v8.dockerfile
> @@ -0,0 +1,48 @@
> +FROM --platform=linux/arm64/v8 debian:bookworm
> +LABEL maintainer.name="The Xen Project" \
> +      maintainer.email="xen-devel@xxxxxxxxxxxxxxxxxxxx"
> +
> +ENV DEBIAN_FRONTEND=noninteractive
> +ENV UBOOT_VERSION="2023.10"
> +ENV TFA_VERSION="v2.9.0"
> +ENV USER root
> +
> +RUN mkdir /build
> +WORKDIR /build
> +
> +# build depends
> +RUN apt-get update && \
> +    apt-get --quiet --yes install \
> +        build-essential \
> +        libssl-dev \
> +        bc \
> +        curl \
> +        flex \
> +        bison \
> +        git \
> +        device-tree-compiler && \
> +    apt-get autoremove -y && \
> +    apt-get clean && \
> +    rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
> +
> +# Build U-Boot and TF-A
> +RUN curl -fsSLO 
> https://ftp.denx.de/pub/u-boot/u-boot-"$UBOOT_VERSION".tar.bz2 && \
> +    tar xvf u-boot-"$UBOOT_VERSION".tar.bz2 && \
> +    cd u-boot-"$UBOOT_VERSION" && \
> +    make -j$(nproc) V=1 vexpress_fvp_defconfig && \
> +    make -j$(nproc) V=1 all && \
Do we need 'all'? Can't we just build target 'u-boot' for u-boot.bin?

> +    cd .. && \
> +    git clone --branch "$TFA_VERSION" --depth 1 
> https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git && \
> +    cd trusted-firmware-a && \
> +    curl -fsSLO 
> https://git.yoctoproject.org/meta-arm/plain/meta-arm-bsp/recipes-bsp/trusted-firmware-a/files/fvp-base/0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch
>  \
> +         --output 
> 0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch && \
> +    git config --global user.email "you@xxxxxxxxxxx" && \
> +    git config --global user.name "Your Name" && \
If this is needed for git am, you could get away using 'patch -p1'

> +    git am 0001-fdts-fvp-base-Add-stdout-path-and-virtio-net-and-rng.patch 
> && \
> +    make -j$(nproc) DEBUG=1 PLAT=fvp ARCH=aarch64 
> FVP_DT_PREFIX=fvp-base-gicv3-psci-1t all && \
> +    make -j$(nproc) DEBUG=1 PLAT=fvp ARCH=aarch64 
> FVP_DT_PREFIX=fvp-base-gicv3-psci-1t fip 
> BL33=../u-boot-"$UBOOT_VERSION"/u-boot.bin && \
> +    cp build/fvp/debug/bl1.bin / && \
> +    cp build/fvp/debug/fip.bin / && \
> +    cp build/fvp/debug/fdts/fvp-base-gicv3-psci-1t.dtb / && \
> +    cd /build && \
> +    rm -rf u-boot-"$UBOOT_VERSION" trusted-firmware-a
You forgot to remove u-boot tar file

Other than that:
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.