All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wl@xen.org>
To: Stefano Stabellini <sstabellini@kernel.org>
Cc: cardoe@cardoe.com, andrew.cooper3@citrix.com, wl@xen.org,
	xen-devel@lists.xenproject.org,
	Stefano Stabellini <stefano.stabellini@xilinx.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>
Subject: Re: [PATCH] automation: add arm32 cross-build tests for Xen
Date: Fri, 12 Mar 2021 16:07:50 +0000	[thread overview]
Message-ID: <20210312160750.svw4ls76z6yli3yb@liuwe-devbox-debian-v2> (raw)
In-Reply-To: <20210213013813.30114-1-sstabellini@kernel.org>

On Fri, Feb 12, 2021 at 05:38:13PM -0800, Stefano Stabellini wrote:
> Add a debian build container with cross-gcc for arm32 installed.
> Add build jobs to cross-compile Xen-only for arm32.
> 
> Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>

Acked-by: Wei Liu <wl@xen.org>

Cc Ian.

The risk is small: Gitlab CI doesn't gate pushes to Xen, but it is
rather beneficial to have arm32 builds for Xen.

> ---
>  .../debian/unstable-arm32-gcc.dockerfile      | 24 +++++++++
>  automation/gitlab-ci/build.yaml               | 50 +++++++++++++++++++
>  automation/scripts/build                      |  9 ++++
>  3 files changed, 83 insertions(+)
>  create mode 100644 automation/build/debian/unstable-arm32-gcc.dockerfile
> 
> diff --git a/automation/build/debian/unstable-arm32-gcc.dockerfile b/automation/build/debian/unstable-arm32-gcc.dockerfile
> new file mode 100644
> index 0000000000..b41a57f197
> --- /dev/null
> +++ b/automation/build/debian/unstable-arm32-gcc.dockerfile
> @@ -0,0 +1,24 @@
> +FROM debian:unstable
> +LABEL maintainer.name="The Xen Project" \
> +      maintainer.email="xen-devel@lists.xenproject.org"
> +
> +ENV DEBIAN_FRONTEND=noninteractive
> +ENV USER root
> +ENV CROSS_COMPILE /usr/bin/arm-linux-gnueabihf-
> +
> +RUN mkdir /build
> +WORKDIR /build
> +
> +# build depends
> +RUN apt-get update && \
> +    apt-get --quiet --yes install \
> +        build-essential \
> +        flex \
> +        bison \
> +        git \
> +        gcc-arm-linux-gnueabihf \
> +        && \
> +        apt-get autoremove -y && \
> +        apt-get clean && \
> +        rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
> +
> diff --git a/automation/gitlab-ci/build.yaml b/automation/gitlab-ci/build.yaml
> index d00b8a5123..22114662f2 100644
> --- a/automation/gitlab-ci/build.yaml
> +++ b/automation/gitlab-ci/build.yaml
> @@ -117,6 +117,33 @@
>    variables:
>      <<: *clang
>  
> +.arm32-cross-build-tmpl:
> +  <<: *build
> +  variables:
> +    XEN_TARGET_ARCH: arm32
> +  tags:
> +    - x86_64
> +
> +.arm32-cross-build:
> +  extends: .arm32-cross-build-tmpl
> +  variables:
> +    debug: n
> +
> +.arm32-cross-build-debug:
> +  extends: .arm32-cross-build-tmpl
> +  variables:
> +    debug: y
> +
> +.gcc-arm32-cross-build:
> +  extends: .arm32-cross-build
> +  variables:
> +    <<: *gcc
> +
> +.gcc-arm32-cross-build-debug:
> +  extends: .arm32-cross-build-debug
> +  variables:
> +    <<: *gcc
> +
>  .arm64-build-tmpl:
>    <<: *build
>    variables:
> @@ -454,6 +481,29 @@ alpine-3.12-clang-debug:
>      CONTAINER: alpine:3.12
>    allow_failure: true
>  
> +# Arm32 cross-build
> +
> +debian-unstable-gcc-arm32:
> +  extends: .gcc-arm32-cross-build
> +  variables:
> +    CONTAINER: debian:unstable-arm32-gcc
> +
> +debian-unstable-gcc-arm32-debug:
> +  extends: .gcc-arm32-cross-build-debug
> +  variables:
> +    CONTAINER: debian:unstable-arm32-gcc
> +
> +debian-unstable-gcc-arm32-randconfig:
> +  extends: .gcc-arm32-cross-build
> +  variables:
> +    CONTAINER: debian:unstable-arm32-gcc
> +    RANDCONFIG: y
> +
> +debian-unstable-gcc-arm32-debug-randconfig:
> +  extends: .gcc-arm32-cross-build-debug
> +  variables:
> +    CONTAINER: debian:unstable-arm32-gcc
> +    RANDCONFIG: y
>  
>  # Arm builds
>  
> diff --git a/automation/scripts/build b/automation/scripts/build
> index d8990c3bf4..e7d68f7a9d 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -15,6 +15,15 @@ else
>      make -j$(nproc) -C xen defconfig
>  fi
>  
> +# arm32 only cross-compiles the hypervisor
> +if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
> +    make -j$(nproc) xen
> +    cp xen/.config xen-config
> +    mkdir binaries
> +    cp xen/xen binaries/xen
> +    exit 0
> +fi
> +
>  # build up our configure options
>  cfgargs=()
>  cfgargs+=("--enable-docs")
> -- 
> 2.17.1
> 


  reply	other threads:[~2021-03-12 16:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-13  1:38 [PATCH] automation: add arm32 cross-build tests for Xen Stefano Stabellini
2021-03-12 16:07 ` Wei Liu [this message]
2021-03-13  8:44 ` Roger Pau Monné

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=20210312160750.svw4ls76z6yli3yb@liuwe-devbox-debian-v2 \
    --to=wl@xen.org \
    --cc=andrew.cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=stefano.stabellini@xilinx.com \
    --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.