All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiamei Xie <Jiamei.Xie@arm.com>
To: Michal Orzel <michal.orzel@amd.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Doug Goldstein <cardoe@cardoe.com>,
	Stefano Stabellini <sstabellini@kernel.org>
Subject: RE: [PATCH v3 05/10] automation: Add Arm containers to containerize script
Date: Thu, 20 Oct 2022 07:13:02 +0000	[thread overview]
Message-ID: <AS8PR08MB769676050B41BCEDCA3F2891922A9@AS8PR08MB7696.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <bc41f3a0-27ec-8bbe-a087-125acc20df2f@amd.com>

Hi Michal,

> -----Original Message-----
> From: Michal Orzel <michal.orzel@amd.com>
> Sent: Thursday, October 20, 2022 2:59 PM
> To: Jiamei Xie <Jiamei.Xie@arm.com>; xen-devel@lists.xenproject.org
> Cc: Doug Goldstein <cardoe@cardoe.com>; Stefano Stabellini
> <sstabellini@kernel.org>
> Subject: Re: [PATCH v3 05/10] automation: Add Arm containers to
> containerize script
> 
> Hi Jiamei,
> 
> On 20/10/2022 05:00, Jiamei Xie wrote:
> >
> >
> > Hi Michal,
> >
> >> -----Original Message-----
> >> From: Xen-devel <xen-devel-bounces@lists.xenproject.org> On Behalf Of
> >> Michal Orzel
> >> Sent: Tuesday, September 27, 2022 5:47 PM
> >> To: xen-devel@lists.xenproject.org
> >> Cc: Michal Orzel <michal.orzel@amd.com>; Doug Goldstein
> >> <cardoe@cardoe.com>; Stefano Stabellini <sstabellini@kernel.org>
> >> Subject: [PATCH v3 05/10] automation: Add Arm containers to
> containerize
> >> script
> >>
> >> Script automation/scripts/containerize makes it easy to build Xen within
> >> predefined containers from gitlab container registry. This script is
> >> currently missing the helpers to select Arm containers, so populate the
> >> necessary entries.
> >>
> >> Signed-off-by: Michal Orzel <michal.orzel@amd.com>
> >> Acked-by: Stefano Stabellini <sstabellini@kernel.org>
> >> ---
> 
> >
> > [Jiamei Xie]
> > I wonder if an default container for arm can be added. For example,  if
> >  "CONTAINER=arm64 automation/scripts/containerize bash",
> >  set the default CONTAINER as "registry.gitlab.com/xen-
> project/xen/alpine:3.12-arm64v8"
> >
> 
> It can be added doing the following:
> 
> diff --git a/automation/scripts/containerize
> b/automation/scripts/containerize
> index 0f4645c4cccb..b395bd359ecf 100755
> --- a/automation/scripts/containerize
> +++ b/automation/scripts/containerize
> @@ -25,7 +25,7 @@ die() {
>  BASE="registry.gitlab.com/xen-project/xen"
>  case "_${CONTAINER}" in
>      _alpine) CONTAINER="${BASE}/alpine:3.12" ;;
> -    _alpine-arm64v8) CONTAINER="${BASE}/alpine:3.12-arm64v8" ;;
> +    _alpine-arm64v8|_arm64) CONTAINER="${BASE}/alpine:3.12-arm64v8" ;;
>      _archlinux|_arch) CONTAINER="${BASE}/archlinux:current" ;;
>      _riscv64) CONTAINER="${BASE}/archlinux:riscv64" ;;
>      _centos7) CONTAINER="${BASE}/centos:7" ;;
> 
> The question is whether it would be beneficial. After all you would still need
> to
> type CONTAINER=arm64, whereas at the moment, you need to type
> CONTAINER=alpine-arm64v8.
> TBH I'm not sure it is improving anything (?).
> 
> ~Michal
[Jiamei Xie] 
I am not sure about this either.  I added something like below f to run it on arm64 machine.   But it  didn't take "running container for a different architecture" into consideration.

--- a/automation/scripts/containerize
+++ b/automation/scripts/containerize
@@ -18,6 +18,12 @@ die() {
     exit 1
 }

+# There are two containers that can run on aarch64, unstable and alpine.
+# Set the default container to alpine for aarch64
+if [[ $(uname -m) = "aarch64" && -z ${CONTAINER} ]]; then
+    CONTAINER="alpine"
+fi
+
 #
 # The caller is expected to override the CONTAINER environment
 # variable with the container they wish to launch.
@@ -41,6 +47,11 @@ case "_${CONTAINER}" in
     _opensuse-tumbleweed|_tumbleweed) CONTAINER="${BASE}/suse:opensuse-tumbleweed" ;;
 esac

+# Containers for aarch64 have a sufix "-arm64v8"
+if [[ $(uname -m) = "aarch64" ]]; then
+    CONTAINER="${CONTAINER}-arm64v8"
+fi
+
 # Use this variable to control whether root should be used
 case "_${CONTAINER_UID0}" in
     _1)   userarg= ;;


Best wishes
Jiamei Xie



  reply	other threads:[~2022-10-20  7:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-27  9:47 [PATCH v3 00/10] GitLab CI cleanup & improvements for Arm Michal Orzel
2022-09-27  9:47 ` [for-4.17,PATCH v3 01/10] automation: qemu-smoke-arm{32/64}.sh: Fix typo in DEBIAN_FRONTENT Michal Orzel
2022-09-27  9:51   ` Henry Wang
2022-09-27  9:54   ` Luca Fancellu
2022-09-28  0:29   ` Stefano Stabellini
2022-09-27  9:47 ` [PATCH v3 02/10] automation: Add randconfig build jobs for arm64 alpine container Michal Orzel
2022-09-27  9:47 ` [PATCH v3 03/10] automation: qemu-smoke-arm64.sh: Increase RAM size Michal Orzel
2022-09-27  9:47 ` [PATCH v3 04/10] automation: Add debug versions of Arm tests Michal Orzel
2022-09-27  9:47 ` [PATCH v3 05/10] automation: Add Arm containers to containerize script Michal Orzel
2022-10-20  3:00   ` Jiamei Xie
2022-10-20  6:59     ` Michal Orzel
2022-10-20  7:13       ` Jiamei Xie [this message]
2022-10-20  7:51         ` Michal Orzel
2022-10-20  8:03           ` Jiamei Xie
2022-09-27  9:47 ` [PATCH v3 06/10] automation: qemu-smoke-arm32.sh: Modify script to use ImageBuilder Michal Orzel
2022-09-27  9:47 ` [PATCH v3 07/10] automation: qemu-alpine-arm64: Cleanup and fixes Michal Orzel
2022-09-27  9:52   ` Luca Fancellu
2022-09-28  0:29   ` Stefano Stabellini
2022-09-27  9:47 ` [PATCH v3 08/10] automation: Rename qemu-smoke-arm64.sh to qemu-smoke-dom0less-arm64.sh Michal Orzel
2022-09-27  9:47 ` [PATCH v3 09/10] automation: Rename qemu-alpine-arm64.sh to qemu-smoke-dom0-arm64.sh Michal Orzel
2022-09-27  9:47 ` [PATCH v3 10/10] automation: Rename qemu-smoke-arm32.sh to qemu-smoke-dom0-arm32.sh Michal Orzel

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=AS8PR08MB769676050B41BCEDCA3F2891922A9@AS8PR08MB7696.eurprd08.prod.outlook.com \
    --to=jiamei.xie@arm.com \
    --cc=cardoe@cardoe.com \
    --cc=michal.orzel@amd.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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.