From 53484720ff954a3bb0835945c164c6113467c6fa Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Thu, 10 Nov 2022 08:04:06 -0700 Subject: qt6-layer: Add Qt6 support Copy the qt5-layer bbappends with the following modifications: - qtbase: Use eglfs for KMS backend for i.MX 8 with GPU on NXP BSP - qtbase: Drop build config patches no longer needed Testing is done using the quick3d and webengine examples. Signed-off-by: Tom Hochstein --- conf/layer.conf | 3 ++ .../qt6-layer/recipes-qt/qt6/qtbase_%.bbappend | 50 ++++++++++++++++++++++ .../qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend | 6 +++ 3 files changed, 59 insertions(+) create mode 100644 dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend create mode 100644 dynamic-layers/qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend diff --git a/conf/layer.conf b/conf/layer.conf index 5ff2839df..387460c12 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -54,6 +54,9 @@ BBFILES_DYNAMIC += " \ qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bb \ qt5-layer:${LAYERDIR}/dynamic-layers/qt5-layer/*/*/*.bbappend \ \ + qt6-layer:${LAYERDIR}/dynamic-layers/qt6-layer/*/*/*.bb \ + qt6-layer:${LAYERDIR}/dynamic-layers/qt6-layer/*/*/*.bbappend \ + \ virtualization-layer:${LAYERDIR}/dynamic-layers/virtualization-layer/*/*/*.bb \ virtualization-layer:${LAYERDIR}/dynamic-layers/virtualization-layer/*/*/*.bbappend \ " diff --git a/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend new file mode 100644 index 000000000..fe2cd9e30 --- /dev/null +++ b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend @@ -0,0 +1,50 @@ +# Copyright (C) 2013 Eric Bénard - Eukréa Electromatique +# Copyright (C) 2016 Freescale Semiconductor +# Copyright (C) 2016, 2017 O.S. Systems Software LTDA. +# Copyright (C) 2017-2018 NXP + +PACKAGECONFIG_GRAPHICS:imxpxp = " \ + gles2" +PACKAGECONFIG_GRAPHICS:imxgpu2d = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', ' gl', '', d)} \ + ${PACKAGECONFIG_GRAPHICS_IMX_GPU}" +PACKAGECONFIG_GRAPHICS:imxgpu3d = " \ + gles2 \ + ${PACKAGECONFIG_GRAPHICS_IMX_GPU}" +PACKAGECONFIG_GRAPHICS_IMX_GPU = "" +PACKAGECONFIG_GRAPHICS_IMX_GPU:mx8-nxp-bsp = " \ + gbm kms" + +PACKAGECONFIG_GRAPHICS:use-mainline-bsp ?= " \ + gles2 gbm kms" + +PACKAGECONFIG += " \ + ${PACKAGECONFIG_PLATFORM}" + +PACKAGECONFIG_PLATFORM = "" +PACKAGECONFIG_PLATFORM:imxgpu2d = " \ + no-opengl \ + linuxfb \ + ${PACKAGECONFIG_PLATFORM_EGLFS}" +PACKAGECONFIG_PLATFORM:imxgpu3d = " \ + ${PACKAGECONFIG_PLATFORM_EGLFS}" + +PACKAGECONFIG_PLATFORM_EGLFS = "" +PACKAGECONFIG_PLATFORM_EGLFS:imxgpu3d = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', \ + bb.utils.contains('DISTRO_FEATURES', 'wayland', '', \ + 'eglfs', d), d)}" +PACKAGECONFIG_PLATFORM_EGLFS:mx8-nxp-bsp = " \ + eglfs" + +PACKAGECONFIG_PLATFORM:use-mainline-bsp = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'eglfs', d)}" + +PACKAGECONFIG += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', '${PACKAGECONFIG_VULKAN}', '', d)}" +PACKAGECONFIG_VULKAN = "" +PACKAGECONFIG_VULKAN:imxgpu = " \ + ${PACKAGECONFIG_VULKAN_IMX_GPU}" +PACKAGECONFIG_VULKAN_IMX_GPU = "" +PACKAGECONFIG_VULKAN_IMX_GPU:mx8-nxp-bsp = "vulkan" +PACKAGECONFIG_VULKAN_IMX_GPU:mx8mm-nxp-bsp = "" diff --git a/dynamic-layers/qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend new file mode 100644 index 000000000..ca011758b --- /dev/null +++ b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtwayland_%.bbappend @@ -0,0 +1,6 @@ +# etnaviv mesa does not have glx +PACKAGECONFIG:remove:use-mainline-bsp = "xcomposite-glx" + +PACKAGECONFIG:remove:mx6-nxp-bsp = "xcomposite-egl xcomposite-glx" +PACKAGECONFIG:remove:mx7-nxp-bsp = "xcomposite-egl xcomposite-glx" +PACKAGECONFIG:remove:mx8-nxp-bsp = "xcomposite-egl xcomposite-glx" -- cgit v1.2.3-54-g00ecf From ff7b5099bcb7a5d723c1808c2c15e42b5ed030f7 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 2 Mar 2024 10:07:26 -0800 Subject: qtbase: Enable wayland knob when in distro features Mimic the behavior from recipe proper here since we override packageconfig defaults. With QT 6.7, qtbase built without wayland support is not sufficient to build rest of QT components e.g. qtwayland errors out during build/configure ERROR: Qt Wayland Client requires QtGui to be build with support for wayland Therefore add it when wayland is in distro features. Signed-off-by: Khem Raj --- dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend index fe2cd9e30..1c51fc09d 100644 --- a/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend +++ b/dynamic-layers/qt6-layer/recipes-qt/qt6/qtbase_%.bbappend @@ -40,6 +40,10 @@ PACKAGECONFIG_PLATFORM_EGLFS:mx8-nxp-bsp = " \ PACKAGECONFIG_PLATFORM:use-mainline-bsp = " \ ${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 'eglfs', d)}" +PACKAGECONFIG += " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '${PACKAGECONFIG_WAYLAND}', '', d)}" +PACKAGECONFIG_WAYLAND = "wayland" + PACKAGECONFIG += " \ ${@bb.utils.contains('DISTRO_FEATURES', 'vulkan', '${PACKAGECONFIG_VULKAN}', '', d)}" PACKAGECONFIG_VULKAN = "" -- cgit v1.2.3-54-g00ecf