diff --git a/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/ccmp15/cursor.json b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/ccmp15/cursor.json new file mode 100644 index 000000000..17563c866 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/ccmp15/cursor.json @@ -0,0 +1,8 @@ +{ + "device": "/dev/dri/card0", + "outputs": [ + { "name": "HDMI1", "mode": "1280x720", "size": "1280x720" } + ], + "hwcursor": false +} + diff --git a/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/ccmp25/cursor.json b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/ccmp25/cursor.json new file mode 100644 index 000000000..6b729d1d3 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/ccmp25/cursor.json @@ -0,0 +1,8 @@ +{ + "device": "/dev/dri/card0", + "outputs": [ + { "name": "HDMI1", "mode": "1920x1080", "size": "1920x1080" } + ], + "hwcursor": false +} + diff --git a/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/qt-eglfs.sh b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/qt-eglfs.sh new file mode 100644 index 000000000..cb1c42d51 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/qt-eglfs.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +export QT_QPA_PLATFORM=eglfs + +# Use the KMS/DRM backend +export QT_QPA_EGLFS_INTEGRATION=eglfs_kms + +if [ -e /usr/share/qt6/cursor.json ]; then + export QT_QPA_EGLFS_KMS_CONFIG=/usr/share/qt6/cursor.json +fi + +# Force to keep the MODE SETTING set +export QT_QPA_EGLFS_ALWAYS_SET_MODE=1 + +# Force to use KMS ATOMIC +export QT_QPA_EGLFS_KMS_ATOMIC=1 + +# EGLFS environment variables accessible for qt 6.8 +# Documentation: https://doc.qt.io/qt-6/embedded-linux.html diff --git a/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/qt-wayland.sh b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/qt-wayland.sh new file mode 100644 index 000000000..91f62aa25 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase/qt-wayland.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +export QT_QPA_PLATFORM="wayland" diff --git a/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase_git.bbappend b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase_git.bbappend new file mode 100644 index 000000000..c18bf605f --- /dev/null +++ b/meta-digi-dey/dynamic-layers/qt6-layer/STM/recipes-qt/qt6/qtbase_git.bbappend @@ -0,0 +1,30 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +# Qt Flags for STM32MP25x - GLES3 support available +QT_CONFIG_FLAGS:remove:stm32mp2common = "-no-opengles3" +QT_CONFIG_FLAGS:append:stm32mp2common = " -opengles3" + +SRC_URI:append:class-target = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', \ + 'file://qt-wayland.sh', \ + 'file://qt-eglfs.sh \ + file://cursor.json ', d)} \ +" +do_install:append:class-target () { + install -d ${D}${sysconfdir}/profile.d/ + + if ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'true', 'false', d)}; then + # Wayland backend + install -m 0755 ${WORKDIR}/qt-wayland.sh ${D}${sysconfdir}/profile.d/qt.sh + else + # EGLFS backend + install -d ${D}${datadir}/qt6 + install -m 0755 ${WORKDIR}/qt-eglfs.sh ${D}/${sysconfdir}/profile.d/qt.sh + install -m 0664 ${WORKDIR}/cursor.json ${D}${datadir}/qt6/ + fi +} + +FILES:${PN}:append:class-target = " \ + ${sysconfdir}/profile.d/qt.sh \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '', '${datadir}/qt6', d)} \ +" diff --git a/meta-digi-dey/dynamic-layers/qt6-layer/recipes-qt/packagegroups/packagegroup-qt6-dey.bb b/meta-digi-dey/dynamic-layers/qt6-layer/recipes-qt/packagegroups/packagegroup-qt6-dey.bb index 54fe9ea18..8c6b80cc7 100644 --- a/meta-digi-dey/dynamic-layers/qt6-layer/recipes-qt/packagegroups/packagegroup-qt6-dey.bb +++ b/meta-digi-dey/dynamic-layers/qt6-layer/recipes-qt/packagegroups/packagegroup-qt6-dey.bb @@ -24,6 +24,7 @@ QT6_IMAGE_INSTALL_CINEMATICEXPERIENCE = "" QT6_IMAGE_INSTALL_CINEMATICEXPERIENCE:imxgpu = "cinematicexperience-rhi cinematicexperience-rhi-tools" QT6_IMAGE_INSTALL_CINEMATICEXPERIENCE:ccimx93 = "cinematicexperience-rhi cinematicexperience-rhi-tools" QT6_IMAGE_INSTALL_CINEMATICEXPERIENCE:ccmp15 = "cinematicexperience-rhi cinematicexperience-rhi-tools" +QT6_IMAGE_INSTALL_CINEMATICEXPERIENCE:ccmp25 = "cinematicexperience-rhi cinematicexperience-rhi-tools" QT6_IMAGE_INSTALL_EXAMPLES = "qtbase-examples qtdeclarative-examples"