Skip to contentSkip to conversation

automation: build Xen on Arm64

PATCH In review Wei Liu 3 participants 8 messages Nov 7, 2018 – Nov 13, 2018

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

cover automation: build Xen on Arm64

Hi all

This is my first attempt to quickly get something useful for Arm in Gitlab CI with a machine borrowed from Packet.net.

The runner is configured manually at the moment (see below). It is tagged with arm,arm64,docker so it will only run Arm64 jobs. Idealy we should build it with Terraform as well. There is Packet.net API support for Terraform but I don't have time to read their documentation.

I have built a base image for Arm and pushed it to Gitlab docker repository. Building an image requires an native Arm environment.

We should also probably refactor .gitlab-ci.yml a bit.

Wei.

Command to register the runner:
gitlab-runner register --non-interactive -r ${gitlab_token} --locked --url \
https://gitlab.com --executor docker --tag-list arm,arm64,docker --docker-image \
ruby:2.1

Wei Liu (3):
automation: add debian unstable arm64v8 image
automation: add two Arm64 builds to Gitlab CI
automation: lift tools build restriction in build script

 .gitlab-ci.yml                                     | 22 ++++++++++
 .../build/debian/unstable-arm64v8.dockerfile       | 48 ++++++++++++++++++++++
 automation/scripts/build                           |  6 ---
 3 files changed, 70 insertions(+), 6 deletions(-)
 create mode 100644 automation/build/debian/unstable-arm64v8.dockerfile
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author
#1 lore raw

PATCH 1/3 automation: add debian unstable arm64v8 image

Unfortunately sharing dockerfile has proven impossible: 1) the base image is different; 2) Arm doesn't need libc-dev-i386; 3) Arm needs libfdt-dev.

---
 .../build/debian/unstable-arm64v8.dockerfile       | 48 ++++++++++++++++++++++
 1 file changed, 48 insertions(+)
 create mode 100644 automation/build/debian/unstable-arm64v8.dockerfile
automation/build/debian/unstable-arm64v8.dockerfile new file +48 -0
new file mode 100644
index 0000000000..57db46a4d1
@@ -0,0 +1,48 @@
+FROM arm64v8/debian:unstable
+LABEL maintainer.name="The Xen Project" \
+      maintainer.email="[email protected]"
+
+ENV DEBIAN_FRONTEND=noninteractive
+ENV USER root
+
+RUN mkdir /build
+WORKDIR /build
+
+# build depends
+RUN apt-get update && \
+    apt-get --quiet --yes install \
+        build-essential \
+        zlib1g-dev \
+        libncurses5-dev \
+        libssl-dev \
+        python2.7-dev \
+        xorg-dev \
+        uuid-dev \
+        libyajl-dev \
+        libaio-dev \
+        libglib2.0-dev \
+        clang \
+        libpixman-1-dev \
+        pkg-config \
+        flex \
+        bison \
+        gettext \
+        acpica-tools \
+        libfdt-dev \
+        bin86 \
+        bcc \
+        liblzma-dev \
+        libnl-3-dev \
+        ocaml-nox \
+        libfindlib-ocaml-dev \
+        markdown \
+        transfig \
+        pandoc \
+        checkpolicy \
+        wget \
+        git \
+        nasm \
+        && \
+        apt-get autoremove -y && \
+        apt-get clean && \
+        rm -rf /var/lib/apt/lists* /tmp/* /var/tmp/*
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author
#2 lore raw

PATCH 2/3 automation: add two Arm64 builds to Gitlab CI

In reply to Wei Liu

Add two gcc builds. Clang builds are known to be broken at the moment.

---
 .gitlab-ci.yml | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
.gitlab-ci.yml +22 -0
index bf6bf7d895..f2db6dfa53 100644
@@ -269,3 +269,25 @@ ubuntu-xenial-gcc-debug:
     CONTAINER: ubuntu:xenial
     debug: y
     XEN_TARGET_ARCH: x86_64
+
+# Arm builds
+
+debian-unstable-gcc-arm64:
+  <<: *build
+  variables:
+    <<: *gcc
+    CONTAINER: debian:unstable-arm64v8
+    debug: n
+    XEN_TARGET_ARCH: arm64
+  tags:
+    - arm64
+
+debian-unstable-gcc-debug-arm64:
+  <<: *build
+  variables:
+    <<: *gcc
+    CONTAINER: debian:unstable-arm64v8
+    debug: y
+    XEN_TARGET_ARCH: arm64
+  tags:
+    - arm64
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author
#4 lore raw

Re: [PATCH 2/3] automation: add two Arm64 builds to Gitlab CI

Quoted 6 lines · Andrew Cooper
Quoted 3 lines · Wei Liu

Add two gcc builds. Clang builds are known to be broken at the moment.

Would it be wise to have a RANDCONFIG build as well?

Sure. It appears that we forgot to put in randconf for gitlab ci at all. :s

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#5 lore raw

PATCH 3/3 automation: lift tools build restriction in build script

In reply to Wei Liu

The restrictions are mostly from Travis CI days when cross-compilation was not feasible. Now we will be building natively on Arm, remove those lines.

---
 automation/scripts/build | 6 ------
 1 file changed, 6 deletions(-)
automation/scripts/build +0 -6
index c463b060d4..482ed48201 100755
@@ -22,12 +22,6 @@ if [[ "${CC}" == "clang" ]]; then
     cfgargs+=("--disable-stubdom")
 fi
 
-if [[ "${XEN_TARGET_ARCH}" == "arm64" || "${XEN_TARGET_ARCH}" == "arm32" ]]; then
-    cfgargs+=("--disable-tools") # we don't have the cross depends installed
-elif [[ "${CC}" != "clang" ]]; then
-    cfgargs+=("--enable-ovmf") # build ovmf with gcc on x86, arm doesn't use in-tree ovmf
-fi
-
 ./configure "${cfgargs[@]}"
 
 make -j$(nproc) dist
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
author
#6 lore raw
In reply to Wei Liu

Doug?

(Sorry you weren't CC'ed on the cover letter)

Quoted 27 lines · Wei Liu

Hi all

This is my first attempt to quickly get something useful for Arm in Gitlab CI with a machine borrowed from Packet.net.

The runner is configured manually at the moment (see below). It is tagged with arm,arm64,docker so it will only run Arm64 jobs. Idealy we should build it with Terraform as well. There is Packet.net API support for Terraform but I don't have time to read their documentation.

I have built a base image for Arm and pushed it to Gitlab docker repository. Building an image requires an native Arm environment.

We should also probably refactor .gitlab-ci.yml a bit.

Wei.

Command to register the runner:
gitlab-runner register --non-interactive -r ${gitlab_token} --locked --url \
https://gitlab.com --executor docker --tag-list arm,arm64,docker --docker-image \
ruby:2.1

Wei Liu (3):
automation: add debian unstable arm64v8 image
automation: add two Arm64 builds to Gitlab CI
automation: lift tools build restriction in build script

Quoted 9 lines
 .gitlab-ci.yml                                     | 22 ++++++++++
 .../build/debian/unstable-arm64v8.dockerfile       | 48 ++++++++++++++++++++++
 automation/scripts/build                           |  6 ---
 3 files changed, 70 insertions(+), 6 deletions(-)
 create mode 100644 automation/build/debian/unstable-arm64v8.dockerfile
Signature · 1 line
2.11.0

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel