Skip to content

Commit

Permalink
Merge pull request #6 from linux-on-ibm-z/s390x-qemu
Browse files Browse the repository at this point in the history
Added QEMU support to cross build s390x image
  • Loading branch information
caseydavenport authored May 27, 2022
2 parents 387e397 + 3ea6fca commit 552ddfe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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

0 comments on commit 552ddfe

Please sign in to comment.