Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added QEMU support to cross build s390x image #6

Merged
merged 1 commit into from
May 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Dockerfile.s390x
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
FROM alpine:3.11 as qemu

ARG QEMU_VERSION=6.1.0-8
ARG QEMU_ARCHS="s390x"

RUN apk --update add curl

# Enable non-native runs on amd64 architecture hosts
RUN curl -L https://github.com/multiarch/qemu-user-static/releases/download/v${QEMU_VERSION}/qemu-${QEMU_ARCHS}-static.tar.gz | tar zxvf - -C /usr/bin &&\
chmod +x /usr/bin/qemu-s390x-static

FROM s390x/debian:buster-slim as bpftool-build
ARG KERNEL_REPO=git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
ARG KERNEL_REF=master

COPY --from=qemu /usr/bin/qemu-s390x-static /usr/bin/

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y --no-install-recommends \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ all: image-all
# The target architecture is select by setting the ARCH variable.
# When ARCH is undefined it is set to the detected host architecture.
# When ARCH differs from the host architecture a crossbuild will be performed.
ARCHES = amd64 arm64 armv7 ppc64le
ARCHES = amd64 arm64 armv7 ppc64le s390x

# BUILDARCH is the host architecture
# ARCH is the target architecture
Expand Down