[Skiboot] [PATCH 1/2] opal-ci: Add Ubuntu 18.04

Joel Stanley joel at jms.id.au
Fri May 4 16:36:50 AEST 2018

Start doing builds on latest LTS. We can simplify the build script a
little, as we know that this version of Ubuntu ships with an ARM cross
compiler and a Qemu that can run the tests.

This provides us with:

 gcc 7.3.0 (for native and cross-builds)
 qemu 2.11
 clang 6

Simplify the docker script a little by merging the two different install
lines, and getting rid of the duplicate 'apt-get update' steps. We now
install clang in preparation for future shenanigans, and use the system
qemu instead of building one ourselves.

Signed-off-by: Joel Stanley <joel at jms.id.au>
 .travis.yml                     |  1 +
 opal-ci/Dockerfile-ubuntu-18.04 | 10 ++++++++++
 opal-ci/build-ubuntu-18.04.sh   | 29 +++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+)
 create mode 100644 opal-ci/Dockerfile-ubuntu-18.04
 create mode 100755 opal-ci/build-ubuntu-18.04.sh

diff --git a/.travis.yml b/.travis.yml
index e68c9151f69c..4f74576a6821 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,6 +10,7 @@ env:
     - RUN_ON_CONTAINER=ubuntu-12.04
     - RUN_ON_CONTAINER=ubuntu-16.04
+    - RUN_ON_CONTAINER=ubuntu-18.04
     - RUN_ON_CONTAINER=ubuntu-latest
     - RUN_ON_CONTAINER=centos6
     - RUN_ON_CONTAINER=centos7
diff --git a/opal-ci/Dockerfile-ubuntu-18.04 b/opal-ci/Dockerfile-ubuntu-18.04
new file mode 100644
index 000000000000..e7ba238bba0c
--- /dev/null
+++ b/opal-ci/Dockerfile-ubuntu-18.04
@@ -0,0 +1,10 @@
+FROM ubuntu:18.04
+ENV DEBIAN_FRONTEND    noninteractive
+RUN apt-get update -qq
+RUN if [ `arch` != "ppc64le" ]; then apt-get install -y gcc-powerpc64le-linux-gnu; fi
+RUN 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 gcc-arm-linux-gnueabi clang qemu-system-ppc
+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-18.04.sh
diff --git a/opal-ci/build-ubuntu-18.04.sh b/opal-ci/build-ubuntu-18.04.sh
new file mode 100755
index 000000000000..95f7473e6ff4
--- /dev/null
+++ b/opal-ci/build-ubuntu-18.04.sh
@@ -0,0 +1,29 @@
+set -uo pipefail
+set -e
+set -vx
+MAKE_J=`grep -c processor /proc/cpuinfo`
+export CROSS="ccache powerpc64le-linux-gnu-"
+make -j${MAKE_J} all
+make -j${MAKE_J} check
+(make clean; cd external/gard && CROSS= make -j${MAKE_J})
+( cd external/pflash;
+  echo "Building for ARM..."
+  make clean && make distclean
+  CROSS_COMPILE=arm-linux-gnueabi-  make || { echo "ARM build failed"; exit 1; }
+(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
+make clean
+rm -rf builddir
+mkdir builddir
+make SRC=`pwd` -f ../Makefile -C builddir -j${MAKE_J}
+make clean

More information about the Skiboot mailing list