From nobody Mon Feb 9 21:00:39 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=arm.com Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1661353092599306.9415947983505; Wed, 24 Aug 2022 07:58:12 -0700 (PDT) Received: from list by lists.xenproject.org with outflank-mailman.392781.631359 (Exim 4.92) (envelope-from ) id 1oQrpK-0004bm-JU; Wed, 24 Aug 2022 14:57:54 +0000 Received: by outflank-mailman (output) from mailman id 392781.631359; Wed, 24 Aug 2022 14:57:54 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oQrpK-0004al-DR; Wed, 24 Aug 2022 14:57:54 +0000 Received: by outflank-mailman (input) for mailman id 392781; Wed, 24 Aug 2022 14:57:53 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oQrpJ-0004EH-7f for xen-devel@lists.xenproject.org; Wed, 24 Aug 2022 14:57:53 +0000 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by se1-gles-flk1.inumbo.com (Halon) with ESMTP id 20b1e5c8-23bd-11ed-9250-1f966e50362f; Wed, 24 Aug 2022 16:57:52 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EDA451596; Wed, 24 Aug 2022 07:57:55 -0700 (PDT) Received: from e109506.cambridge.arm.com (e109506.cambridge.arm.com [10.1.199.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 43B0A3F67D; Wed, 24 Aug 2022 07:57:51 -0700 (PDT) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 20b1e5c8-23bd-11ed-9250-1f966e50362f From: Bertrand Marquis To: xen-devel@lists.xenproject.org Cc: Doug Goldstein , Stefano Stabellini Subject: [PATCH v1 3/4] automation: Add yocto containers with cache Date: Wed, 24 Aug 2022 15:57:19 +0100 Message-Id: <4d0141062aaec36a7c74182729c2dcef95deded3.1661352827.git.bertrand.marquis@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1661353093946100004 Content-Type: text/plain; charset="utf-8" Create yocto containers for kirkstone with a builder step to fill the yocto cache by running the build script once. Those containers depend on the kirkstone.dockerfile container to be created and use it as base image. To run a build test on one image the following command must be called inside the container: build-yocto.sh --xen-dir=3DXENSRC TARGET where - XENSRC is the directory where xen sources are available in the container - TARGET is the build target (qemuarm64, qemuarm or qemux86_64) In case of error, the script will return an error code and the logs will be in /home/docker-build/logs. !!! The build of each container can take several hours depending on the network bandwith (for downloading all sources) and the amount of computing power on the machine where the docker images are created. !!! Signed-off-by: Bertrand Marquis --- Changes in v1: - fix dependency in Makefile --- automation/build/Makefile | 2 ++ .../build/yocto/kirkstone-qemuarm.dockerfile | 28 +++++++++++++++++++ .../yocto/kirkstone-qemuarm64.dockerfile | 28 +++++++++++++++++++ .../yocto/kirkstone-qemux86-64.dockerfile | 28 +++++++++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 automation/build/yocto/kirkstone-qemuarm.dockerfile create mode 100644 automation/build/yocto/kirkstone-qemuarm64.dockerfile create mode 100644 automation/build/yocto/kirkstone-qemux86-64.dockerfile diff --git a/automation/build/Makefile b/automation/build/Makefile index a4b2b85178cf..b0dc68f00b70 100644 --- a/automation/build/Makefile +++ b/automation/build/Makefile @@ -16,5 +16,7 @@ help: $(DOCKER_CMD) push $(REGISTRY)/$(@D):$(@F); \ fi =20 +$(subst .dockerfile,,$(wildcard yocto/kirkstone-*)): yocto/kirkstone + .PHONY: all all: $(CONTAINERS) diff --git a/automation/build/yocto/kirkstone-qemuarm.dockerfile b/automati= on/build/yocto/kirkstone-qemuarm.dockerfile new file mode 100644 index 000000000000..e3cdc4dcf333 --- /dev/null +++ b/automation/build/yocto/kirkstone-qemuarm.dockerfile @@ -0,0 +1,28 @@ +# Docker file to populate the initial sstate and download cache for yocto +# for a specific target +# +# This requires the build-yocto.sh script to be in the same directory as t= his +# dockerfile during the image creation +# +# Arguments that can be passed during image creation using --build-arg: +# "from_image=3Dimg" to select the docker image and tag to start from +# "target=3Dqemuxxx": to select which target to build in this image + +ARG from_image=3Dregistry.gitlab.com/xen-project/xen/yocto:kirkstone + +FROM $from_image AS builder + +ARG target=3Dqemuarm + +# This step can take one to several hours depending on your download bandw= ith +# and the speed of your computer +RUN /home/$USER_NAME/bin/build-yocto.sh $target + +FROM $from_image + +# Only copy the cache status +COPY --from=3Dbuilder /home/$USER_NAME/yocto-cache /home/$USER_NAME/yocto-= cache/. + +LABEL maintainer.name=3D"The Xen Project " \ + maintainer.email=3D"xen-devel@lists.xenproject.org" + diff --git a/automation/build/yocto/kirkstone-qemuarm64.dockerfile b/automa= tion/build/yocto/kirkstone-qemuarm64.dockerfile new file mode 100644 index 000000000000..6045b6ac249f --- /dev/null +++ b/automation/build/yocto/kirkstone-qemuarm64.dockerfile @@ -0,0 +1,28 @@ +# Docker file to populate the initial sstate and download cache for yocto +# for a specific target +# +# This requires the build-yocto.sh script to be in the same directory as t= his +# dockerfile during the image creation +# +# Arguments that can be passed during image creation using --build-arg: +# "from_image=3Dimg" to select the docker image and tag to start from +# "target=3Dqemuxxx": to select which target to build in this image + +ARG from_image=3Dregistry.gitlab.com/xen-project/xen/yocto:kirkstone + +FROM $from_image AS builder + +ARG target=3Dqemuarm64 + +# This step can take one to several hours depending on your download bandw= ith +# and the speed of your computer +RUN /home/$USER_NAME/bin/build-yocto.sh $target + +FROM $from_image + +# Only copy the cache status +COPY --from=3Dbuilder /home/$USER_NAME/yocto-cache /home/$USER_NAME/yocto-= cache/. + +LABEL maintainer.name=3D"The Xen Project " \ + maintainer.email=3D"xen-devel@lists.xenproject.org" + diff --git a/automation/build/yocto/kirkstone-qemux86-64.dockerfile b/autom= ation/build/yocto/kirkstone-qemux86-64.dockerfile new file mode 100644 index 000000000000..35e2fdeb1e82 --- /dev/null +++ b/automation/build/yocto/kirkstone-qemux86-64.dockerfile @@ -0,0 +1,28 @@ +# Docker file to populate the initial sstate and download cache for yocto +# for a specific target +# +# This requires the build-yocto.sh script to be in the same directory as t= his +# dockerfile during the image creation +# +# Arguments that can be passed during image creation using --build-arg: +# "from_image=3Dimg" to select the docker image and tag to start from +# "target=3Dqemuxxx": to select which target to build in this image + +ARG from_image=3Dregistry.gitlab.com/xen-project/xen/yocto:kirkstone + +FROM $from_image AS builder + +ARG target=3Dqemux86-64 + +# This step can take one to several hours depending on your download bandw= ith +# and the speed of your computer +RUN /home/$USER_NAME/bin/build-yocto.sh $target + +FROM $from_image + +# Only copy the cache status +COPY --from=3Dbuilder /home/$USER_NAME/yocto-cache /home/$USER_NAME/yocto-= cache/. + +LABEL maintainer.name=3D"The Xen Project " \ + maintainer.email=3D"xen-devel@lists.xenproject.org" + --=20 2.25.1