diff options
Diffstat (limited to 'roms/skiboot/opal-ci')
23 files changed, 399 insertions, 0 deletions
diff --git a/roms/skiboot/opal-ci/Dockerfile-centos7 b/roms/skiboot/opal-ci/Dockerfile-centos7 new file mode 100644 index 000000000..93a0ede3d --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-centos7 @@ -0,0 +1,13 @@ +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 mbedtls-devel +RUN mkdir /opt/cross +RUN if [ `arch` = "x86_64" ]; then wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/x86_64-gcc-8.1.0-nolibc-powerpc64-linux.tar.xz; tar -C /opt/cross -xf x86_64-gcc-8.1.0-nolibc-powerpc64-linux.tar.xz; fi +RUN if [ `arch` = "ppc64le" ]; then wget https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/ppc64le/8.1.0/ppc64le-gcc-8.1.0-nolibc-powerpc64-linux.tar.xz; tar -C /opt/cross -xf ppc64le-gcc-8.1.0-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) +COPY . /build/ +WORKDIR /build diff --git a/roms/skiboot/opal-ci/Dockerfile-clang b/roms/skiboot/opal-ci/Dockerfile-clang new file mode 100644 index 000000000..02a0bf54e --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-clang @@ -0,0 +1,6 @@ +FROM ubuntu:rolling +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update -qq +RUN apt-get install -y clang device-tree-compiler +COPY . /build/ +WORKDIR /build diff --git a/roms/skiboot/opal-ci/Dockerfile-debian-stretch b/roms/skiboot/opal-ci/Dockerfile-debian-stretch new file mode 100644 index 000000000..9c2c15a20 --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-debian-stretch @@ -0,0 +1,9 @@ +FROM debian:stretch +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update -qq +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 libmbedtls-dev +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 diff --git a/roms/skiboot/opal-ci/Dockerfile-debian-unstable b/roms/skiboot/opal-ci/Dockerfile-debian-unstable new file mode 100644 index 000000000..eaf29a8c0 --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-debian-unstable @@ -0,0 +1,11 @@ +FROM debian:unstable +ENV DEBIAN_FRONTEND noninteractive +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-arm-linux-gnueabi || true +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 qemu-system-ppc opal-utils libmbedtls-dev +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 diff --git a/roms/skiboot/opal-ci/Dockerfile-docs b/roms/skiboot/opal-ci/Dockerfile-docs new file mode 120000 index 000000000..d8212b8f0 --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-docs @@ -0,0 +1 @@ +Dockerfile-fedora33
\ No newline at end of file diff --git a/roms/skiboot/opal-ci/Dockerfile-fedora-rawhide b/roms/skiboot/opal-ci/Dockerfile-fedora-rawhide new file mode 100644 index 000000000..0c9d23919 --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-fedora-rawhide @@ -0,0 +1,8 @@ +FROM fedora:rawhide +RUN dnf -y install wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl openssl-devel +RUN dnf -y install gcc-powerpc64-linux-gnu mbedtls-devel +# below packages are for building dtc +RUN dnf -y install flex bison +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 diff --git a/roms/skiboot/opal-ci/Dockerfile-fedora33 b/roms/skiboot/opal-ci/Dockerfile-fedora33 new file mode 100644 index 000000000..488b796c6 --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-fedora33 @@ -0,0 +1,10 @@ +FROM fedora:33 +RUN dnf -y update +RUN dnf -y install --allowerasing wget curl xterm gcc git xz make diffutils findutils expect valgrind valgrind-devel ccache dtc openssl openssl-devel gcc-powerpc64-linux-gnu mbedtls-devel +# for building documentation and the coverage report +RUN dnf -y install python-pip lcov +# below packages are for building dtc +RUN dnf -y install flex bison +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 diff --git a/roms/skiboot/opal-ci/Dockerfile-ubuntu-18.04 b/roms/skiboot/opal-ci/Dockerfile-ubuntu-18.04 new file mode 100644 index 000000000..82fa21c78 --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-ubuntu-18.04 @@ -0,0 +1,9 @@ +FROM ubuntu:18.04 +ENV DEBIAN_FRONTEND noninteractive +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-arm-linux-gnueabi || true +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 qemu-system-ppc libmbedtls-dev +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 diff --git a/roms/skiboot/opal-ci/Dockerfile-ubuntu-20.04 b/roms/skiboot/opal-ci/Dockerfile-ubuntu-20.04 new file mode 100644 index 000000000..43fd151d0 --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-ubuntu-20.04 @@ -0,0 +1,9 @@ +FROM ubuntu:20.04 +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update -qq +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-arm-linux-gnueabi || true +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 qemu-system-ppc libmbedtls-dev +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 diff --git a/roms/skiboot/opal-ci/Dockerfile-ubuntu-latest b/roms/skiboot/opal-ci/Dockerfile-ubuntu-latest new file mode 100644 index 000000000..b89fde535 --- /dev/null +++ b/roms/skiboot/opal-ci/Dockerfile-ubuntu-latest @@ -0,0 +1,9 @@ +FROM ubuntu:rolling +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update -qq +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 qemu-system-ppc libmbedtls-dev +RUN apt-get update -qq && apt-get install -y gcc-arm-linux-gnueabi || true +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 diff --git a/roms/skiboot/opal-ci/Makefile b/roms/skiboot/opal-ci/Makefile new file mode 100644 index 000000000..2f3b6f397 --- /dev/null +++ b/roms/skiboot/opal-ci/Makefile @@ -0,0 +1,86 @@ + +OP_BUILD_GIT?=git@github.com:open-power/op-build.git +BUILDROOT_GIT?=https://github.com/open-power/buildroot +DL_CACHE?=~/op-build/dl +SCRATCH?=/scratch/stewart/op-build/ + +all: op-build-images + +op-build-images: build-op-build-v1.0 build-op-build-v1.1 build-op-build-v1.2 build-op-build-v1.2.1 + +op-build: + git clone ${OP_BUILD_GIT} op-build + (cd op-build && git submodule init) + (cd op-build && git config submodule.buildroot.url ${BUILDROOT_GIT}) + (cd op-build && git submodule update --reference ${OP_BUILD_GIT}) + +op-build-v1.0: op-build + git clone -s op-build op-build-v1.0 + (cd op-build && git submodule init) + (cd op-build-v1.0 && git config submodule.buildroot.url ${BUILDROOT_GIT}) + (cd op-build-v1.0 && git checkout v1.0) + (cd op-build-v1.0 && git submodule update --recursive) + (cd op-build-v1.0 && cp -rl ${DL_CACHE}/* dl/) + rm -rf ${SCRATCH}/op-build-v1.0 && mkdir ${SCRATCH}/op-build-v1.0 + (rm -rf op-build-v1.0/output && ln -s ${SCRATCH}/op-build-v1.0 op-build-v1.0/output) + +op-build-v1.1: op-build + git clone -s op-build op-build-v1.1 + (cd op-build && git submodule init) + (cd op-build-v1.1 && git config submodule.buildroot.url ${BUILDROOT_GIT}) + (cd op-build-v1.1 && git checkout v1.1) + (cd op-build-v1.1 && git submodule update --recursive) + (cd op-build-v1.1 && cp -rl ${DL_CACHE}/* dl/) + rm -rf ${SCRATCH}/op-build-v1.1 && mkdir ${SCRATCH}/op-build-v1.1 + (rm -rf op-build-v1.1/output && ln -s ${SCRATCH}/op-build-v1.1 op-build-v1.1/output) + +op-build-v1.2: op-build + git clone -s op-build op-build-v1.2 + (cd op-build && git submodule init) + (cd op-build-v1.2 && git config submodule.buildroot.url ${BUILDROOT_GIT}) + (cd op-build-v1.2 && git checkout v1.2) + (cd op-build-v1.2 && git submodule update --recursive) + (cd op-build-v1.2 && cp -rl ${DL_CACHE}/* dl/) + rm -rf ${SCRATCH}/op-build-v1.2 && mkdir ${SCRATCH}/op-build-v1.2 + (rm -rf op-build-v1.2/output && ln -s ${SCRATCH}/op-build-v1.2 op-build-v1.2/output) + +op-build-v1.2.1: op-build + git clone -s op-build op-build-v1.2.1 + (cd op-build && git submodule init) + (cd op-build-v1.2.1 && git config submodule.buildroot.url ${BUILDROOT_GIT}) + (cd op-build-v1.2.1 && git checkout v1.2.1) + (cd op-build-v1.2.1 && git submodule update --recursive) + (cd op-build-v1.2.1 && cp -rl ${DL_CACHE}/* dl/) + rm -rf ${SCRATCH}/op-build-v1.2.1 && mkdir ${SCRATCH}/op-build-v1.2.1 + (rm -rf op-build-v1.2.1/output && ln -s ${SCRATCH}/op-build-v1.2.1 op-build-v1.2.1/output) + +build-op-build-v1.0: op-build-v1.0 + cd op-build-v1.0 && ../run-op-build-mambo.sh + +build-op-build-v1.1: op-build-v1.1 + cd op-build-v1.1 && ../run-op-build-mambo.sh + +build-op-build-v1.2: op-build-v1.2 + cd op-build-v1.2 && ../run-op-build-mambo.sh + +build-op-build-v1.2.1: op-build-v1.2.1 + cd op-build-v1.2.1 && ../run-op-build-mambo.sh + +images/op-build-v1.0: images-dir + cp -r op-build-v1.0/output/images images/op-build-v1.0 + +images/op-build-v1.1: images-dir + cp -r op-build-v1.1/output/images images/op-build-v1.1 + +images/op-build-v1.2: images-dir + cp -r op-build-v1.2/output/images images/op-build-v1.2 + +images/op-build-v1.2.1: images-dir + cp -r op-build-v1.2.1/output/images images/op-build-v1.2.1 + +images-dir: + mkdir images; + +.PHONY: images + +images: images/op-build-v1.0 images/op-build-v1.1 images/op-build-v1.2 images/op-build-v1.2.1 diff --git a/roms/skiboot/opal-ci/README b/roms/skiboot/opal-ci/README new file mode 100644 index 000000000..30bd45f9b --- /dev/null +++ b/roms/skiboot/opal-ci/README @@ -0,0 +1,36 @@ +OPAL-CI +------- + +Magic scripts for doing CI regression testing. + +Dockerfiles/build scripts for doing builds in Docker (focused on CI only, +used by Travis-ci - see .travis.yml) + + +building op-build for skiboot CI +-------------------------------- +Currently the makefile targets building op-build firmware (targeted at Mambo +simulator) for all current op-build releases. + +Since skiboot maintains compatibility, these binaries should *ALWAYS* boot +and work. + +The provided makefile to recreate the various zImage.epapr images should be +a good starting point. + +I run it like this: +cd opal-ci +export BUILDROOT_GIT=~/op-build/.git/modules/buildroot/ +export OP_BUILD_GIT=~/op-build/ +export DL_CACHE=~/op-build/dl +export SCRATCH=/scratch/stewart/op-build/ +make -j2 images + +DL_CACHE points to an existing op-build tree, so we don't have to download +all the source tarballs again + +SCRATCH is where all compilation will happen, must have >20GB free space + +BUILDROOT_GIT and OP_BUILD_GIT exist to prevent you having to clone from +github. + diff --git a/roms/skiboot/opal-ci/build-centos7.sh b/roms/skiboot/opal-ci/build-centos7.sh new file mode 100755 index 000000000..79b4c2e9b --- /dev/null +++ b/roms/skiboot/opal-ci/build-centos7.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -uo pipefail +set -e +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. +if [ $(arch) == "x86_64" ]; then + export CROSS=/opt/cross/gcc-8.1.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-8.1.0-nolibc/powerpc64-linux/bin/powerpc64-linux- +fi + +MAKE_J=$(grep -c processor /proc/cpuinfo) + +make -j${MAKE_J} all +make -j${MAKE_J} check +(make clean; cd external/gard && CROSS= make -j${MAKE_J}) +(cd external/pflash; make -j${MAKE_J}) +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 diff --git a/roms/skiboot/opal-ci/build-clang.sh b/roms/skiboot/opal-ci/build-clang.sh new file mode 100755 index 000000000..09377c06d --- /dev/null +++ b/roms/skiboot/opal-ci/build-clang.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +set -uo pipefail +set -e +set -vx + +MAKE_J=$(nproc) + +make -j${MAKE_J} CC=clang +make -j${MAKE_J} CC=clang check diff --git a/roms/skiboot/opal-ci/build-debian-unstable.sh b/roms/skiboot/opal-ci/build-debian-unstable.sh new file mode 120000 index 000000000..03f753ee2 --- /dev/null +++ b/roms/skiboot/opal-ci/build-debian-unstable.sh @@ -0,0 +1 @@ +build-ubuntu-latest.sh
\ No newline at end of file diff --git a/roms/skiboot/opal-ci/build-docs.sh b/roms/skiboot/opal-ci/build-docs.sh new file mode 100755 index 000000000..4125f33d1 --- /dev/null +++ b/roms/skiboot/opal-ci/build-docs.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -uo pipefail +set -e +set -vx + +MAKE_J=$(grep -c processor /proc/cpuinfo) +export CROSS="ccache powerpc64-linux-gnu-" + +make -j${MAKE_J} SKIBOOT_GCOV=1 coverage-report + +pip install -r doc/requirements.txt +(cd doc; make html) + +cp -r doc/ghpages-skeleton doc/_build/ghpages +mv coverage-report doc/_build/ghpages/ +mv doc/_build/html doc/_build/ghpages/doc diff --git a/roms/skiboot/opal-ci/build-fedora-rawhide.sh b/roms/skiboot/opal-ci/build-fedora-rawhide.sh new file mode 120000 index 000000000..dfeee1f1a --- /dev/null +++ b/roms/skiboot/opal-ci/build-fedora-rawhide.sh @@ -0,0 +1 @@ +build-fedora33.sh
\ No newline at end of file diff --git a/roms/skiboot/opal-ci/build-fedora33.sh b/roms/skiboot/opal-ci/build-fedora33.sh new file mode 100755 index 000000000..9042256d0 --- /dev/null +++ b/roms/skiboot/opal-ci/build-fedora33.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -uo pipefail +set -e +set -vx + +MAKE_J=$(grep -c processor /proc/cpuinfo) +export CROSS="ccache powerpc64-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; make -j${MAKE_J}) +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 diff --git a/roms/skiboot/opal-ci/build-qemu-powernv.sh b/roms/skiboot/opal-ci/build-qemu-powernv.sh new file mode 100755 index 000000000..cf96048a8 --- /dev/null +++ b/roms/skiboot/opal-ci/build-qemu-powernv.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -e +set -vx + +git clone --depth=1 -b powernv-6.0 git://github.com/open-power/qemu.git +cd qemu +git submodule update --init dtc +export CC="ccache gcc" +export CXX="ccache g++" +./configure --target-list=ppc64-softmmu --disable-werror +make -j $(grep -c processor /proc/cpuinfo) diff --git a/roms/skiboot/opal-ci/build-ubuntu-18.04.sh b/roms/skiboot/opal-ci/build-ubuntu-18.04.sh new file mode 100755 index 000000000..48eb825bf --- /dev/null +++ b/roms/skiboot/opal-ci/build-ubuntu-18.04.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +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}) +# 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 + +make clean +rm -rf builddir +mkdir builddir +make SRC=$(pwd) -f ../Makefile -C builddir -j${MAKE_J} +make clean diff --git a/roms/skiboot/opal-ci/build-ubuntu-20.04.sh b/roms/skiboot/opal-ci/build-ubuntu-20.04.sh new file mode 100755 index 000000000..48eb825bf --- /dev/null +++ b/roms/skiboot/opal-ci/build-ubuntu-20.04.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +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}) +# 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 + +make clean +rm -rf builddir +mkdir builddir +make SRC=$(pwd) -f ../Makefile -C builddir -j${MAKE_J} +make clean diff --git a/roms/skiboot/opal-ci/build-ubuntu-latest.sh b/roms/skiboot/opal-ci/build-ubuntu-latest.sh new file mode 100755 index 000000000..ea27bba32 --- /dev/null +++ b/roms/skiboot/opal-ci/build-ubuntu-latest.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +set -uo pipefail +set -e +set -vx + +MAKE_J=$(nproc) + +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) +# GCOV build disabled for GCC 8.2 +# https://github.com/open-power/skiboot/issues/206 +# 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 diff --git a/roms/skiboot/opal-ci/install-deps-qemu-powernv.sh b/roms/skiboot/opal-ci/install-deps-qemu-powernv.sh new file mode 100755 index 000000000..a18732db5 --- /dev/null +++ b/roms/skiboot/opal-ci/install-deps-qemu-powernv.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +sudo apt-get -y install eatmydata +sudo eatmydata apt-get -y install gcc python g++ pkg-config libz-dev \ + libglib2.0-dev libpixman-1-dev libfdt-dev git ninja-build g++ \ + libbz2-dev sparse libglib2.0-dev make ccache |