[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2] automation: add arm32 cross-build tests for Xen



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@xxxxxxxxxx>
Acked-by: Wei Liu <wl@xxxxxxx>
---

Rebased on top of staging, using the new "hypervisor_only" option.

---
 .../debian/unstable-arm32-gcc.dockerfile      | 24 +++++++++
 automation/gitlab-ci/build.yaml               | 50 +++++++++++++++++++
 automation/scripts/build                      |  5 ++
 3 files changed, 79 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@xxxxxxxxxxxxxxxxxxxx"
+
+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 cca2c310e2..57bf2c7f80 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:
@@ -450,6 +477,29 @@ alpine-3.12-clang-debug:
   variables:
     CONTAINER: alpine:3.12
 
+# 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 1b752edfe6..eaf70b11d1 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -16,6 +16,11 @@ else
     make -j$(nproc) -C xen defconfig
 fi
 
+# arm32 only cross-compiles the hypervisor
+if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
+    hypervisor_only="y"
+fi
+
 # build up our configure options
 cfgargs=()
 cfgargs+=("--enable-docs")
-- 
2.17.1




 


Rackspace

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