automation: add arm32 cross-build tests for Xen
PATCH 1/1 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 <[email protected]>
--- .../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
automation/build/debian/unstable-arm32-gcc.dockerfile new file +24 -0
@@ -0,0 +1,24 @@ +FROM debian:unstable +LABEL maintainer.name="The Xen Project" \ + maintainer.email="[email protected]" + +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/* +
automation/gitlab-ci/build.yaml +50 -0
62 lines not on this page · raw message
automation/scripts/build +9 -0
@@ -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")
Signature · 1 line
2.17.1
Quoted 4 lines · Stefano Stabellini
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 <[email protected]>
Acked-by Wei Liu <[email protected]>
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.
Quoted 128 lines
--- .../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.dockerfileautomation/build/debian/unstable-arm32-gcc.dockerfile new file +24
-0@@ -0,0 +1,24 @@ +FROM debian:unstable +LABEL maintainer.name="The Xen Project" \ + maintainer.email="[email protected]" + +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/* +automation/gitlab-ci/build.yaml +50
-0@@ -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 buildsautomation/scripts/build +9
-0@@ -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")Signature · 1 line
2.17.1
Quoted 6 lines · Stefano Stabellini
automation/scripts/build +0
-0@@ -15,6 +15,15 @@ else make -j$(nproc) -C xen defconfig
automation/scripts/build else · line 25
Quoted 10 lines
automation/scripts/build +8
-0fi +# 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
You will have to rebase on top of 893103e286ac1c50 at which point you have an option to do hypervisor only builds already (hypervisor_only).
Thanks, Roger.