Skip to content

Commit 4edfbee

Browse files
committed
Switch Qt build to eglfs_kms and add Mesa/DRM dependencies
- enable -gbm/-kms during configure and drop the Vivante-specific packaging - extend the sysroot recipe with libdrm/libgbm/libegl Mesa headers/libs - require libegl1, libgbm1, libdrm2 at runtime and sanity-check eglfs_kms plugin
1 parent adf52ab commit 4edfbee

File tree

3 files changed

+9
-36
lines changed

3 files changed

+9
-36
lines changed

build.sh

Lines changed: 6 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,6 @@ build_sysroot()
5555

5656
multistrap -f "${TOOLS_DIR}/sysroot_multistrap.cfg" -d "${SYSROOT}"
5757

58-
# Inject Vivante proprietary headers and libraries when available so that
59-
# the Qt configure step can build the eglfs_viv backend.
60-
VIVANTE_DIR="${TOOLS_DIR}/vivante/${UM_ARCH}"
61-
if [ -d "${VIVANTE_DIR}" ]; then
62-
if [ -d "${VIVANTE_DIR}/lib" ]; then
63-
echo "Copying Vivante libraries into sysroot"
64-
mkdir -p "${SYSROOT}/usr/lib"
65-
cp -a "${VIVANTE_DIR}/lib/." "${SYSROOT}/usr/lib/"
66-
mkdir -p "${SYSROOT}/usr/lib/aarch64-linux-gnu"
67-
cp -a "${VIVANTE_DIR}/lib/." "${SYSROOT}/usr/lib/aarch64-linux-gnu/"
68-
fi
69-
if [ -d "${VIVANTE_DIR}/include" ]; then
70-
echo "Copying Vivante headers into sysroot"
71-
mkdir -p "${SYSROOT}/usr/include"
72-
cp -a "${VIVANTE_DIR}/include/." "${SYSROOT}/usr/include/"
73-
fi
74-
fi
75-
7658
# Fix up the symlinks in the sysroot, find all links that start with absolute paths
7759
# and replace them with relative paths inside the sysroot.
7860
cd "${SYSROOT}"
@@ -121,8 +103,8 @@ build()
121103
-opengl es2 \
122104
-xkbcommon \
123105
-openssl \
124-
-no-gbm \
125-
-no-kms \
106+
-gbm \
107+
-kms \
126108
-no-directfb \
127109
-nomake tests \
128110
-nomake tools \
@@ -170,19 +152,10 @@ build()
170152
make "${MAKEFLAGS}"
171153
make "${MAKEFLAGS}" install
172154

173-
# Ensure Vivante runtime libraries are packaged with Qt so the target
174-
# filesystem gets the complete GPU stack.
175-
VIVANTE_DIR="${TOOLS_DIR}/vivante/${UM_ARCH}"
176-
if [ -d "${VIVANTE_DIR}/lib" ]; then
177-
echo "Copying Vivante libraries into Qt package"
178-
mkdir -p "${TARGET_DIR}/qt/lib"
179-
cp -a "${VIVANTE_DIR}/lib/." "${TARGET_DIR}/qt/lib/"
180-
fi
181-
182-
# Sanity check: the eglfs Vivante device integration must be present after build.
183-
EGLFS_VIV_PLUGIN="${TARGET_DIR}/qt/plugins/egldeviceintegrations/libqeglfs_viv.so"
184-
if [ ! -f "${EGLFS_VIV_PLUGIN}" ]; then
185-
echo "ERROR: libqeglfs_viv.so not found in build output" >&2
155+
# Sanity check: the eglfs KMS device integration must be present after build.
156+
EGLFS_KMS_PLUGIN="${TARGET_DIR}/qt/plugins/egldeviceintegrations/libqeglfs-kms-integration.so"
157+
if [ ! -f "${EGLFS_KMS_PLUGIN}" ]; then
158+
echo "ERROR: libqeglfs-kms-integration.so not found in build output" >&2
186159
exit 1
187160
fi
188161

debian/control.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ Section: graphics
66
Priority: optional
77
Homepage: https://www.qt.io/
88
Description: Qt is a free and open-source widget toolkit for creating graphical user interfaces.
9-
Depends: libgles2,python3-sip,libxext6,libfontconfig1
9+
Depends: libegl1,libgbm1,libdrm2,libgles2,python3-sip,libxext6,libfontconfig1

tools/sysroot_multistrap.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ bootstrap=Debian DebianStable
1212
omitrequired=true
1313

1414
[DebianStable]
15-
packages=libgles-dev
15+
packages=libgles-dev
1616
packages=perl pkg-config debconf libxkbcommon-dev
1717
packages=python3-dev python3-sip-dev libssl-dev
18+
packages=libdrm-dev libgbm-dev libegl1-mesa-dev libgles2-mesa-dev
1819
source=http://ftp.debian.org/debian
1920
suite=bookworm
2021
components=main non-free
2122
omitdebsrc=true
22-

0 commit comments

Comments
 (0)