diff options
author | Tomeu Vizoso <[email protected]> | 2020-04-01 13:07:46 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-07 11:52:30 +0000 |
commit | dcd171f5e9bd612b33144c90e4b0c1ac919498f0 (patch) | |
tree | 266e0bbc66ef997799249f4663be29f5c84a6853 /.gitlab-ci/container | |
parent | bf3d4b1adde4c354ac31e2d7a679dc3946f4abc2 (diff) |
gitlab-ci: More stable URL for kernel and ramdisk artifacts, for LAVA
Place the kernel and ramdisk into a place in the file server so the URL
will only change when the contents also change.
Also put the Mesa build into a separate tarball so the ramdisk's
contents don't change every build.
With proper caching in place, all devices in the same farm need only to
download the mesa tarball once, saving time.
As we switch to MinIO for making kernels and rootfs available to LAVA
devices, we can stop using Docker to distribute them.
Instead, build when needed in separate jobs that push directly to MinIO,
from where LAVA devices can download them.
Signed-off-by: Tomeu Vizoso <[email protected]>
Acked-by: Daniel Stone <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5515>
Diffstat (limited to '.gitlab-ci/container')
-rw-r--r-- | .gitlab-ci/container/arm_build.sh | 55 | ||||
-rw-r--r-- | .gitlab-ci/container/cross_build.sh | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | .gitlab-ci/container/lava_arm.sh | 115 |
3 files changed, 84 insertions, 97 deletions
diff --git a/.gitlab-ci/container/arm_build.sh b/.gitlab-ci/container/arm_build.sh index 3c003e509f6..dd0be655d9e 100644 --- a/.gitlab-ci/container/arm_build.sh +++ b/.gitlab-ci/container/arm_build.sh @@ -3,11 +3,9 @@ set -e set -o xtrace -############### Install packages for building apt-get -y install ca-certificates sed -i -e 's/http:\/\/deb/https:\/\/deb/g' /etc/apt/sources.list echo 'deb https://deb.debian.org/debian buster-backports main' >/etc/apt/sources.list.d/backports.list -dpkg --add-architecture armhf apt-get update apt-get -y install \ abootimg \ @@ -19,60 +17,34 @@ apt-get -y install \ ccache \ cmake \ cpio \ - crossbuild-essential-armhf \ debootstrap \ fastboot \ flex \ g++ \ git \ lavacli \ - libboost-dev:armhf \ - libboost-dev \ - libdrm-dev:armhf \ libdrm-dev \ - libegl1-mesa-dev \ - libegl1-mesa-dev:armhf \ libelf-dev \ - libelf-dev:armhf \ libexpat1-dev \ - libexpat1-dev:armhf \ - libgbm-dev \ - libgbm-dev:armhf \ - libgles2-mesa-dev \ - libgles2-mesa-dev:armhf \ - libpcre3-dev \ - libpcre3-dev:armhf \ - libpng-dev \ - libpng-dev:armhf \ - libpython3-dev \ - libpython3-dev:armhf \ - libssl-dev \ - libvulkan-dev \ - libvulkan-dev \ - libvulkan-dev:armhf \ - libxcb-keysyms1-dev \ - libxcb-keysyms1-dev:armhf \ - llvm-7-dev:armhf \ llvm-8-dev \ pkg-config \ python \ - python3-dev \ - python3-distutils \ - python3-setuptools \ python3-mako \ - python3-serial \ - qt5-default \ - qt5-qmake \ - qtbase5-dev \ - qtbase5-dev:armhf \ + python3-pip \ + python3-setuptools \ unzip \ wget \ xz-utils \ zlib1g-dev +pip3 install git+http://gitlab.freedesktop.org/freedesktop/ci-templates@6f5af7e5574509726c79109e3c147cee95e81366 + apt install -y --no-remove -t buster-backports \ meson +arch=armhf +. .gitlab-ci/container/cross_build.sh + . .gitlab-ci/container/container_pre_build.sh # dependencies where we want a specific version @@ -83,17 +55,4 @@ tar -xvf $LIBDRM_VERSION.tar.bz2 && rm $LIBDRM_VERSION.tar.bz2 cd $LIBDRM_VERSION; meson build -D vc4=true -D freedreno=true -D etnaviv=true; ninja -C build install; cd .. rm -rf $LIBDRM_VERSION -############### Generate cross build file for Meson - -. .gitlab-ci/create-cross-file.sh armhf - -############### Generate kernel, ramdisk, test suites, etc for LAVA jobs -KERNEL_URL="https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.5-panfrost-fixes/linux-v5.5-panfrost-fixes.tar.gz" - -DEBIAN_ARCH=arm64 . .gitlab-ci/container/lava_arm.sh -DEBIAN_ARCH=armhf . .gitlab-ci/container/lava_arm.sh - -apt-get purge -y \ - wget - . .gitlab-ci/container/container_post_build.sh diff --git a/.gitlab-ci/container/cross_build.sh b/.gitlab-ci/container/cross_build.sh index 58f449f7cf5..bfbac4f520b 100644 --- a/.gitlab-ci/container/cross_build.sh +++ b/.gitlab-ci/container/cross_build.sh @@ -7,8 +7,7 @@ export DEBIAN_FRONTEND=noninteractive # Ephemeral packages (installed for this script and removed again at the end) STABLE_EPHEMERAL=" \ - libpciaccess-dev:$arch \ - wget \ + libpciaccess-dev:$arch " dpkg --add-architecture $arch @@ -23,8 +22,14 @@ apt-get install -y --no-remove \ libstdc++6:$arch \ libtinfo-dev:$arch +if [[ $arch == "armhf" ]]; then + LLVM=llvm-7-dev +else + LLVM=llvm-8-dev +fi + apt-get install -y --no-remove -t buster-backports \ - llvm-8-dev:$arch + $LLVM:$arch . .gitlab-ci/create-cross-file.sh $arch diff --git a/.gitlab-ci/container/lava_arm.sh b/.gitlab-ci/container/lava_arm.sh index e5da199abc8..ec3bf52b9f4 100644..100755 --- a/.gitlab-ci/container/lava_arm.sh +++ b/.gitlab-ci/container/lava_arm.sh @@ -3,6 +3,15 @@ set -e set -o xtrace +# If remote files are up-to-date, skip rebuilding them +MINIO_PATH=minio-packet.freedesktop.org/mesa-lava/${CI_PROJECT_PATH}/${DISTRIBUTION_TAG}/${DEBIAN_ARCH} +DONE_FILE=https://${MINIO_PATH}/done +if wget -q --method=HEAD ${DONE_FILE}; then + exit +fi + +. .gitlab-ci/container/container_pre_build.sh + if [[ "$DEBIAN_ARCH" = "arm64" ]]; then GCC_ARCH="aarch64-linux-gnu" KERNEL_ARCH="arm64" @@ -15,6 +24,7 @@ else DEFCONFIG="arch/arm/configs/multi_v7_defconfig" DEVICE_TREES="arch/arm/boot/dts/rk3288-veyron-jaq.dtb arch/arm/boot/dts/sun8i-h3-libretech-all-h3-cc.dtb" KERNEL_IMAGE_NAME="zImage" + . .gitlab-ci/create-cross-file.sh armhf fi # Determine if we're in a cross build. @@ -26,6 +36,46 @@ if [[ -e /cross_file-$DEBIAN_ARCH.txt ]]; then export CROSS_COMPILE="${GCC_ARCH}-" fi +apt-get update +apt-get install -y automake \ + git \ + bc \ + cmake \ + cpio \ + wget \ + debootstrap \ + libboost-dev \ + libegl1-mesa-dev \ + libgbm-dev \ + libgles2-mesa-dev \ + libpcre3-dev \ + libpng-dev \ + libpython3-dev \ + libssl-dev \ + libvulkan-dev \ + libxcb-keysyms1-dev \ + python3-dev \ + python3-distutils \ + python3-serial \ + qt5-default \ + qt5-qmake \ + qtbase5-dev + + +if [[ "$DEBIAN_ARCH" = "armhf" ]]; then + apt-get install -y libboost-dev:armhf \ + libegl1-mesa-dev:armhf \ + libelf-dev:armhf \ + libgbm-dev:armhf \ + libgles2-mesa-dev:armhf \ + libpcre3-dev:armhf \ + libpng-dev:armhf \ + libpython3-dev:armhf \ + libvulkan-dev:armhf \ + libxcb-keysyms1-dev:armhf \ + qtbase5-dev:armhf +fi + ############### Build dEQP runner . .gitlab-ci/build-cts-runner.sh mkdir -p /lava-files/rootfs-${DEBIAN_ARCH}/usr/bin @@ -63,6 +113,7 @@ rm -rf /renderdoc ############### Cross-build kernel +KERNEL_URL="https://gitlab.freedesktop.org/tomeu/linux/-/archive/v5.5-panfrost-fixes/linux-v5.5-panfrost-fixes.tar.gz" mkdir -p kernel wget -qO- ${KERNEL_URL} | tar -xz --strip-components=1 -C kernel pushd kernel @@ -73,19 +124,6 @@ for image in ${KERNEL_IMAGE_NAME}; do done cp ${DEVICE_TREES} /lava-files/. - -if [[ ${DEBIAN_ARCH} = "arm64" ]] && which mkimage > /dev/null; then - make Image.lzma - mkimage \ - -f auto \ - -A arm \ - -O linux \ - -d arch/arm64/boot/Image.lzma \ - -C lzma\ - -b arch/arm64/boot/dts/qcom/sdm845-cheza-r3.dtb \ - /lava-files/cheza-kernel -fi - popd rm -rf kernel @@ -105,37 +143,22 @@ set -e cp .gitlab-ci/create-rootfs.sh /lava-files/rootfs-${DEBIAN_ARCH}/. chroot /lava-files/rootfs-${DEBIAN_ARCH} sh /create-rootfs.sh rm /lava-files/rootfs-${DEBIAN_ARCH}/create-rootfs.sh +pushd /lava-files/rootfs-${DEBIAN_ARCH} + find -H | cpio -H newc -o | gzip -c - > /lava-files/lava-rootfs.cpio.gz +popd +rm -rf /lava-files/rootfs-${DEBIAN_ARCH} + +ls -lh /lava-files/ + +. .gitlab-ci/container/container_post_build.sh + +############### Upload the files! +ci-fairy minio login $CI_JOB_JWT +for f in $(ls /lava-files/); do + ci-fairy minio cp /lava-files/$f \ + minio://${MINIO_PATH}/$f +done + +touch /lava-files/done +ci-fairy minio cp /lava-files/done minio://${MINIO_PATH}/done -if [ ${DEBIAN_ARCH} = arm64 ]; then - # Pull down a specific build of qcomlt/release/qcomlt-5.4 8c79b3d12355 - # ("Merge tag 'v5.4.23' into release/qcomlt-5.4"), where I used the - # .config from - # http://snapshots.linaro.org/96boards/dragonboard820c/linaro/debian/457/config-5.4.0-qcomlt-arm64 - # with the following merged in: - # - # CONFIG_DRM=y - # CONFIG_DRM_MSM=y - # CONFIG_ATL1C=y - # - # Reason: 5.5 has a big stack of oopses and warns on db820c. 4.14-5.4 - # linaro kernel binaries (see above .config link) have these as modules - # and distributed the modules only in the debian system, not the initrd, - # so they're very hard to extract (involving simg2img and loopback - # mounting). 4.11 is missing d72fea538fe6 ("drm/msm: Fix the check for - # the command size") so it can't actually run fredreno. qcomlt-4.14 is - # unstable at boot (~10% instaboot rate). The 5.4 qcomlt kernel with msm - # built in seems like the easiest way to go. - wget https://people.freedesktop.org/~anholt/qcomlt-5.4-msm-build/Image.gz -O Image.gz \ - -O /lava-files/db820c-kernel - wget https://people.freedesktop.org/~anholt/qcomlt-5.4-msm-build/apq8096-db820c.dtb \ - -O /lava-files/db820c.dtb - - # Make a gzipped copy of the Image for db410c. - gzip -k /lava-files/Image - - # Add missing a630 firmware, added to debian packge in apr 2020 - wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qcom/a630_gmu.bin \ - -O /lava-files/rootfs-arm64/lib/firmware/qcom/a630_gmu.bin - wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qcom/a630_sqe.fw \ - -O /lava-files/rootfs-arm64/lib/firmware/qcom/a630_sqe.fw -fi |