[Skiboot] [PATCH] travis: Enable ppc64le builds

Stewart Smith stewart at linux.ibm.com
Fri Apr 20 10:24:01 AEST 2018


From: Stewart Smith <stewart at linux.vnet.ibm.com>

At least on the IBM Travis Enterprise instance, we can now do
ppc64le builds!

We can only build a subset of our matrix due to availability of
ppc64le distros. The Dockerfiles need some tweaking to only
attempt to install (x86_64 only) Mambo binaries, as well as the
build scripts.

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 .travis.yml                        | 16 ++++++++++++++++
 opal-ci/Dockerfile-centos7         | 10 ++++------
 opal-ci/Dockerfile-debian-stretch  | 12 ++++--------
 opal-ci/Dockerfile-debian-unstable | 15 +++++----------
 opal-ci/Dockerfile-fedora-rawhide  |  2 +-
 opal-ci/Dockerfile-fedora26        |  2 +-
 opal-ci/Dockerfile-fedora27        |  2 +-
 opal-ci/Dockerfile-ubuntu-12.04    | 15 +++++----------
 opal-ci/Dockerfile-ubuntu-16.04    | 15 +++++----------
 opal-ci/Dockerfile-ubuntu-latest   | 15 +++++----------
 opal-ci/build-centos7.sh           |  9 +++++++--
 opal-ci/build-ubuntu-16.04.sh      | 10 +++++++++-
 12 files changed, 63 insertions(+), 60 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 0deda307d3dc..e68c9151f69c 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,9 @@
 language: c
 
+os:
+ - linux
+ - linux-ppc64le
+
 cache: ccache
 
 env:
@@ -25,6 +29,18 @@ matrix:
   allow_failures:
     - env: RUN_ON_CONTAINER=fedora-rawhide
     - env: RUN_ON_CONTAINER=debian-unstable
+  exclude:
+    - os: linux-ppc64le
+      env: RUN_ON_CONTAINER=ubuntu-12.04
+    - os: linux-ppc64le
+      env: RUN_ON_CONTAINER=fedora24
+    - os: linux-ppc64le
+      env: RUN_ON_CONTAINER=fedora25
+    - os: linux-ppc64le
+      env: RUN_ON_CONTAINER=centos6
+    - os: linux-ppc64le
+      env: RUN_ON_CONTAINER=centos7
+
 
 sudo: required
 services: docker
diff --git a/opal-ci/Dockerfile-centos7 b/opal-ci/Dockerfile-centos7
index be6f6a333c64..06456b9a777e 100644
--- a/opal-ci/Dockerfile-centos7
+++ b/opal-ci/Dockerfile-centos7
@@ -1,13 +1,11 @@
 FROM centos:7
 RUN yum -y update && yum clean all
 RUN yum -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel openssl
-RUN wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz
 RUN mkdir /opt/cross
-RUN tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8-1.0-2.el7.x86_64.rpm 
-RUN yum install -y systemsim-p8-1.0-2.el7.x86_64.rpm
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0.el7.x86_64.rpm 
-RUN yum install -y systemsim-p9-1.0-0.el7.x86_64.rpm
+RUN if [ `arch` == "x86_64" ]; then wget https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz; tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz; fi
+RUN if [ `arch` == "ppc64le" ]; then wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/ppc64le/4.9.4/ppc64le-gcc-4.9.4-nolibc-powerpc64-linux.tar.xz; tar -C /opt/cross -xf ppc64le-gcc-4.9.4-nolibc-powerpc64-linux.tar.xz; fi
+RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8-1.0-2.el7.x86_64.rpm; yum install -y systemsim-p8-1.0-2.el7.x86_64.rpm; fi
+RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0.el7.x86_64.rpm; yum install -y systemsim-p9-1.0-0.el7.x86_64.rpm; fi
 RUN yum install -y flex bison
 RUN curl -L https://github.com/dgibson/dtc/archive/v1.4.2.tar.gz|tar xfz -
 RUN (cd dtc-1.4.2; make PREFIX=/usr/local install)
diff --git a/opal-ci/Dockerfile-debian-stretch b/opal-ci/Dockerfile-debian-stretch
index 780f92b2d2a3..9478a45bf594 100644
--- a/opal-ci/Dockerfile-debian-stretch
+++ b/opal-ci/Dockerfile-debian-stretch
@@ -1,13 +1,9 @@
 FROM debian:stretch
 RUN apt-get update -qq
-RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc ccache expect libssl-dev
-RUN apt-get install -y wget xterm curl device-tree-compiler
-RUN apt-get install -y gcc-arm-linux-gnueabi
-RUN apt-get install -y libtcl8.6
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb
-RUN dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb
-RUN apt-get -y install eatmydata
-RUN eatmydata apt-get -y install build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind
+RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget xterm curl device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
+RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
+RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-debian-unstable b/opal-ci/Dockerfile-debian-unstable
index ab4c81b4ba2a..4c2145f98ca5 100644
--- a/opal-ci/Dockerfile-debian-unstable
+++ b/opal-ci/Dockerfile-debian-unstable
@@ -1,15 +1,10 @@
 FROM debian:unstable
 RUN apt-get update -qq
-RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc ccache expect libssl-dev
-RUN apt-get install -y wget xterm curl device-tree-compiler
-RUN apt-get install -y gcc-arm-linux-gnueabi
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb
-RUN dpkg -i systemsim-p8_1.0-2_amd64.deb
-RUN apt-get install -y libtcl8.6
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb
-RUN dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb
-RUN apt-get -y install eatmydata
-RUN eatmydata apt-get -y install build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind
+RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget xterm curl device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
+RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
+RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.0-0/systemsim-p9-1.0-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.0-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-fedora-rawhide b/opal-ci/Dockerfile-fedora-rawhide
index 7d2a28de28f5..7413a58e7dc1 100644
--- a/opal-ci/Dockerfile-fedora-rawhide
+++ b/opal-ci/Dockerfile-fedora-rawhide
@@ -1,7 +1,7 @@
 FROM fedora:rawhide
 RUN dnf -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel
 RUN dnf -y install gcc-powerpc64-linux-gnu 
