From d6e0352cff80d92f423b7942e1fce0ebf5dbacba Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Wed, 28 Oct 2020 06:42:38 -0400 Subject: [PATCH] Add an Ubuntu 18.04 s390x (IBM Z System) crossrootfs builder (#351) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Alexander Köplinger --- manifest.json | 12 ++++++++++++ src/ubuntu/18.04/cross/s390x/Dockerfile | 9 +++++++++ src/ubuntu/18.04/cross/s390x/hooks/post-build | 3 +++ src/ubuntu/18.04/cross/s390x/hooks/pre-build | 5 +++++ 4 files changed, 29 insertions(+) create mode 100644 src/ubuntu/18.04/cross/s390x/Dockerfile create mode 100755 src/ubuntu/18.04/cross/s390x/hooks/post-build create mode 100755 src/ubuntu/18.04/cross/s390x/hooks/pre-build diff --git a/manifest.json b/manifest.json index 990cd931b..311695447 100644 --- a/manifest.json +++ b/manifest.json @@ -461,6 +461,18 @@ } ] }, + { + "platforms": [ + { + "dockerfile": "src/ubuntu/18.04/cross/s390x", + "os": "linux", + "osVersion": "bionic", + "tags": { + "ubuntu-18.04-cross-s390x-$(System:TimeStamp)-$(System:DockerfileGitCommitSha)": {} + } + } + ] + }, { "platforms": [ { diff --git a/src/ubuntu/18.04/cross/s390x/Dockerfile b/src/ubuntu/18.04/cross/s390x/Dockerfile new file mode 100644 index 000000000..2beaf7821 --- /dev/null +++ b/src/ubuntu/18.04/cross/s390x/Dockerfile @@ -0,0 +1,9 @@ +FROM mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-crossdeps + +# Install binutils-s390x-linux-gnu +RUN apt-get update \ + && apt-get install -y \ + binutils-s390x-linux-gnu \ + && rm -rf /var/lib/apt/lists/* + +ADD rootfs.s390x.tar crossrootfs diff --git a/src/ubuntu/18.04/cross/s390x/hooks/post-build b/src/ubuntu/18.04/cross/s390x/hooks/post-build new file mode 100755 index 000000000..516d571a2 --- /dev/null +++ b/src/ubuntu/18.04/cross/s390x/hooks/post-build @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +rm -rf $PWD/rootfs*.tar diff --git a/src/ubuntu/18.04/cross/s390x/hooks/pre-build b/src/ubuntu/18.04/cross/s390x/hooks/pre-build new file mode 100755 index 000000000..748164694 --- /dev/null +++ b/src/ubuntu/18.04/cross/s390x/hooks/pre-build @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +SCRIPT=$(readlink -f "$0") +SCRIPTPATH=$(dirname "$SCRIPT") +$SCRIPTPATH/../../../../build-scripts/build-rootfs.sh ubuntu-18.04 bionic s390x nolldb