Cross-compiling Qt 6.6.0 with EGLFS, mali not detected
-
I am cross compiling Qt with Buildroot and GCC on Ubuntu for an Allwinner H618 with a "integrated Mali G31 MP2" GPU target.
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF
-DQT_HOST_PATH=/foo/host/
-DCMAKE_STAGING_PREFIX=/foo/target
-DCMAKE_INSTALL_PREFIX=/usr/local/qt6
-DCMAKE_TOOLCHAIN_FILE=/foo/toolchain.cmake
-DQT_QMAKE_TARGET_MKSPEC=devices/linux-orangepi-zero2w-aarch64
/foo/qt6I would like to use eglfs platform plugin but i am confused about the list of associated backends available.
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... yes
EGLFS GBM ............................ yes
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ yesMy device has a Mali GPU, yet the configure report above says:
EGLFS Mali ........................... no. Shouldn't it perhaps say 'yes' instead? Or is EGLFS GBM fine? On the device I do seem to have/usr/lib/aarch64-linux-gnu/libgbm.soavailable.My mkspec for this device (
/foo/qt6/qtbase/mkspecs/devices/linux-orangepi-zero2w-aarch64/qmake.conf):DISTRO_OPTS += deb-multi-arch include(../common/linux_device_pre.conf) QMAKE_LIBS_EGL += -lEGL QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL QMAKE_CFLAGS += -march=armv8-a -mtune=cortex-a53 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS EGLFS_DEVICE_INTEGRATION = eglfs_mali LINKER_FLAGS += -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed include(../common/linux_device_post.conf) load(qt_config)Should this then be changed to
EGLFS_DEVICE_INTEGRATION = eglfs_gbmtoo? -
I am cross compiling Qt with Buildroot and GCC on Ubuntu for an Allwinner H618 with a "integrated Mali G31 MP2" GPU target.
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF
-DQT_HOST_PATH=/foo/host/
-DCMAKE_STAGING_PREFIX=/foo/target
-DCMAKE_INSTALL_PREFIX=/usr/local/qt6
-DCMAKE_TOOLCHAIN_FILE=/foo/toolchain.cmake
-DQT_QMAKE_TARGET_MKSPEC=devices/linux-orangepi-zero2w-aarch64
/foo/qt6I would like to use eglfs platform plugin but i am confused about the list of associated backends available.
QPA backends:
DirectFB ............................... no
EGLFS .................................. yes
EGLFS details:
EGLFS OpenWFD ........................ no
EGLFS i.Mx6 .......................... no
EGLFS i.Mx6 Wayland .................. no
EGLFS RCAR ........................... no
EGLFS EGLDevice ...................... yes
EGLFS GBM ............................ yes
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no
EGLFS X11 ............................ yesMy device has a Mali GPU, yet the configure report above says:
EGLFS Mali ........................... no. Shouldn't it perhaps say 'yes' instead? Or is EGLFS GBM fine? On the device I do seem to have/usr/lib/aarch64-linux-gnu/libgbm.soavailable.My mkspec for this device (
/foo/qt6/qtbase/mkspecs/devices/linux-orangepi-zero2w-aarch64/qmake.conf):DISTRO_OPTS += deb-multi-arch include(../common/linux_device_pre.conf) QMAKE_LIBS_EGL += -lEGL QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lEGL QMAKE_CFLAGS += -march=armv8-a -mtune=cortex-a53 QMAKE_CXXFLAGS += $$QMAKE_CFLAGS EGLFS_DEVICE_INTEGRATION = eglfs_mali LINKER_FLAGS += -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed include(../common/linux_device_post.conf) load(qt_config)Should this then be changed to
EGLFS_DEVICE_INTEGRATION = eglfs_gbmtoo?@RobertB said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:
On the device I do seem to have /usr/lib/aarch64-linux-gnu/libgbm.so available
You need all needed headers and libs on your build machine...
-
@RobertB said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:
On the device I do seem to have /usr/lib/aarch64-linux-gnu/libgbm.so available
You need all needed headers and libs on your build machine...
@jsulm Yes, I have a proper sysroot setup on my host machine with all the relevant libraries/headers from the device, and my toolchain reflects that.
I am using the following GPU driver:
/lib/modules/6.1.31-sun50iw9/kernel/drivers/gpu/drm/panfrost/panfrost.kopanfrost has support for Mali G31 so that should be fine.
So I am wondering why Qt reports that Mali EGLFS is not used.
-
@jsulm Yes, I have a proper sysroot setup on my host machine with all the relevant libraries/headers from the device, and my toolchain reflects that.
I am using the following GPU driver:
/lib/modules/6.1.31-sun50iw9/kernel/drivers/gpu/drm/panfrost/panfrost.kopanfrost has support for Mali G31 so that should be fine.
So I am wondering why Qt reports that Mali EGLFS is not used.
@RobertB said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:
So I am wondering why Qt reports that Mali EGLFS is not used.
Because it can't build the Mali test application.
The error message you posted say that the type is unknown, so I guess header files for Mali support are missing. The lib alone is not enough, you also need header files (usually you need to install dev package to get them). -
@RobertB said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:
So I am wondering why Qt reports that Mali EGLFS is not used.
Because it can't build the Mali test application.
The error message you posted say that the type is unknown, so I guess header files for Mali support are missing. The lib alone is not enough, you also need header files (usually you need to install dev package to get them).@jsulm said in Cross-compiling Qt 6.6.0 with EGLFS, mali not detected:
Because it can't build the Mali test application.
Indeed. I took that test from qtbase.
So, seeing as I am using these Mesa panfrost drivers (and not actual Mali drivers) I am guessing this is enough to have 3d acceleration?:
QPA backends: DirectFB ............................... no EGLFS .................................. yes EGLFS details: EGLFS OpenWFD ........................ no EGLFS i.Mx6 .......................... no EGLFS i.Mx6 Wayland .................. no EGLFS RCAR ........................... no EGLFS EGLDevice ...................... yes EGLFS GBM ............................ yes EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no EGLFS X11 ............................ yesMy only question remains is what to do with the mkspec file; currently I have:
EGLFS_DEVICE_INTEGRATION = eglfs_maliBut I suppose that should be changed to something else. Some info here
Do you have a hint as to what to pick? Possible candidates:
$ grep -r 'EGLFS_DEVICE_INTEGRATION' . ./qtbase/mkspecs/integrity-armv7-imx6/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_viv ./qtbase/mkspecs/integrity-armv8-rcar/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_rcar ./qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_viv ./qtbase/mkspecs/devices/linux-orangepi-zero2w-aarch64/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_mali ./qtbase/mkspecs/devices/integrity-armv8-SA8155P/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_openwfd ./qtbase/mkspecs/devices/linux-imx8-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_viv ./qtbase/mkspecs/devices/linux-rcar-h2-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms ./qtbase/mkspecs/devices/integrity-armv8-drive-cx/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice ./qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_brcm ./qtbase/mkspecs/devices/linux-tinkerboard-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms ./qtbase/mkspecs/devices/linux-rasp-pi3-vc4-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms ./qtbase/mkspecs/devices/linux-jetson-tk1-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice ./qtbase/mkspecs/devices/linux-jetson-tk1-pro-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice ./qtbase/mkspecs/devices/linux-nuc-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms ./qtbase/mkspecs/devices/linux-beagleboard-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = none ./qtbase/mkspecs/devices/linux-jetson-tx1-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_x11 ./qtbase/mkspecs/devices/integrity-armv8-msm8996au/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_openwfd ./qtbase/mkspecs/devices/linux-arm-hisilicon-hix5hd2-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_mali ./qtbase/mkspecs/devices/linux-drive-cx-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms_egldevice ./qtbase/mkspecs/devices/linux-emu-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_emu ./qtbase/mkspecs/devices/linux-rasp-pi2-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_brcm ./qtbase/mkspecs/devices/linux-odroid-xu3-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_mali ./qtbase/mkspecs/devices/linux-rcar-m3-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms ./qtbase/mkspecs/devices/linux-rasp-pi4-aarch64/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms ./qtbase/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION= eglfs_brcm ./qtbase/mkspecs/devices/linux-rasp-pi4-v3d-g++/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_kms ./qtbase/mkspecs/devices/freebsd-rasp-pi-clang/qmake.conf:EGLFS_DEVICE_INTEGRATION = eglfs_brcm -
R RobertB has marked this topic as solved on
