From fb655dd021c6ccb38211a1e019d03290be1f5e80 Mon Sep 17 00:00:00 2001 From: Javier Viguera Date: Tue, 6 May 2025 15:24:51 +0200 Subject: [PATCH] meta-digi: xwayland: use poky's xwayland 23.2.5 recipe That includes several CVE patches not present of meta-freescale's 23.2.5.imx recipe (which is based in exactly the same revision). Similar change was done in NXP's meta-imx (see commit 99ceb057fcfdc8151c1488089d5f22363dfdb6d7). Signed-off-by: Javier Viguera --- .../conf/machine/include/imx-digi-base.inc | 2 -- ...-create-GLES2-context-for-glamor-EGL.patch | 31 +++++++++++++++++++ .../xwayland/xwayland_23.2.5.bbappend | 18 +++++++++++ 3 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch create mode 100644 meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/xwayland/xwayland_23.2.5.bbappend diff --git a/meta-digi-arm/conf/machine/include/imx-digi-base.inc b/meta-digi-arm/conf/machine/include/imx-digi-base.inc index 2824b8fa2..5c815ef9f 100644 --- a/meta-digi-arm/conf/machine/include/imx-digi-base.inc +++ b/meta-digi-arm/conf/machine/include/imx-digi-base.inc @@ -297,8 +297,6 @@ PREFERRED_VERSION_weston:imx-mainline-bsp = "" PREFERRED_VERSION_wayland-protocols:imx-nxp-bsp ??= "1.32.imx" -PREFERRED_VERSION_xwayland:imx-nxp-bsp ??= "23.2.5.imx" - # Use i.MX libdrm Version PREFERRED_VERSION_libdrm:imx-nxp-bsp ??= "2.4.116.imx" diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch new file mode 100644 index 000000000..c1e8ae11a --- /dev/null +++ b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/xwayland/xwayland/0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch @@ -0,0 +1,31 @@ +From e75a4d7b4474529967490de6e75ae4f1b7128937 Mon Sep 17 00:00:00 2001 +From: Xianzhong +Date: Sat, 22 Jan 2022 17:57:59 +0800 +Subject: [PATCH 1/3] Prefer to create GLES2 context for glamor EGL + +created the initial patch for xwayland-21.1.2 + +Upstream-Status: Inappropriate [embedded specific] +Signed-off-by: Xianzhong +--- + hw/xwayland/xwayland-glamor-gbm.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c +index 12d820e44..8a89919be 100644 +--- a/hw/xwayland/xwayland-glamor-gbm.c ++++ b/hw/xwayland/xwayland-glamor-gbm.c +@@ -866,8 +866,8 @@ xwl_glamor_gbm_init_egl(struct xwl_screen *xwl_screen) + goto error; + } + +- if (!xwl_glamor_try_big_gl_api(xwl_screen) && +- !xwl_glamor_try_gles_api(xwl_screen)) { ++ if (!xwl_glamor_try_gles_api(xwl_screen) && ++ !xwl_glamor_try_big_gl_api(xwl_screen)) { + ErrorF("Cannot use neither GL nor GLES2\n"); + goto error; + } +-- +2.17.1 + diff --git a/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/xwayland/xwayland_23.2.5.bbappend b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/xwayland/xwayland_23.2.5.bbappend new file mode 100644 index 000000000..d8f5bdde5 --- /dev/null +++ b/meta-digi-dey/dynamic-layers/freescale-layer/recipes-graphics/xwayland/xwayland_23.2.5.bbappend @@ -0,0 +1,18 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append:imxgpu = " \ + file://0001-Prefer-to-create-GLES2-context-for-glamor-EGL.patch \ +" + +OPENGL_PKGCONFIGS:remove:imxgpu = "${OPENGL_PKGCONFIGS_REMOVE_IMXGPU}" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU = "" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:imx-nxp-bsp = "glamor glx" +OPENGL_PKGCONFIGS_REMOVE_IMXGPU:mx8-nxp-bsp = "glx" + +# links with imx-gpu libs which are pre-built for glibc +# gcompat will address it during runtime +LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined" + +RDEPENDS:${PN}:append:imxgpu:libc-musl = " gcompat" + +PACKAGE_ARCH:imxgpu = "${MACHINE_SOCARCH}"