gitlab CI: add libdrm with freedreno, nouveau, omap

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2024-06-07 15:58:48 +02:00
parent 104328dffb
commit 78d31be5c6
4 changed files with 127 additions and 9 deletions

View File

@@ -80,8 +80,9 @@ do_clone https://gitlab.freedesktop.org/xorg/proto/xorgproto.git xorgproto-2024.
build_autoconf xorgproto
# Xwayland requires drm 2.4.116 for drmSyncobjEventfd
# xf86-video-freedreno and xf86-video-omap need extra features
echo "Installing libdrm"
do_clone https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.116
build_meson drm
build_meson drm -Dfreedreno=enabled -Dnouveau=enabled -Domap=enabled
rm -Rf /tmp/build-deps

View File

@@ -30,10 +30,6 @@ do_clone() {
git clone "$1" --depth 1 --branch="$2"
}
gpart recover ada0
gpart resize -i 4 ada0
growfs /
cp .gitlab-ci/common/freebsd/FreeBSD.conf /etc/pkg
pkg upgrade -f -y
@@ -48,4 +44,16 @@ pkg install -y \
[ -f /bin/bash ] || ln -sf /usr/local/bin/bash /bin/bash
# Xwayland requires drm 2.4.116 for drmSyncobjEventfd
# xf86-video-freedreno and xf86-video-omap need extra features
echo "Installing libdrm"
do_clone https://gitlab.freedesktop.org/mesa/drm libdrm-2.4.116
(
cd drm
git config user.email "buildbot@freebsd"
git config user.name "FreeBSD build bot"
git am ../.gitlab-ci/common/freebsd/libdrm-2.4.116.patch
)
build_meson drm -Dfreedreno=enabled -Dnouveau=enabled -Domap=enabled
echo "=== post-install script END"

View File

@@ -0,0 +1,109 @@
From a87432dbb281ddf1c50a5e78091d38f0dac79416 Mon Sep 17 00:00:00 2001
From: "Enrico Weigelt, metux IT consult" <info@metux.net>
Date: Fri, 7 Jun 2024 15:18:47 +0200
Subject: [PATCH 1/2] fix FTBS on FreeBSD (or non-Linux in general)
Several drivers still including <linux/stddef.h>, but not using anything
from it, thus breaking build on non-Linux platforms (eg. FreeBSD).
Since not needed at all, just stop including it.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
etnaviv/etnaviv_device.c | 1 -
exynos/exynos_drm.c | 1 -
exynos/exynos_fimg2d.c | 1 -
omap/omap_drm.c | 1 -
tests/exynos/exynos_fimg2d_test.c | 1 -
5 files changed, 5 deletions(-)
diff --git a/etnaviv/etnaviv_device.c b/etnaviv/etnaviv_device.c
index 699df256..a63bd15d 100644
--- a/etnaviv/etnaviv_device.c
+++ b/etnaviv/etnaviv_device.c
@@ -25,7 +25,6 @@
*/
#include <stdlib.h>
-#include <linux/stddef.h>
#include <linux/types.h>
#include <errno.h>
#include <sys/mman.h>
diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c
index 3e322a17..fb4cd8de 100644
--- a/exynos/exynos_drm.c
+++ b/exynos/exynos_drm.c
@@ -31,7 +31,6 @@
#include <unistd.h>
#include <sys/mman.h>
-#include <linux/stddef.h>
#include <xf86drm.h>
diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index ac6fa687..f0aee962 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -30,7 +30,6 @@
#include <assert.h>
#include <sys/mman.h>
-#include <linux/stddef.h>
#include <xf86drm.h>
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index aa273660..42d35ef7 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -27,7 +27,6 @@
*/
#include <stdlib.h>
-#include <linux/stddef.h>
#include <linux/types.h>
#include <errno.h>
#include <sys/mman.h>
diff --git a/tests/exynos/exynos_fimg2d_test.c b/tests/exynos/exynos_fimg2d_test.c
index d85e2f6b..b1baa503 100644
--- a/tests/exynos/exynos_fimg2d_test.c
+++ b/tests/exynos/exynos_fimg2d_test.c
@@ -31,7 +31,6 @@
#include <unistd.h>
#include <sys/mman.h>
-#include <linux/stddef.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
--
2.39.2
From 79123db12c6c5f42747fae02068b482055e8c376 Mon Sep 17 00:00:00 2001
From: "Enrico Weigelt, metux IT consult" <info@metux.net>
Date: Fri, 7 Jun 2024 15:43:13 +0200
Subject: [PATCH 2/2] omap: fix FTBS on FreeBSD and drop unneeded include
No need to explicitly include <linux/types.h>, since drm.h already does that,
but conditionally only Linux only.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
---
omap/omap_drm.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/omap/omap_drm.c b/omap/omap_drm.c
index 42d35ef7..93d2207f 100644
--- a/omap/omap_drm.c
+++ b/omap/omap_drm.c
@@ -27,7 +27,6 @@
*/
#include <stdlib.h>
-#include <linux/types.h>
#include <errno.h>
#include <sys/mman.h>
#include <fcntl.h>
--
2.39.2

View File

@@ -1,11 +1,11 @@
# version 0.1.17
# version 0.1.19
variables:
DEBIAN_VERSION: 'bullseye-slim'
DEBIAN_TAG: "2024-06-06.05"
DEBIAN_TAG: "2024-06-06.09"
DEBIAN_EXEC: 'bash .gitlab-ci/common/debian/image-install.sh'
DEBIAN_SKIP: "false" # to enable, it has to be litterally "true"
FREEBSD_TAG: '2024-06-06.03'
FREEBSD_TAG: '2024-06-06.06'
FREEBSD_VERSION: '14.0'
# image is yet too small for that - need a more complicated way :(
# FREEBSD_EXEC: "bash .gitlab-ci/common/freebsd/image-install.sh"
@@ -195,7 +195,7 @@ image@freebsd:
- truncate -s +5G /app/image.raw
- /app/vmctl start
- set +e
- /app/vmctl exec "gpart recover /dev/ada0 && gpart resize -i4 /dev/ada0 && growfs -y /"
- /app/vmctl exec "service growfs onestart"
- scp -r $PWD "vm:"
- /app/vmctl exec "cd $CI_PROJECT_NAME && .gitlab-ci/common/freebsd/image-install.sh"
- /app/vmctl exec "cd $CI_PROJECT_NAME && .gitlab-ci/common/build-driver.sh freebsd $XSERVER_REF" && touch .success