-RUN dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm
+RUN if [ `arch` == "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-fedora24.sh
diff --git a/opal-ci/Dockerfile-fedora26 b/opal-ci/Dockerfile-fedora26
index 78ed3b89d38b..3cb66f33c67c 100644
--- a/opal-ci/Dockerfile-fedora26
+++ b/opal-ci/Dockerfile-fedora26
@@ -1,7 +1,7 @@
 FROM fedora:26
 RUN dnf -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel
 RUN dnf -y install gcc-powerpc64-linux-gnu 
-RUN dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm
+RUN if [ `arch` == "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-fedora24.sh
diff --git a/opal-ci/Dockerfile-fedora27 b/opal-ci/Dockerfile-fedora27
index c166213b287a..770220bc9db0 100644
--- a/opal-ci/Dockerfile-fedora27
+++ b/opal-ci/Dockerfile-fedora27
@@ -1,7 +1,7 @@
 FROM fedora:27
 RUN dnf -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl-devel
 RUN dnf -y install gcc-powerpc64-linux-gnu 
-RUN dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm
+RUN if [ `arch` == "x86_64" ]; then dnf -y install http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0.f22.x86_64.rpm; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-fedora24.sh
diff --git a/opal-ci/Dockerfile-ubuntu-12.04 b/opal-ci/Dockerfile-ubuntu-12.04
index 64731879e5db..beaa71308470 100644
--- a/opal-ci/Dockerfile-ubuntu-12.04
+++ b/opal-ci/Dockerfile-ubuntu-12.04
@@ -3,20 +3,15 @@ RUN sudo apt-get update -qq
 RUN sudo apt-get install -y software-properties-common
 RUN sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
 RUN sudo apt-get update -qq
-RUN sudo apt-get install -y gcc-4.8 libstdc++6 valgrind expect xterm ccache expect device-tree-compiler libssl-dev
-RUN sudo apt-get install -y gcc-arm-linux-gnueabi gcc-powerpc64le-linux-gnu gcc
+RUN sudo apt-get install -y gcc-4.8 libstdc++6 valgrind expect xterm ccache expect device-tree-compiler libssl-dev gcc wget curl build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 libtcl8.6
+RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
+RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
 RUN sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
-RUN sudo apt-get install -y wget curl
 RUN curl -L -O https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.8.0/x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz
 RUN sudo mkdir /opt/cross
 RUN sudo tar -C /opt/cross -xf x86_64-gcc-4.8.0-nolibc_powerpc64-linux.tar.xz
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb
-RUN sudo dpkg -i systemsim-p8_1.0-2_amd64.deb
-RUN apt-get install -y libtcl8.6
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb
-RUN sudo dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb
-RUN sudo apt-get -y install eatmydata
-RUN sudo eatmydata apt-get -y install build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6
+RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ `arch` == "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-12.04.sh
diff --git a/opal-ci/Dockerfile-ubuntu-16.04 b/opal-ci/Dockerfile-ubuntu-16.04
index 94d7e3aaa32e..5e6ddac51338 100644
--- a/opal-ci/Dockerfile-ubuntu-16.04
+++ b/opal-ci/Dockerfile-ubuntu-16.04
@@ -1,15 +1,10 @@
 FROM ubuntu:16.04
 RUN apt-get update -qq
-RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc ccache expect libssl-dev
-RUN apt-get install -y wget curl xterm device-tree-compiler
-RUN apt-get install -y gcc-arm-linux-gnueabi
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb
-RUN dpkg -i systemsim-p8_1.0-2_amd64.deb
-RUN apt-get install -y libtcl8.6
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb
-RUN dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb
-RUN apt-get -y install eatmydata
-RUN eatmydata apt-get -y install build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind
+RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
+RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
+RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ `arch` == "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/Dockerfile-ubuntu-latest b/opal-ci/Dockerfile-ubuntu-latest
index 6fc2312d60ce..5cb62ce938ce 100644
--- a/opal-ci/Dockerfile-ubuntu-latest
+++ b/opal-ci/Dockerfile-ubuntu-latest
@@ -1,15 +1,10 @@
 FROM ubuntu:latest
 RUN apt-get update -qq
-RUN apt-get install -y gcc-powerpc64le-linux-gnu gcc ccache expect libssl-dev
-RUN apt-get install -y wget xterm curl device-tree-compiler
-RUN apt-get install -y gcc-arm-linux-gnueabi
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb
-RUN dpkg -i systemsim-p8_1.0-2_amd64.deb
-RUN apt-get install -y libtcl8.6
-RUN curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb
-RUN dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb
-RUN apt-get -y install eatmydata
-RUN eatmydata apt-get -y install build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind
+RUN if [ `arch` != "ppc64le" ]; then apt-get update -qq && apt-get install -y gcc-powerpc64le-linux-gnu; fi
+RUN apt-get update -qq && apt-get install -y gcc ccache expect libssl-dev wget curl xterm device-tree-compiler build-essential gcc python g++ pkg-config libz-dev libglib2.0-dev libpixman-1-dev libfdt-dev git libstdc++6 valgrind libtcl8.6
+RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true
+RUN if [ `arch` == "x86_64" ]; then curl -L -O http://public.dhe.ibm.com/software/server/powerfuncsim/p8/packages/v1.0-2/systemsim-p8_1.0-2_amd64.deb; dpkg -i systemsim-p8_1.0-2_amd64.deb; fi
+RUN if [ `arch` == "x86_64" ]; then curl -O http://public.dhe.ibm.com/software/server/powerfuncsim/p9/packages/v1.1-0/systemsim-p9-1.1-0-trusty_amd64.deb; dpkg -i systemsim-p9-1.1-0-trusty_amd64.deb; fi
 COPY . /build/
 WORKDIR /build
 ENTRYPOINT ./opal-ci/build-ubuntu-16.04.sh
diff --git a/opal-ci/build-centos7.sh b/opal-ci/build-centos7.sh
index f51222f32743..b1234b37eec2 100755
--- a/opal-ci/build-centos7.sh
+++ b/opal-ci/build-centos7.sh
@@ -7,8 +7,13 @@ set -vx
 # We're limited as to what we want to bother to run on CentOS7
 # It's fairly old and some of the things (e.g. build+run qemu) we don't
 # want to bother doing.
-
-export CROSS=/opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux-
+if [ `arch` == "x86_64" ]; then
+    export CROSS=/opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux-
+fi
+# Note that this doesn't work on centos7 because "/lib64/ld64.so.2: version `GLIBC_2.22' not found"
+if [ `arch` == "ppc64le" ]; then
+    export CROSS=/opt/cross/gcc-4.9.4-nolibc/powerpc64-linux/bin/powerpc64-linux-
+fi
 
 MAKE_J=`grep -c processor /proc/cpuinfo`
 
diff --git a/opal-ci/build-ubuntu-16.04.sh b/opal-ci/build-ubuntu-16.04.sh
index 71781e41061e..989b7480165a 100755
--- a/opal-ci/build-ubuntu-16.04.sh
+++ b/opal-ci/build-ubuntu-16.04.sh
@@ -13,7 +13,15 @@ make -j${MAKE_J} all
 ./opal-ci/fetch-debian-jessie-installer.sh
 make -j${MAKE_J} check
 (make clean; cd external/gard && CROSS= make -j${MAKE_J})
-(cd external/pflash; ./build-all-arch.sh)
+# because some ppc64le versions don't have arm cross compiler
+if which arm-linux-gnueabi-gcc; then
+    ( cd external/pflash;
+      echo "Building for ARM..."
+      make clean && make distclean
+      CROSS_COMPILE=arm-linux-gnueabi-  make || { echo "ARM build failed"; exit 1; }
+    )
+fi
+(cd external/pflash; make clean && make distclean && make)
 make clean
 SKIBOOT_GCOV=1 make -j${MAKE_J}
 SKIBOOT_GCOV=1 make -j${MAKE_J} check
-- 
2.14.3



More information about the Skiboot mailing list