[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: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Henry Wang <Henry.Wang@xxxxxxx>
  • Date: Fri, 8 Dec 2023 08:56:38 +0000
  • Accept-language: zh-CN, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; 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=WlX09O5pdtIpVgkUO3NDWsQtjoI/eqSQ57MdOnQfTaA=; b=Cu7BXW2Bza1r6FbUBLxJWx2qTpFFIUSyyyneeAFfEIj0k00dxZ3Eu2sjwMcEM2j0HULjGDyJnQzIoTQnCU2ai4L143RxNHrTyCdNzemjaM1i7JGNN3AiK9VcOmQScUwo0V6wk+Jckf4FCoFflhcnkSeuDAu4cBbg5G5djcg3AJCl3BbwK8uFfHcCOqVFJA5Sg5QPacDuNK6dO5yc6daqdcxtW3Bgldv653h8X9ExeNzwxGAabsJN6sXpCEgeztZ3PJuRTBlHlsoE60jG2+mOSXo2dVfvPG/y0GU87Ow5O404XsBdGACacV+oyt2OEvbsk+NQrcc0QgT35hl1mHw7uA==
  • 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=WlX09O5pdtIpVgkUO3NDWsQtjoI/eqSQ57MdOnQfTaA=; b=QK9BeJuYDTqmStI3BzLj2beIfXC6gjNg84oVGqlyVQ7a7MzqLuyyMnQ3d4Of4eoWGbSTM570YzargnUu6hBoVXs9OoeMGbMRuw114J5iJUqyFckAVMCLHo7mR03ayPYcGwhM7n/zToSjoMgptw+dkFtMZ5vyTI1lDAled9SnUAAvzPQtgRygfQDWTzSSCoJv3kjr++xtRpq7tl5FuB8/4cjiyGSHKqIM5XTA1oWk/ayE5EVia0AS7OJS9Ex4W4fzmg7ra6FnvGLj30/7IMtnUbAwsNrhZloWLoMYEgvfx+auysy2UNpZZVUB8axd7TTRzkTZF8rVVoeCaFjgrdJKiQ==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=H3XZEtjkVdgEYgmQtfxW0NQ4sjryEne5UJPHb+PHwC3XkH7M6/SMvWVTro65bu2nA8AKaGQ151uJ7YVzf++12gaHII2Darkh4eJysFrgLYCubrmZSZrw+gp3rAFwUlFnMytvqUVB1wHlbE774lM2hfjz1PZp0v77H/KOk7UaizOL3T9BdG9zVWrOs547lV6QkcX3yOLKaTfVtUNhQIZj5ufWFrX/OFegM1WHH8ofWazAzJVEBKuoM4DFqsp7NBLyiI8Se4YbSKkuY8GYcmqqfQFDwZ33deQxEaeg1Ov9zsQ0tJB08aaGDowHGAEPIHiIE0bvnDWiRAfkEljg7mED8A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Te+s/4IBs5ip7FtS0TeNUqDH890rrA70M5m5WHs0sYaCYzWIawQu1CDz0ov0zlhBBYi2s/ybVBfBC8FweyX7BZjTqIH2mkPYKG+0loAxwRexT1aKrbewWAsJlAUk3eAqDpS8gjUUknbhHx2so+qv7+c1SUNyTm15H3XzbpmuvVsBBp86iPWg69MN6YsB1Oz7f/RhhdwPuo534Qyweml5FI4a9a8vyA+DMQbgYbkNNyd+ORI3vx10aPAg/wFb6HKx0hnCcx9hyuKbjnROgq7KIvFIla0QoHSlp5Ezx759M5cOWmukJvoZk6eEAJYoMQ5/0TgC27PPh/SdCujqv5XBeQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, 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:57:08 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHaKZn9nB8nbm9rDUK+GJE7s4YGUrCfEO6AgAAEuYA=
  • Thread-topic: [PATCH v2 2/5] automation: Add the Dockerfile to build TF-A and U-Boot for FVP

Hi Michal,

> On Dec 8, 2023, at 16:39, Michal Orzel <michal.orzel@xxxxxxx> wrote:
> 
> 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.
>> ---
>> +# 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?

I think your suggestion makes sense, and I can have a try, if changing all to 
u-boot works,
I will use that in v3.

>> +    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'

Hmmm right, then probably we can even not install git and use the tarball 
instead of
git clone.


>> +    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

oops, nice catch, thanks. Will also remove that in v3.

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

Thanks!

Stefano: Can I keep your Reviewed-by tag after addressing Michal’s comments 
above?

Kind regards,
Henry

> 
> ~Michal


 


Rackspace

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