diff options
26 files changed, 192 insertions, 631 deletions
diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc index 37991f39..6e70ad68 100644 --- a/conf/machine/include/imx-base.inc +++ b/conf/machine/include/imx-base.inc | |||
@@ -463,6 +463,7 @@ PREFERRED_PROVIDER_virtual/egl:imxgpu ?= "imx-gpu-viv" | |||
463 | PREFERRED_PROVIDER_virtual/libgl:imxgpu3d ?= "imx-gpu-viv" | 463 | PREFERRED_PROVIDER_virtual/libgl:imxgpu3d ?= "imx-gpu-viv" |
464 | PREFERRED_PROVIDER_virtual/libgles1:imxgpu3d ?= "imx-gpu-viv" | 464 | PREFERRED_PROVIDER_virtual/libgles1:imxgpu3d ?= "imx-gpu-viv" |
465 | PREFERRED_PROVIDER_virtual/libgles2:imxgpu3d ?= "imx-gpu-viv" | 465 | PREFERRED_PROVIDER_virtual/libgles2:imxgpu3d ?= "imx-gpu-viv" |
466 | PREFERRED_PROVIDER_virtual/libgles3:imxgpu3d ?= "imx-gpu-viv" | ||
466 | PREFERRED_PROVIDER_virtual/libg2d ?= "imx-gpu-g2d" | 467 | PREFERRED_PROVIDER_virtual/libg2d ?= "imx-gpu-g2d" |
467 | PREFERRED_PROVIDER_virtual/libg2d:imxdpu ?= "imx-dpu-g2d" | 468 | PREFERRED_PROVIDER_virtual/libg2d:imxdpu ?= "imx-dpu-g2d" |
468 | PREFERRED_PROVIDER_opencl-clhpp:imxgpu ?= "imx-gpu-viv" | 469 | PREFERRED_PROVIDER_opencl-clhpp:imxgpu ?= "imx-gpu-viv" |
@@ -470,7 +471,7 @@ PREFERRED_PROVIDER_opencl-headers:imxgpu ?= "imx-gpu-viv" | |||
470 | PREFERRED_PROVIDER_opencl-icd-loader:imxgpu ?= "imx-gpu-viv" | 471 | PREFERRED_PROVIDER_opencl-icd-loader:imxgpu ?= "imx-gpu-viv" |
471 | PREFERRED_PROVIDER_virtual/opencl-icd:imxgpu ?= "imx-gpu-viv" | 472 | PREFERRED_PROVIDER_virtual/opencl-icd:imxgpu ?= "imx-gpu-viv" |
472 | 473 | ||
473 | PREFERRED_VERSION_weston:imx-nxp-bsp ??= "9.0.0.imx" | 474 | PREFERRED_VERSION_weston:imx-nxp-bsp ??= "10.0.0.imx" |
474 | PREFERRED_VERSION_weston:imx-mainline-bsp = "" | 475 | PREFERRED_VERSION_weston:imx-mainline-bsp = "" |
475 | 476 | ||
476 | PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ??= "1.25.imx" | 477 | PREFERRED_VERSION_wayland-protocols:mx6-nxp-bsp ??= "1.25.imx" |
diff --git a/recipes-graphics/drm/libdrm_2.4.109.imx.bb b/recipes-graphics/drm/libdrm_2.4.109.imx.bb index 6a9ab254..ff00b728 100644 --- a/recipes-graphics/drm/libdrm_2.4.109.imx.bb +++ b/recipes-graphics/drm/libdrm_2.4.109.imx.bb | |||
@@ -10,10 +10,10 @@ LIC_FILES_CHKSUM = "file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c5 | |||
10 | PROVIDES = "drm" | 10 | PROVIDES = "drm" |
11 | DEPENDS = "libpthread-stubs" | 11 | DEPENDS = "libpthread-stubs" |
12 | 12 | ||
13 | SRC_URI = "${IMX_LIBDRM_SRC};branch=${SRCBRANCH}" | ||
13 | IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1" | 14 | IMX_LIBDRM_SRC ?= "git://source.codeaurora.org/external/imx/libdrm-imx.git;protocol=https;nobranch=1" |
14 | SRCBRANCH ?= "libdrm-imx-2.4.109" | 15 | SRCBRANCH ?= "libdrm-imx-2.4.109" |
15 | SRC_URI = "${IMX_LIBDRM_SRC};branch=${SRCBRANCH}" | 16 | SRCREV = "93c9a82bdf31ea055d45cb54ce57cd42e22c90ae" |
16 | SRCREV = "1d943abb1fccc350a129950d2690948f64503bb7" | ||
17 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
18 | 18 | ||
19 | DEFAULT_PREFERENCE = "-1" | 19 | DEFAULT_PREFERENCE = "-1" |
diff --git a/recipes-graphics/glew/glew_%.bbappend b/recipes-graphics/glew/glew_%.bbappend new file mode 100644 index 00000000..95da4790 --- /dev/null +++ b/recipes-graphics/glew/glew_%.bbappend | |||
@@ -0,0 +1 @@ | |||
PACKAGECONFIG:imxgpu = "egl-gles2" | |||
diff --git a/recipes-graphics/imx-g2d/imx-dpu-g2d_2.0.0.bb b/recipes-graphics/imx-g2d/imx-dpu-g2d_2.1.0.bb index c8e4169d..ad8de74c 100644 --- a/recipes-graphics/imx-g2d/imx-dpu-g2d_2.0.0.bb +++ b/recipes-graphics/imx-g2d/imx-dpu-g2d_2.1.0.bb | |||
@@ -4,14 +4,14 @@ | |||
4 | 4 | ||
5 | DESCRIPTION = "G2D library using i.MX DPU" | 5 | DESCRIPTION = "G2D library using i.MX DPU" |
6 | LICENSE = "Proprietary" | 6 | LICENSE = "Proprietary" |
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=be5ff43682ed6c57dfcbeb97651c2829" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=d3c315c6eaa43e07d8c130dc3a04a011" |
8 | 8 | ||
9 | DEPENDS = "libgal-imx libdrm" | 9 | DEPENDS = "libgal-imx libdrm" |
10 | PROVIDES += "virtual/libg2d" | 10 | PROVIDES += "virtual/libg2d" |
11 | 11 | ||
12 | SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" | 12 | SRC_URI = "${FSL_MIRROR}/${BPN}-${PV}.bin;fsl-eula=true" |
13 | SRC_URI[md5sum] = "96bc124401896dec1272a86cb2baef54" | 13 | SRC_URI[md5sum] = "fa60a480c8d98cee969aa520bc829bf4" |
14 | SRC_URI[sha256sum] = "8e636b65b08cba6b4c2130c8dbff81ee1af42ef818c013aede81ab7e321899a4" | 14 | SRC_URI[sha256sum] = "65acc7345dcaf39536d60ee4516ad731c403790ed05d61a818601392554a6620" |
15 | 15 | ||
16 | inherit fsl-eula-unpack | 16 | inherit fsl-eula-unpack |
17 | 17 | ||
diff --git a/recipes-graphics/imx-g2d/imx-g2d-samples_2.0.0.bb b/recipes-graphics/imx-g2d/imx-g2d-samples_git.bb index 9832aac2..8368aefc 100644 --- a/recipes-graphics/imx-g2d/imx-g2d-samples_2.0.0.bb +++ b/recipes-graphics/imx-g2d/imx-g2d-samples_git.bb | |||
@@ -3,12 +3,14 @@ DESCRIPTION = "Set of sample applications for i.MX G2D" | |||
3 | LICENSE = "BSD-3-Clause" | 3 | LICENSE = "BSD-3-Clause" |
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0858ec9c7a80c4a2cf16e4f825a2cc91" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=0858ec9c7a80c4a2cf16e4f825a2cc91" |
5 | 5 | ||
6 | DEPENDS = "virtual/libg2d" | 6 | DEPENDS = "virtual/libg2d cairo" |
7 | |||
8 | PV = "2.1+git${SRCPV}" | ||
7 | 9 | ||
8 | GPU_G2D_SAMPLES_SRC ?= "git://github.com/nxpmicro/g2d-samples.git;protocol=https" | ||
9 | SRCBRANCH ?= "imx_2.0" | ||
10 | SRC_URI = "${GPU_G2D_SAMPLES_SRC};branch=${SRCBRANCH}" | 10 | SRC_URI = "${GPU_G2D_SAMPLES_SRC};branch=${SRCBRANCH}" |
11 | SRCREV = "267af142881d350218c2c2cead8f304a28bbee07" | 11 | GPU_G2D_SAMPLES_SRC ?= "git://github.com/nxpmicro/g2d-samples.git;protocol=https" |
12 | SRCBRANCH ?= "imx_2.1" | ||
13 | SRCREV = "3268f291a15b2d8d5f650f627764a52eb0a8fc15" | ||
12 | 14 | ||
13 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
14 | 16 | ||
diff --git a/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p4.0.bb b/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p4.2.bb index 1f3c2e60..223fb955 100644 --- a/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p4.0.bb +++ b/recipes-graphics/imx-g2d/imx-gpu-g2d_6.4.3.p4.2.bb | |||
@@ -5,17 +5,17 @@ | |||
5 | 5 | ||
6 | DESCRIPTION = "G2D library using i.MX GPU" | 6 | DESCRIPTION = "G2D library using i.MX GPU" |
7 | LICENSE = "Proprietary" | 7 | LICENSE = "Proprietary" |
8 | LIC_FILES_CHKSUM = "file://COPYING;md5=be5ff43682ed6c57dfcbeb97651c2829" | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=d3c315c6eaa43e07d8c130dc3a04a011" |
9 | DEPENDS = "libgal-imx" | 9 | DEPENDS = "libgal-imx" |
10 | PROVIDES = "virtual/libg2d" | 10 | PROVIDES = "virtual/libg2d" |
11 | 11 | ||
12 | FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}" | 12 | FSLBIN_NAME = "${PN}-${PV}-${TARGET_ARCH}" |
13 | 13 | ||
14 | SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" | 14 | SRC_URI = "${FSL_MIRROR}/${FSLBIN_NAME}.bin;name=${TARGET_ARCH};fsl-eula=true" |
15 | SRC_URI[aarch64.md5sum] = "b3b3c285796cd5d47841b73c4735e6bd" | 15 | SRC_URI[aarch64.md5sum] = "bf2a4e45835863f0563760fc8a1b7d58" |
16 | SRC_URI[aarch64.sha256sum] = "f2d592d1389be0c16f8dbe6374d480d674c2e31f4195916dbd6baf71473a0e60" | 16 | SRC_URI[aarch64.sha256sum] = "ff50ddfee2d989798a2aba84ef9114e01f8d867293891dc0aacfab1640cbf8a3" |
17 | SRC_URI[arm.md5sum] = "82f6a394505bc9d348a35f26cd02bd6a" | 17 | SRC_URI[arm.md5sum] = "45d0fce306a6e0c7237b27da7c787f26" |
18 | SRC_URI[arm.sha256sum] = "96f0213009087de0842740401a67a19d70d5a7ae928843c9c9bee3f8f177b2a0" | 18 | SRC_URI[arm.sha256sum] = "0ba9806c4efa0154fc9f7be406e42bc2c50b975abd32cbe322cf7bcf6ae0d350" |
19 | 19 | ||
20 | S = "${WORKDIR}/${FSLBIN_NAME}" | 20 | S = "${WORKDIR}/${FSLBIN_NAME}" |
21 | 21 | ||
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc index 8d014259..4abab088 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc | |||
@@ -6,7 +6,7 @@ | |||
6 | DESCRIPTION = "GPU driver and apps for i.MX" | 6 | DESCRIPTION = "GPU driver and apps for i.MX" |
7 | SECTION = "libs" | 7 | SECTION = "libs" |
8 | LICENSE = "Proprietary" | 8 | LICENSE = "Proprietary" |
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=be5ff43682ed6c57dfcbeb97651c2829" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=d3c315c6eaa43e07d8c130dc3a04a011" |
10 | 10 | ||
11 | DEPENDS += " \ | 11 | DEPENDS += " \ |
12 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ | 12 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \ |
@@ -25,18 +25,6 @@ DEPENDS:append:mx8-nxp-bsp = " patchelf-native" | |||
25 | # We depend on mesa to fill in what is missing. | 25 | # We depend on mesa to fill in what is missing. |
26 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}" | 26 | DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}" |
27 | 27 | ||
28 | EXTRA_PROVIDES = "" | ||
29 | EXTRA_PROVIDES:append:imxgpu3d = " \ | ||
30 | virtual/libgl \ | ||
31 | virtual/libgles1 \ | ||
32 | virtual/libgles2 \ | ||
33 | " | ||
34 | EXTRA_PROVIDES:append:mx8-nxp-bsp = " \ | ||
35 | virtual/libgbm \ | ||
36 | " | ||
37 | PROVIDES_OPENVX = "" | ||
38 | PROVIDES_OPENVX:mx8-nxp-bsp = "virtual/libopenvx" | ||
39 | PROVIDES_OPENVX:mx8mm-nxp-bsp = "" | ||
40 | PROVIDES += " \ | 28 | PROVIDES += " \ |
41 | imx-gpu-viv \ | 29 | imx-gpu-viv \ |
42 | libgal-imx \ | 30 | libgal-imx \ |
@@ -46,9 +34,26 @@ PROVIDES += " \ | |||
46 | virtual/egl \ | 34 | virtual/egl \ |
47 | virtual/libopenvg \ | 35 | virtual/libopenvg \ |
48 | virtual/opencl-icd \ | 36 | virtual/opencl-icd \ |
49 | ${PROVIDES_OPENVX} \ | ||
50 | ${EXTRA_PROVIDES} \ | 37 | ${EXTRA_PROVIDES} \ |
51 | " | 38 | " |
39 | EXTRA_PROVIDES = " \ | ||
40 | ${PROVIDES_OPENGLES3} \ | ||
41 | ${PROVIDES_OPENVX} \ | ||
42 | " | ||
43 | EXTRA_PROVIDES:append:imxgpu3d = " \ | ||
44 | virtual/libgl \ | ||
45 | virtual/libgles1 \ | ||
46 | virtual/libgles2 \ | ||
47 | " | ||
48 | EXTRA_PROVIDES:append:mx8-nxp-bsp = " \ | ||
49 | virtual/libgbm \ | ||
50 | " | ||
51 | PROVIDES_OPENGLES3 = "" | ||
52 | PROVIDES_OPENGLES3:mx8-nxp-bsp = "virtual/libgles3" | ||
53 | PROVIDES_OPENGLES3:mx8mm-nxp-bsp = "" | ||
54 | PROVIDES_OPENVX = "" | ||
55 | PROVIDES_OPENVX:mx8-nxp-bsp = "virtual/libopenvx" | ||
56 | PROVIDES_OPENVX:mx8mm-nxp-bsp = "" | ||
52 | 57 | ||
53 | RPROVIDES:${PN}:imxgpu3d += "imx-gpu-viv" | 58 | RPROVIDES:${PN}:imxgpu3d += "imx-gpu-viv" |
54 | 59 | ||
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch64.bb deleted file mode 100644 index 81ca2526..00000000 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch64.bb +++ /dev/null | |||
@@ -1,6 +0,0 @@ | |||
1 | require imx-gpu-viv-6.inc | ||
2 | |||
3 | SRC_URI[md5sum] = "20cecb3e5440f63bb6612c740ccfe43a" | ||
4 | SRC_URI[sha256sum] = "283f2f51cadf5138bd47269a73425a51f69453556fb80f18521da04317e547a8" | ||
5 | |||
6 | COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" | ||
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch32.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.2-aarch32.bb index d6cae8b6..bb07fb10 100644 --- a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.0-aarch32.bb +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.2-aarch32.bb | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | require imx-gpu-viv-6.inc | 5 | require imx-gpu-viv-6.inc |
6 | 6 | ||
7 | SRC_URI[md5sum] = "9abc4e59919b68f81094c194edb525a2" | 7 | SRC_URI[md5sum] = "8e83cb642033ac3b85a5473b6d92687e" |
8 | SRC_URI[sha256sum] = "5f56e4690287fd4e8480d2c43101ef30383c95d155a3f06beadecad309e684a3" | 8 | SRC_URI[sha256sum] = "89197fdb13dfc21c49968297c2e8b5cb8dd5563502278151d36b2dce2a2092ed" |
9 | 9 | ||
10 | COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp|mx6sx-nxp-bsp|mx6sl-nxp-bsp|mx7ulp-nxp-bsp)" | 10 | COMPATIBLE_MACHINE = "(mx6q-nxp-bsp|mx6dl-nxp-bsp|mx6sx-nxp-bsp|mx6sl-nxp-bsp|mx7ulp-nxp-bsp)" |
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.2-aarch64.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.2-aarch64.bb new file mode 100644 index 00000000..de527cda --- /dev/null +++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.4.3.p4.2-aarch64.bb | |||
@@ -0,0 +1,6 @@ | |||
1 | require imx-gpu-viv-6.inc | ||
2 | |||
3 | SRC_URI[md5sum] = "22de8a5f59a56a7ef499f590d1659b6f" | ||
4 | SRC_URI[sha256sum] = "52921c0b59529f1598084e991eda1863100754f28a7744ba958158dff8074b3b" | ||
5 | |||
6 | COMPATIBLE_MACHINE = "(mx8-nxp-bsp)" | ||
diff --git a/recipes-graphics/mesa/libglu_%.bbappend b/recipes-graphics/mesa/libglu_%.bbappend new file mode 100644 index 00000000..96745dd8 --- /dev/null +++ b/recipes-graphics/mesa/libglu_%.bbappend | |||
@@ -0,0 +1 @@ | |||
REQUIRED_DISTRO_FEATURES:remove:imxgpu = "x11" | |||
diff --git a/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch b/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch deleted file mode 100644 index 19bcca98..00000000 --- a/recipes-graphics/mesa/mesa-demos/Add-OpenVG-demos-to-support-wayland.patch +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | From 8aba54422d9a77383c150f9f70240b18b6e1918e Mon Sep 17 00:00:00 2001 | ||
2 | From: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | ||
3 | Date: Thu, 9 Apr 2015 15:47:21 -0500 | ||
4 | Subject: [PATCH] Add OpenVG demos to support wayland. | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | |||
8 | Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@freescale.com> | ||
9 | --- | ||
10 | src/egl/Makefile.am | 6 +++--- | ||
11 | src/egl/openvg/Makefile.am | 33 +++++++++++++++++++++++++++++---- | ||
12 | 2 files changed, 32 insertions(+), 7 deletions(-) | ||
13 | |||
14 | Index: mesa-demos-8.2.0/src/egl/Makefile.am | ||
15 | =================================================================== | ||
16 | --- mesa-demos-8.2.0.orig/src/egl/Makefile.am 2016-05-09 11:45:51.479100180 -0500 | ||
17 | +++ mesa-demos-8.2.0/src/egl/Makefile.am 2016-05-09 11:45:51.475100160 -0500 | ||
18 | @@ -26,10 +26,10 @@ | ||
19 | eglut \ | ||
20 | opengles1 \ | ||
21 | opengles2 \ | ||
22 | - oes_vg | ||
23 | + oes_vg \ | ||
24 | + openvg | ||
25 | |||
26 | if HAVE_GLU | ||
27 | SUBDIRS += \ | ||
28 | - opengl \ | ||
29 | - openvg | ||
30 | + opengl | ||
31 | endif | ||
32 | Index: mesa-demos-8.2.0/src/egl/openvg/Makefile.am | ||
33 | =================================================================== | ||
34 | --- mesa-demos-8.2.0.orig/src/egl/openvg/Makefile.am 2016-05-09 11:45:51.479100180 -0500 | ||
35 | +++ mesa-demos-8.2.0/src/egl/openvg/Makefile.am 2016-05-09 12:39:30.000000000 -0500 | ||
36 | @@ -47,13 +47,26 @@ | ||
37 | endif | ||
38 | endif | ||
39 | |||
40 | +if HAVE_WAYLAND | ||
41 | +EGL_WL_DEMOS = \ | ||
42 | + lion_wayland \ | ||
43 | + sp_wayland | ||
44 | + | ||
45 | +if HAVE_FREETYPE2 | ||
46 | +EGL_WL_DEMOS += \ | ||
47 | + vgtext_wayland | ||
48 | +endif | ||
49 | +endif | ||
50 | + | ||
51 | if HAVE_EGL | ||
52 | if HAVE_VG | ||
53 | bin_PROGRAMS = \ | ||
54 | - $(EGL_X11_DEMOS) | ||
55 | + $(EGL_X11_DEMOS) \ | ||
56 | + $(EGL_WL_DEMOS) | ||
57 | endif | ||
58 | endif | ||
59 | |||
60 | +if HAVE_X11 | ||
61 | lion_x11_SOURCES = lion.c lion-render.c lion-render.h | ||
62 | sp_x11_SOURCES = sp.c | ||
63 | |||
64 | @@ -63,6 +76,20 @@ | ||
65 | text_SOURCES = text.c | ||
66 | text_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@ | ||
67 | text_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_x11.la | ||
68 | +endif | ||
69 | + | ||
70 | +if HAVE_WAYLAND | ||
71 | +lion_wayland_SOURCES = lion.c lion-render.c lion-render.h | ||
72 | +lion_wayland_LDADD = ../eglut/libeglut_wayland.la | ||
73 | + | ||
74 | +sp_wayland_SOURCES = sp.c | ||
75 | +sp_wayland_LDADD = ../eglut/libeglut_wayland.la | ||
76 | + | ||
77 | +vgtext_wayland_SOURCES = text.c | ||
78 | +vgtext_wayland_CFLAGS = $(AM_CFLAGS) @FREETYPE2_CFLAGS@ | ||
79 | +vgtext_wayland_LDADD = @FREETYPE2_LIBS@ ../eglut/libeglut_wayland.la | ||
80 | + | ||
81 | +endif | ||
82 | |||
83 | SUBDIRS = \ | ||
84 | trivial | ||
diff --git a/recipes-graphics/mesa/mesa-demos_%.bbappend b/recipes-graphics/mesa/mesa-demos_%.bbappend index 4b518185..0f0528dd 100644 --- a/recipes-graphics/mesa/mesa-demos_%.bbappend +++ b/recipes-graphics/mesa/mesa-demos_%.bbappend | |||
@@ -1,26 +1,23 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | 1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" |
2 | 2 | ||
3 | SRC_URI:append:imxgpu = " file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ | 3 | SRC_URI:append:imxgpu = " \ |
4 | file://fix-clear-build-break.patch \ | 4 | file://Replace-glWindowPos2iARB-calls-with-glWindowPos2i.patch \ |
5 | file://Add-OpenVG-demos-to-support-wayland.patch" | 5 | file://fix-clear-build-break.patch" |
6 | 6 | ||
7 | REQUIRED_DISTRO_FEATURES:remove:imxgpu = "x11" | ||
8 | |||
9 | PACKAGECONFIG:remove = " \ | ||
10 | ${PACKAGECONFIG_REMOVE_IF_2D_ONLY} \ | ||
11 | ${PACKAGECONFIG_REMOVE_IF_GPU}" | ||
7 | PACKAGECONFIG_REMOVE_IF_2D_ONLY = "" | 12 | PACKAGECONFIG_REMOVE_IF_2D_ONLY = "" |
8 | PACKAGECONFIG_REMOVE_IF_2D_ONLY:imxgpu2d = "gles1 gles2" | 13 | PACKAGECONFIG_REMOVE_IF_2D_ONLY:imxgpu2d = "gles1 gles2" |
9 | PACKAGECONFIG_REMOVE_IF_2D_ONLY:imxgpu3d = "" | 14 | PACKAGECONFIG_REMOVE_IF_2D_ONLY:imxgpu3d = "" |
10 | PACKAGECONFIG_REMOVE_IF_GPU = "" | 15 | PACKAGECONFIG_REMOVE_IF_GPU = "" |
11 | PACKAGECONFIG_REMOVE_IF_GPU:imxgpu = " \ | 16 | PACKAGECONFIG_REMOVE_IF_GPU:imxgpu = "glx x11" |
12 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'glu x11', '', d)} \ | ||
13 | " | ||
14 | PACKAGECONFIG:remove = " \ | ||
15 | ${PACKAGECONFIG_REMOVE_IF_2D_ONLY} \ | ||
16 | ${PACKAGECONFIG_REMOVE_IF_GPU} \ | ||
17 | " | ||
18 | 17 | ||
19 | PACKAGECONFIG_APPEND_IF_GPU = "" | ||
20 | PACKAGECONFIG_APPEND_IF_GPU:imxgpu = " \ | ||
21 | ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland vg', '', d)} \ | ||
22 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'glut', '', d)} \ | ||
23 | " | ||
24 | PACKAGECONFIG:append = " \ | 18 | PACKAGECONFIG:append = " \ |
25 | ${PACKAGECONFIG_APPEND_IF_GPU} \ | 19 | ${PACKAGECONFIG_APPEND_IF_GPU}" |
26 | " | 20 | PACKAGECONFIG_APPEND_IF_GPU = "" |
21 | PACKAGECONFIG_APPEND_IF_GPU:imxgpu = "glu" | ||
22 | |||
23 | PACKAGECONFIG[glu] = ",,libglu" | ||
diff --git a/recipes-graphics/piglit/piglit_%.bbappend b/recipes-graphics/piglit/piglit_%.bbappend new file mode 100644 index 00000000..72cf8eff --- /dev/null +++ b/recipes-graphics/piglit/piglit_%.bbappend | |||
@@ -0,0 +1,4 @@ | |||
1 | FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | PACKAGECONFIG:remove:imxgpu = "glx" | ||
4 | PACKAGECONFIG:append:mx8-nxp-bsp = " opencl" | ||
diff --git a/recipes-graphics/wayland/required-distro-features.inc b/recipes-graphics/wayland/required-distro-features.inc new file mode 100644 index 00000000..bb4a0e8e --- /dev/null +++ b/recipes-graphics/wayland/required-distro-features.inc | |||
@@ -0,0 +1,8 @@ | |||
1 | # distro features required by weston recipes | ||
2 | |||
3 | inherit features_check | ||
4 | |||
5 | # requires pam enabled if started via systemd | ||
6 | # | ||
7 | REQUIRED_DISTRO_FEATURES = "wayland opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | ||
8 | |||
diff --git a/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch b/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch index dde00546..676d0338 100644 --- a/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch +++ b/recipes-graphics/wayland/weston/0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From be066d9841a9cd5e9cc5ef3c457bd1e33b2a5fae Mon Sep 17 00:00:00 2001 | 1 | From 77eba6f6b04ff21b77c41500657495b4fd12a5f6 Mon Sep 17 00:00:00 2001 |
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | 2 | From: Max Krummenacher <max.krummenacher@toradex.com> |
3 | Date: Mon, 11 Jul 2022 19:38:19 +0000 | 3 | Date: Mon, 11 Jul 2022 19:38:19 +0000 |
4 | Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto | 4 | Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto |
@@ -26,7 +26,7 @@ Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | |||
26 | 1 file changed, 1 insertion(+), 1 deletion(-) | 26 | 1 file changed, 1 insertion(+), 1 deletion(-) |
27 | 27 | ||
28 | diff --git a/protocol/meson.build b/protocol/meson.build | 28 | diff --git a/protocol/meson.build b/protocol/meson.build |
29 | index dc90ec2a..8290ad44 100644 | 29 | index bdd322ac..e50b23bb 100644 |
30 | --- a/protocol/meson.build | 30 | --- a/protocol/meson.build |
31 | +++ b/protocol/meson.build | 31 | +++ b/protocol/meson.build |
32 | @@ -1,4 +1,4 @@ | 32 | @@ -1,4 +1,4 @@ |
@@ -34,7 +34,7 @@ index dc90ec2a..8290ad44 100644 | |||
34 | +dep_scanner = dependency('wayland-scanner', native: true) | 34 | +dep_scanner = dependency('wayland-scanner', native: true) |
35 | prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) | 35 | prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner')) |
36 | 36 | ||
37 | dep_wp = dependency('wayland-protocols', version: '>= 1.18') | 37 | dep_wp = dependency('wayland-protocols', version: '>= 1.24') |
38 | -- | 38 | -- |
39 | 2.20.1 | 39 | 2.17.1 |
40 | 40 | ||
diff --git a/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch b/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch deleted file mode 100644 index fb2d47bf..00000000 --- a/recipes-graphics/wayland/weston/0001-g2d-renderer-Add-vsync-to-cloned-displays.patch +++ /dev/null | |||
@@ -1,102 +0,0 @@ | |||
1 | From b719011b7c015e2d6f0108c9d0709b98d21d6a89 Mon Sep 17 00:00:00 2001 | ||
2 | From: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> | ||
3 | Date: Mon, 21 Mar 2022 12:37:18 +0100 | ||
4 | Subject: [PATCH] g2d-renderer: Add vsync to cloned displays. | ||
5 | |||
6 | When using g2d clone mode allocates additional surfaces according to | ||
7 | FB_MULTI_BUFFER for each cloned display. The g2d blit from the main screen | ||
8 | to the cloned displays is done using inactive surface. The FBIOPAN_DISPLAY | ||
9 | ioctl to the surface is done afterwards. | ||
10 | |||
11 | Signed-off-by: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com> | ||
12 | --- | ||
13 | libweston/renderer-g2d/g2d-renderer.c | 33 +++++++++++++++++++++------ | ||
14 | 1 file changed, 26 insertions(+), 7 deletions(-) | ||
15 | |||
16 | diff --git a/libweston/renderer-g2d/g2d-renderer.c b/libweston/renderer-g2d/g2d-renderer.c | ||
17 | index 34a077b7..3e6395d6 100644 | ||
18 | --- a/libweston/renderer-g2d/g2d-renderer.c | ||
19 | +++ b/libweston/renderer-g2d/g2d-renderer.c | ||
20 | @@ -525,6 +525,7 @@ g2d_blit_surface(void *handle, struct g2d_surfaceEx * srcG2dSurface, struct g2d_ | ||
21 | static void | ||
22 | g2d_flip_surface(struct weston_output *output) | ||
23 | { | ||
24 | + int i; | ||
25 | struct g2d_output_state *go = get_output_state(output); | ||
26 | go->fb_info.varinfo.yoffset = go->activebuffer * go->fb_info.y_resolution; | ||
27 | |||
28 | @@ -532,6 +533,16 @@ g2d_flip_surface(struct weston_output *output) | ||
29 | { | ||
30 | weston_log("FBIOPAN_DISPLAY Failed\n"); | ||
31 | } | ||
32 | + | ||
33 | + for (i = 0; i < go->clone_display_num; i++) | ||
34 | + { | ||
35 | + go->mirror_fb_info[i].varinfo.yoffset = go->activebuffer * go->mirror_fb_info[i].y_resolution; | ||
36 | + if(ioctl(go->mirror_fb_info[i].fb_fd, FBIOPAN_DISPLAY, &(go->mirror_fb_info[i].varinfo)) < 0) | ||
37 | + { | ||
38 | + weston_log("FBIOPAN_DISPLAY clone %d Failed\n", i); | ||
39 | + } | ||
40 | + } | ||
41 | + | ||
42 | go->activebuffer = (go->activebuffer + 1) % go->nNumBuffers; | ||
43 | } | ||
44 | |||
45 | @@ -571,17 +582,18 @@ copy_to_framebuffer(struct weston_output *output, pixman_region32_t* output_dama | ||
46 | int i = 0; | ||
47 | for(i = 0; i < go->clone_display_num; i++) | ||
48 | { | ||
49 | + int idx = i * go->nNumBuffers + go->activebuffer; | ||
50 | g2dRECT srcRect = {0, 0, go->renderSurf[go->activebuffer].base.width, go->renderSurf[go->activebuffer].base.height}; | ||
51 | - g2dRECT dstrect = {0, 0, go->mirrorSurf[i].base.width, go->mirrorSurf[i].base.height}; | ||
52 | + g2dRECT dstrect = {0, 0, go->mirrorSurf[idx].base.width, go->mirrorSurf[idx].base.height}; | ||
53 | if(go->directBlit || go->nNumBuffers > 1) | ||
54 | { | ||
55 | g2d_blit_surface(gr->handle, &go->renderSurf[go->activebuffer], | ||
56 | - &go->mirrorSurf[i], &srcRect, &dstrect); | ||
57 | + &go->mirrorSurf[idx], &srcRect, &dstrect); | ||
58 | } | ||
59 | else | ||
60 | { | ||
61 | g2d_blit_surface(gr->handle, &go->offscreenSurface, | ||
62 | - &go->mirrorSurf[i], &srcRect, &dstrect); | ||
63 | + &go->mirrorSurf[idx], &srcRect, &dstrect); | ||
64 | } | ||
65 | } | ||
66 | } | ||
67 | @@ -2113,6 +2125,7 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, | ||
68 | int clone_display_num = 0; | ||
69 | int count = 0; | ||
70 | int k=0, dispCount = 0; | ||
71 | + int offset = 0; | ||
72 | char displays[5][32]; | ||
73 | weston_log("g2d_renderer_output_create device=%s\n", device); | ||
74 | count = strlen(device); | ||
75 | @@ -2166,7 +2179,7 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, | ||
76 | |||
77 | if(go->clone_display_num) | ||
78 | { | ||
79 | - go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num); | ||
80 | + go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num * go->nNumBuffers); | ||
81 | go->mirror_fb_info = zalloc(sizeof(struct fb_screeninfo) * clone_display_num); | ||
82 | if(go->mirrorSurf == NULL || go->mirror_fb_info == NULL) | ||
83 | return -1; | ||
84 | @@ -2178,9 +2191,15 @@ g2d_fbdev_renderer_output_create(struct weston_output *output, | ||
85 | weston_log("Open frame buffer failed.\n"); | ||
86 | return -1; | ||
87 | } | ||
88 | - get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[i]); | ||
89 | - go->mirrorSurf[i].base.planes[0] = go->mirror_fb_info[i].physical; | ||
90 | - g2d_clear(gr->handle, &go->mirrorSurf[i].base); | ||
91 | + | ||
92 | + offset = go->mirror_fb_info[i].stride_bytes * go->mirror_fb_info[i].y_resolution; | ||
93 | + for(k = 0; k < go->nNumBuffers; k++) | ||
94 | + { | ||
95 | + int idx = i * go->nNumBuffers + k; | ||
96 | + get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[idx]); | ||
97 | + go->mirrorSurf[idx].base.planes[0] = go->mirror_fb_info[i].physical + (offset * k); | ||
98 | + g2d_clear(gr->handle, &go->mirrorSurf[idx].base); | ||
99 | + } | ||
100 | } | ||
101 | } | ||
102 | g2d_finish(gr->handle); | ||
diff --git a/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch deleted file mode 100644 index db640055..00000000 --- a/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch +++ /dev/null | |||
@@ -1,52 +0,0 @@ | |||
1 | From 4be82f75a47bd456452ab713d7d57a75d844f42a Mon Sep 17 00:00:00 2001 | ||
2 | From: Marius Vlad <marius.vlad@collabora.com> | ||
3 | Date: Thu, 1 Apr 2021 00:12:00 +0300 | ||
4 | Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at | ||
5 | DRM-backend tear down | ||
6 | |||
7 | Tearing down the drm-backend when there are no input devices, would call | ||
8 | for the gbm device destruction before compositor shutdown. The latter | ||
9 | would call into the renderer detroy function and assume that the | ||
10 | EGLDisplay, which was created using the before-mentioned gbm device, is | ||
11 | still available. This patch re-orders the gbm destruction after the | ||
12 | compositor shutdown when no one would make use of it. | ||
13 | |||
14 | Fixes: #314 | ||
15 | |||
16 | Signed-off-by: Marius Vlad <marius.vlad@collabora.com> | ||
17 | Suggested-by: Daniel Stone <daniel.stone@collabora.com> | ||
18 | |||
19 | Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb] | ||
20 | --- | ||
21 | libweston/backend-drm/drm.c | 8 ++++---- | ||
22 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
23 | |||
24 | diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c | ||
25 | index 9d3b5dcc..67834d3e 100644 | ||
26 | --- a/libweston/backend-drm/drm.c | ||
27 | +++ b/libweston/backend-drm/drm.c | ||
28 | @@ -3402,10 +3402,6 @@ err_drm_source: | ||
29 | wl_event_source_remove(b->drm_source); | ||
30 | err_udev_input: | ||
31 | udev_input_destroy(&b->input); | ||
32 | -#ifdef BUILD_DRM_GBM | ||
33 | - if (b->gbm) | ||
34 | - gbm_device_destroy(b->gbm); | ||
35 | -#endif | ||
36 | destroy_sprites(b); | ||
37 | err_udev_dev: | ||
38 | udev_device_unref(drm_device); | ||
39 | @@ -3415,6 +3411,10 @@ err_launcher: | ||
40 | weston_launcher_destroy(compositor->launcher); | ||
41 | err_compositor: | ||
42 | weston_compositor_shutdown(compositor); | ||
43 | +#ifdef BUILD_DRM_GBM | ||
44 | + if (b->gbm) | ||
45 | + gbm_device_destroy(b->gbm); | ||
46 | +#endif | ||
47 | free(b); | ||
48 | return NULL; | ||
49 | } | ||
50 | -- | ||
51 | 2.17.1 | ||
52 | |||
diff --git a/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch b/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch deleted file mode 100644 index 06e0f7ba..00000000 --- a/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 20 Apr 2021 20:42:18 -0700 | ||
4 | Subject: [PATCH] meson.build: fix incorrect header | ||
5 | |||
6 | The wayland.c actually include 'xdg-shell-client-protocol.h' instead of | ||
7 | the server one, so fix it. Otherwise, it's possible to get build failure | ||
8 | due to race condition. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | libweston/backend-wayland/meson.build | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build | ||
18 | index 7e82513..29270b5 100644 | ||
19 | --- a/libweston/backend-wayland/meson.build | ||
20 | +++ b/libweston/backend-wayland/meson.build | ||
21 | @@ -10,7 +10,7 @@ srcs_wlwl = [ | ||
22 | fullscreen_shell_unstable_v1_protocol_c, | ||
23 | presentation_time_protocol_c, | ||
24 | presentation_time_server_protocol_h, | ||
25 | - xdg_shell_server_protocol_h, | ||
26 | + xdg_shell_client_protocol_h, | ||
27 | xdg_shell_protocol_c, | ||
28 | ] | ||
29 | |||
30 | -- | ||
31 | 2.30.2 | ||
32 | |||
diff --git a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch deleted file mode 100644 index f6ebfd8f..00000000 --- a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ /dev/null | |||
@@ -1,199 +0,0 @@ | |||
1 | From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 | ||
2 | From: Tom Hochstein <tom.hochstein@nxp.com> | ||
3 | Date: Wed, 22 Feb 2017 15:53:30 +0200 | ||
4 | Subject: [PATCH] weston-launch: Provide a default version that doesn't require | ||
5 | |||
6 | PAM | ||
7 | |||
8 | weston-launch requires PAM for starting weston as a non-root user. | ||
9 | |||
10 | Since starting weston as root is a valid use case by itself, if | ||
11 | PAM is not available, provide a default version of weston-launch | ||
12 | without non-root-user support. | ||
13 | |||
14 | Upstream-Status: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] | ||
15 | |||
16 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | ||
17 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | ||
18 | Signed-off-by: Denys Dmytriyenko <denys@ti.com> | ||
19 | Signed-off-by: Ming Liu <ming.liu@toradex.com> | ||
20 | |||
21 | --- | ||
22 | libweston/meson.build | 16 ++++++++++++---- | ||
23 | libweston/weston-launch.c | 21 +++++++++++++++++++++ | ||
24 | meson_options.txt | 7 +++++++ | ||
25 | 3 files changed, 40 insertions(+), 4 deletions(-) | ||
26 | |||
27 | diff --git a/libweston/meson.build b/libweston/meson.build | ||
28 | index 08d23ec..cb9fd3f 100644 | ||
29 | --- a/libweston/meson.build | ||
30 | +++ b/libweston/meson.build | ||
31 | @@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( | ||
32 | ) | ||
33 | |||
34 | if get_option('weston-launch') | ||
35 | - dep_pam = cc.find_library('pam') | ||
36 | + deps_weston_launch = [systemd_dep, dep_libdrm] | ||
37 | |||
38 | - if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
39 | - error('pam_open_session not found for weston-launch') | ||
40 | + if get_option('pam') | ||
41 | + dep_pam = cc.find_library('pam') | ||
42 | + if not cc.has_function('pam_open_session', dependencies: dep_pam) | ||
43 | + error('pam_open_session not found for weston-launch') | ||
44 | + endif | ||
45 | + | ||
46 | + if dep_pam.found() | ||
47 | + deps_weston_launch += dep_pam | ||
48 | + config_h.set('HAVE_PAM', '1') | ||
49 | + endif | ||
50 | endif | ||
51 | |||
52 | executable( | ||
53 | 'weston-launch', | ||
54 | 'weston-launch.c', | ||
55 | - dependencies: [dep_pam, systemd_dep, dep_libdrm], | ||
56 | + dependencies: deps_weston_launch, | ||
57 | include_directories: common_inc, | ||
58 | install: true | ||
59 | ) | ||
60 | diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c | ||
61 | index 521cb2c..2d42d33 100644 | ||
62 | --- a/libweston/weston-launch.c | ||
63 | +++ b/libweston/weston-launch.c | ||
64 | @@ -51,7 +51,9 @@ | ||
65 | |||
66 | #include <pwd.h> | ||
67 | #include <grp.h> | ||
68 | +#ifdef HAVE_PAM | ||
69 | #include <security/pam_appl.h> | ||
70 | +#endif | ||
71 | |||
72 | #ifdef HAVE_SYSTEMD_LOGIN | ||
73 | #include <systemd/sd-login.h> | ||
74 | @@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) | ||
75 | #endif | ||
76 | |||
77 | struct weston_launch { | ||
78 | +#ifdef HAVE_PAM | ||
79 | struct pam_conv pc; | ||
80 | pam_handle_t *ph; | ||
81 | +#endif | ||
82 | int tty; | ||
83 | int ttynr; | ||
84 | int sock[2]; | ||
85 | @@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) | ||
86 | return false; | ||
87 | } | ||
88 | |||
89 | +#ifdef HAVE_PAM | ||
90 | static int | ||
91 | pam_conversation_fn(int msg_count, | ||
92 | const struct pam_message **messages, | ||
93 | @@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | +#endif | ||
98 | |||
99 | static int | ||
100 | setup_launcher_socket(struct weston_launch *wl) | ||
101 | @@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) | ||
102 | close(wl->signalfd); | ||
103 | close(wl->sock[0]); | ||
104 | |||
105 | +#ifdef HAVE_PAM | ||
106 | if (wl->new_user) { | ||
107 | err = pam_close_session(wl->ph, 0); | ||
108 | if (err) | ||
109 | @@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) | ||
110 | err, pam_strerror(wl->ph, err)); | ||
111 | pam_end(wl->ph, err); | ||
112 | } | ||
113 | +#endif | ||
114 | |||
115 | /* | ||
116 | * Get a fresh handle to the tty as the previous one is in | ||
117 | @@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
118 | setenv("HOME", wl->pw->pw_dir, 1); | ||
119 | setenv("SHELL", wl->pw->pw_shell, 1); | ||
120 | |||
121 | +#ifdef HAVE_PAM | ||
122 | env = pam_getenvlist(wl->ph); | ||
123 | if (env) { | ||
124 | for (i = 0; env[i]; ++i) { | ||
125 | @@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) | ||
126 | } | ||
127 | free(env); | ||
128 | } | ||
129 | +#endif | ||
130 | |||
131 | /* | ||
132 | * We open a new session, so it makes sense | ||
133 | @@ -789,8 +799,10 @@ static void | ||
134 | help(const char *name) | ||
135 | { | ||
136 | fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); | ||
137 | +#ifdef HAVE_PAM | ||
138 | fprintf(stderr, " -u, --user Start session as specified username,\n" | ||
139 | " e.g. -u joe, requires root.\n"); | ||
140 | +#endif | ||
141 | fprintf(stderr, " -t, --tty Start session on alternative tty,\n" | ||
142 | " e.g. -t /dev/tty4, requires -u option.\n"); | ||
143 | fprintf(stderr, " -v, --verbose Be verbose\n"); | ||
144 | @@ -804,7 +816,9 @@ main(int argc, char *argv[]) | ||
145 | int i, c; | ||
146 | char *tty = NULL; | ||
147 | struct option opts[] = { | ||
148 | +#ifdef HAVE_PAM | ||
149 | { "user", required_argument, NULL, 'u' }, | ||
150 | +#endif | ||
151 | { "tty", required_argument, NULL, 't' }, | ||
152 | { "verbose", no_argument, NULL, 'v' }, | ||
153 | { "help", no_argument, NULL, 'h' }, | ||
154 | @@ -816,11 +830,16 @@ main(int argc, char *argv[]) | ||
155 | while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { | ||
156 | switch (c) { | ||
157 | case 'u': | ||
158 | +#ifdef HAVE_PAM | ||
159 | wl.new_user = optarg; | ||
160 | if (getuid() != 0) { | ||
161 | fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); | ||
162 | exit(EXIT_FAILURE); | ||
163 | } | ||
164 | +#else | ||
165 | + fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); | ||
166 | + exit(EXIT_FAILURE); | ||
167 | +#endif | ||
168 | break; | ||
169 | case 't': | ||
170 | tty = optarg; | ||
171 | @@ -872,8 +891,10 @@ main(int argc, char *argv[]) | ||
172 | if (setup_tty(&wl, tty) < 0) | ||
173 | exit(EXIT_FAILURE); | ||
174 | |||
175 | +#ifdef HAVE_PAM | ||
176 | if (wl.new_user && setup_pam(&wl) < 0) | ||
177 | exit(EXIT_FAILURE); | ||
178 | +#endif | ||
179 | |||
180 | if (setup_launcher_socket(&wl) < 0) | ||
181 | exit(EXIT_FAILURE); | ||
182 | diff --git a/meson_options.txt b/meson_options.txt | ||
183 | index 239bd2d..99e4ec3 100644 | ||
184 | --- a/meson_options.txt | ||
185 | +++ b/meson_options.txt | ||
186 | @@ -73,6 +73,13 @@ option( | ||
187 | ) | ||
188 | |||
189 | option( | ||
190 | + 'pam', | ||
191 | + type: 'boolean', | ||
192 | + value: true, | ||
193 | + description: 'Define if PAM is available' | ||
194 | +) | ||
195 | + | ||
196 | +option( | ||
197 | 'xwayland', | ||
198 | type: 'boolean', | ||
199 | value: true, | ||
diff --git a/recipes-graphics/wayland/weston_9.0.0.imx.bb b/recipes-graphics/wayland/weston_10.0.0.imx.bb index 63143787..8fce4472 100644 --- a/recipes-graphics/wayland/weston_9.0.0.imx.bb +++ b/recipes-graphics/wayland/weston_10.0.0.imx.bb | |||
@@ -3,37 +3,34 @@ | |||
3 | # recipe. The second section customizes the recipe for i.MX. | 3 | # recipe. The second section customizes the recipe for i.MX. |
4 | 4 | ||
5 | ########### OE-core copy ################## | 5 | ########### OE-core copy ################## |
6 | # Upstream hash: c8aa0222ce2be647911114aaebcbb0d55d7caf87 | 6 | # Upstream hash: 400aae43d08f0b9f787ac0d21cb3c97058d76748 |
7 | 7 | ||
8 | SUMMARY = "Weston, a Wayland compositor" | 8 | SUMMARY = "Weston, a Wayland compositor" |
9 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" | 9 | DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" |
10 | HOMEPAGE = "http://wayland.freedesktop.org" | 10 | HOMEPAGE = "http://wayland.freedesktop.org" |
11 | LICENSE = "MIT" | 11 | LICENSE = "MIT" |
12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ | 12 | LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ |
13 | file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" | 13 | file://libweston/compositor.c;endline=27;md5=eb6d5297798cabe2ddc65e2af519bcf0 \ |
14 | " | ||
14 | 15 | ||
15 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 16 | SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ |
16 | file://weston.png \ | 17 | file://weston.png \ |
17 | file://weston.desktop \ | 18 | file://weston.desktop \ |
18 | file://xwayland.weston-start \ | 19 | file://xwayland.weston-start \ |
19 | file://systemd-notify.weston-start \ | 20 | file://systemd-notify.weston-start \ |
20 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | 21 | " |
21 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | ||
22 | file://0001-meson.build-fix-incorrect-header.patch \ | ||
23 | file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \ | ||
24 | file://0001-g2d-renderer-Add-vsync-to-cloned-displays.patch \ | ||
25 | " | ||
26 | 22 | ||
27 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " | 23 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " |
28 | 24 | ||
29 | SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" | 25 | SRC_URI[sha256sum] = "5c23964112b90238bed39e5dd1e41cd71a79398813cdc3bbb15a9fdc94e547ae" |
30 | 26 | ||
31 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" | 27 | UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" |
32 | 28 | ||
33 | inherit meson pkgconfig useradd features_check | 29 | inherit meson pkgconfig useradd |
30 | |||
34 | # depends on virtual/egl | 31 | # depends on virtual/egl |
35 | # weston-init requires pam enabled if started via systemd | 32 | # |
36 | REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}" | 33 | require ${THISDIR}/required-distro-features.inc |
37 | 34 | ||
38 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" | 35 | DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" |
39 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" | 36 | DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" |
@@ -42,19 +39,22 @@ LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', | |||
42 | 39 | ||
43 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" | 40 | WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" |
44 | 41 | ||
45 | EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false" | 42 | EXTRA_OEMESON += "-Dpipewire=false" |
46 | 43 | ||
47 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ | 44 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \ |
48 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ | 45 | ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ |
49 | ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ | 46 | ${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \ |
50 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ | 47 | ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ |
51 | launch \ | 48 | ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \ |
52 | image-jpeg \ | 49 | image-jpeg \ |
53 | screenshare \ | 50 | screenshare \ |
54 | shell-desktop \ | 51 | shell-desktop \ |
55 | shell-fullscreen \ | 52 | shell-fullscreen \ |
56 | shell-ivi" | 53 | shell-ivi" |
57 | 54 | ||
55 | # Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all' | ||
56 | SIMPLECLIENTS ?= "all" | ||
57 | |||
58 | # | 58 | # |
59 | # Compositor choices | 59 | # Compositor choices |
60 | # | 60 | # |
@@ -67,11 +67,11 @@ PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libx | |||
67 | # Headless Weston | 67 | # Headless Weston |
68 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" | 68 | PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" |
69 | # Weston on framebuffer | 69 | # Weston on framebuffer |
70 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | 70 | PACKAGECONFIG[fbdev] = "-Ddeprecated-backend-fbdev=true,-Ddeprecated-backend-fbdev=false,udev mtdev" |
71 | # Weston on RDP | 71 | # Weston on RDP |
72 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" | 72 | PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp" |
73 | # weston-launch | 73 | # weston-launch |
74 | PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" | 74 | PACKAGECONFIG[launch] = "-Ddeprecated-weston-launch=true,-Ddeprecated-weston-launch=false,drm" |
75 | # VA-API desktop recorder | 75 | # VA-API desktop recorder |
76 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" | 76 | PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" |
77 | # Weston with EGL support | 77 | # Weston with EGL support |
@@ -87,11 +87,9 @@ PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" | |||
87 | # colord CMS support | 87 | # colord CMS support |
88 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" | 88 | PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" |
89 | # Clients support | 89 | # Clients support |
90 | PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | 90 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" |
91 | # Virtual remote output with GStreamer on DRM backend | 91 | # Virtual remote output with GStreamer on DRM backend |
92 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" | 92 | PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" |
93 | # Weston with PAM support | ||
94 | PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" | ||
95 | # Weston with screen-share support | 93 | # Weston with screen-share support |
96 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" | 94 | PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" |
97 | # Traditional desktop shell | 95 | # Traditional desktop shell |
@@ -102,6 +100,8 @@ PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=fa | |||
102 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" | 100 | PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" |
103 | # JPEG image loading support | 101 | # JPEG image loading support |
104 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" | 102 | PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" |
103 | # support libseat based launch | ||
104 | PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd" | ||
105 | 105 | ||
106 | do_install:append() { | 106 | do_install:append() { |
107 | # Weston doesn't need the .la files to load modules, so wipe them | 107 | # Weston doesn't need the .la files to load modules, so wipe them |
@@ -158,14 +158,12 @@ SUMMARY = "Weston, a Wayland compositor, i.MX fork" | |||
158 | 158 | ||
159 | DEFAULT_PREFERENCE = "-1" | 159 | DEFAULT_PREFERENCE = "-1" |
160 | 160 | ||
161 | SRCBRANCH = "weston-imx-9.0" | 161 | SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" |
162 | SRC_URI:remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | 162 | SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} " |
163 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | 163 | SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch" |
164 | " | 164 | SRCBRANCH = "weston-imx-10.0" |
165 | SRC_URI:prepend = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ | 165 | SRCREV = "c8c6e3106b03441db1037afa995f95fcb2f9f17d" |
166 | file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch \ | 166 | |
167 | " | ||
168 | SRCREV = "7859a762617682bd804e210ad3bda6bdcd3ea24a" | ||
169 | S = "${WORKDIR}/git" | 167 | S = "${WORKDIR}/git" |
170 | 168 | ||
171 | # Disable OpenGL for parts with GPU support for 2D but not 3D | 169 | # Disable OpenGL for parts with GPU support for 2D but not 3D |
@@ -177,18 +175,19 @@ PACKAGECONFIG_OPENGL:imxgpu2d = "" | |||
177 | PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" | 175 | PACKAGECONFIG_OPENGL:imxgpu3d = "opengl" |
178 | 176 | ||
179 | PACKAGECONFIG:remove = "wayland x11" | 177 | PACKAGECONFIG:remove = "wayland x11" |
180 | PACKAGECONFIG:append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" | 178 | PACKAGECONFIG:append = " \ |
179 | rdp \ | ||
180 | ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" | ||
181 | 181 | ||
182 | PACKAGECONFIG:remove:imxfbdev = "kms" | 182 | PACKAGECONFIG:remove:imxfbdev = "kms" |
183 | PACKAGECONFIG:append:imxfbdev = " fbdev clients" | 183 | PACKAGECONFIG:append:imxfbdev = " fbdev clients" |
184 | PACKAGECONFIG:append:imxgpu = " imxgpu" | 184 | PACKAGECONFIG:append:imxgpu = " imxgpu" |
185 | PACKAGECONFIG:append:imxgpu2d = " imxg2d" | 185 | PACKAGECONFIG:append:imxgpu2d = " imxg2d" |
186 | 186 | ||
187 | # Clients support | 187 | SIMPLECLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" |
188 | SIMPLE_CLIENTS = "all" | 188 | |
189 | SIMPLE_CLIENTS:imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" | 189 | # Override |
190 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" | 190 | PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor" |
191 | PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" | ||
192 | # Weston with i.MX GPU support | 191 | # Weston with i.MX GPU support |
193 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" | 192 | PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" |
194 | # Weston with i.MX G2D renderer | 193 | # Weston with i.MX G2D renderer |
@@ -196,6 +195,11 @@ PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d | |||
196 | # Weston with OpenGL support | 195 | # Weston with OpenGL support |
197 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" | 196 | PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" |
198 | 197 | ||
198 | PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" | ||
199 | EXTRA_OEMESON:append:imxfbdev = " -Dbackend-default=fbdev" | ||
200 | |||
201 | EXTRA_OEMESON += "-Ddeprecated-wl-shell=true" | ||
202 | |||
199 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" | 203 | PACKAGE_ARCH = "${MACHINE_SOCARCH}" |
200 | COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" | 204 | COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" |
201 | 205 | ||
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.3.p4.0.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.3.p4.2.bb index 12de35be..a2aef18d 100644 --- a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.3.p4.0.bb +++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.3.p4.2.bb | |||
@@ -7,14 +7,12 @@ allowing flexibility to use a newer graphics release with an older kernel." | |||
7 | LICENSE = "GPL-2.0-only" | 7 | LICENSE = "GPL-2.0-only" |
8 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" | 8 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6" |
9 | 9 | ||
10 | SRC_URI = "${KERNEL_SRC};subpath=drivers/mxc/gpu-viv;destsuffix=git/src \ | ||
11 | file://Add-makefile.patch" | ||
12 | KERNEL_SRC ?= "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=${SRCBRANCH}" | ||
10 | SRCBRANCH = "lf-5.15.y" | 13 | SRCBRANCH = "lf-5.15.y" |
11 | LOCALVERSION = "-5.15.5-1.0.0" | 14 | LOCALVERSION = "-5.15.32-2.0.0" |
12 | KERNEL_SRC ?= "git://source.codeaurora.org/external/imx/linux-imx.git;protocol=https;branch=master" | 15 | SRCREV = "545fd17e9f396c78c692e8abf06e36c5df0f5c69" |
13 | SRC_URI = " \ | ||
14 | ${KERNEL_SRC};branch=${SRCBRANCH};subpath=drivers/mxc/gpu-viv;destsuffix=git/src \ | ||
15 | file://Add-makefile.patch \ | ||
16 | " | ||
17 | SRCREV = "e47e5ff6895a7aa2f75dcb2e2c7257e25cf77901" | ||
18 | 16 | ||
19 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
20 | 18 | ||
diff --git a/recipes-kernel/kernel-modules/kernel-module-isp-vvcam/0001-dwe_isr.c-fix-error-found-by-gcc12.patch b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam/0001-dwe_isr.c-fix-error-found-by-gcc12.patch deleted file mode 100644 index f317a08d..00000000 --- a/recipes-kernel/kernel-modules/kernel-module-isp-vvcam/0001-dwe_isr.c-fix-error-found-by-gcc12.patch +++ /dev/null | |||
@@ -1,55 +0,0 @@ | |||
1 | From 95c353810b55b30a70f1317369fcb179b444f2da Mon Sep 17 00:00:00 2001 | ||
2 | From: Max Krummenacher <max.krummenacher@toradex.com> | ||
3 | Date: Tue, 17 May 2022 14:49:55 +0000 | ||
4 | Subject: [PATCH] dwe_isr.c: fix error found by gcc12 | ||
5 | |||
6 | | .../vvcam/v4l2/../dwe/dwe_isr.c: In function 'update_dma_buffer': | ||
7 | | .../vvcam/v4l2/../dwe/dwe_isr.c:107:47: error: the comparison will always evaluate as 'false' for the address of 'dist_map' will never be NULL [-Werror=address] | ||
8 | | 107 | if (dev->dist_map[dev->index] == NULL) { | ||
9 | | | ^~ | ||
10 | | cc1: all warnings being treated as errors | ||
11 | | .../vvcam/v4l2/../dwe/dwe_dev.h:109:20: note: 'dist_map' declared here | ||
12 | | 109 | dma_addr_t dist_map[MAX_DWE_NUM][MAX_CFG_NUM]; | ||
13 | | | ^~~~~~~~ | ||
14 | | cc1: all warnings being treated as errors | ||
15 | |||
16 | Taking just one element of the first dimension of a multi-dimensional | ||
17 | array always returns a valid pointer. | ||
18 | |||
19 | Likely what was meant is to check if the later used element | ||
20 | ( dev->dist_map[dev->index][which] ) contains NULL but that isn't | ||
21 | what the code does. | ||
22 | Change the code according to that assumption. | ||
23 | |||
24 | Upstream-Status: Pending | ||
25 | |||
26 | Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> | ||
27 | --- | ||
28 | vvcam/dwe/dwe_isr.c | 4 ++-- | ||
29 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
30 | |||
31 | diff --git a/vvcam/dwe/dwe_isr.c b/vvcam/dwe/dwe_isr.c | ||
32 | index ba74302..73ef83b 100644 | ||
33 | --- a/vvcam/dwe/dwe_isr.c | ||
34 | +++ b/vvcam/dwe/dwe_isr.c | ||
35 | @@ -104,7 +104,8 @@ static int update_dma_buffer(struct dwe_ic_dev *dev) | ||
36 | continue; | ||
37 | } | ||
38 | |||
39 | - if (dev->dist_map[dev->index] == NULL) { | ||
40 | + which = dev->which[dev->index]; | ||
41 | + if (dev->dist_map[dev->index][which] == (dma_addr_t)NULL) { | ||
42 | vvbuf_ready(dev->sink_bctx, dev->src->pad, dev->src); | ||
43 | dev->src = NULL; | ||
44 | dev->error = BUF_ERR_WRONGSTATE; | ||
45 | @@ -121,7 +122,6 @@ static int update_dma_buffer(struct dwe_ic_dev *dev) | ||
46 | } | ||
47 | } while(dev->dst == NULL); | ||
48 | |||
49 | - which = dev->which[dev->index]; | ||
50 | dwe_s_params(dev, &dev->info[dev->index][which]); | ||
51 | dwe_set_buffer(dev, &dev->info[dev->index][which], dev->dst->dma); | ||
52 | dwe_set_lut(dev, dev->dist_map[dev->index][which]); | ||
53 | -- | ||
54 | 2.20.1 | ||
55 | |||
diff --git a/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.16.0.bb b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.18.0.bb index c5356495..078f6a61 100644 --- a/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.16.0.bb +++ b/recipes-kernel/kernel-modules/kernel-module-isp-vvcam_4.2.2.18.0.bb | |||
@@ -4,14 +4,10 @@ DESCRIPTION = "Kernel loadable module for ISP" | |||
4 | LICENSE = "GPL-2.0-only" | 4 | LICENSE = "GPL-2.0-only" |
5 | LIC_FILES_CHKSUM = "file://${S}/../LICENSE;md5=64381a6ea83b48c39fe524c85f65fb44" | 5 | LIC_FILES_CHKSUM = "file://${S}/../LICENSE;md5=64381a6ea83b48c39fe524c85f65fb44" |
6 | 6 | ||
7 | SRCBRANCH = "lf-5.10.y_2.2.0" | 7 | SRC_URI = "${ISP_KERNEL_SRC};branch=${SRCBRANCH}" |
8 | ISP_KERNEL_SRC ?= "git://source.codeaurora.org/external/imx/isp-vvcam.git;protocol=https;branch=master" | 8 | ISP_KERNEL_SRC ?= "git://source.codeaurora.org/external/imx/isp-vvcam.git;protocol=https" |
9 | 9 | SRCBRANCH = "lf-5.15.y_2.0.0" | |
10 | SRC_URI = " \ | 10 | SRCREV = "551415470092d6af1d7e11e7a78591f5800333f9" |
11 | ${ISP_KERNEL_SRC};branch=${SRCBRANCH} \ | ||
12 | file://0001-dwe_isr.c-fix-error-found-by-gcc12.patch;patchdir=${WORKDIR}/git \ | ||
13 | " | ||
14 | SRCREV = "b2321c0c513322aca8187ebf0328b74fe45a0f01" | ||
15 | 11 | ||
16 | S = "${WORKDIR}/git/vvcam/v4l2" | 12 | S = "${WORKDIR}/git/vvcam/v4l2" |
17 | 13 | ||
diff --git a/recipes-security/optee-imx/optee-os/0008-no-warn-rwx-segments.patch b/recipes-security/optee-imx/optee-os/0008-no-warn-rwx-segments.patch new file mode 100644 index 00000000..1dd70b31 --- /dev/null +++ b/recipes-security/optee-imx/optee-os/0008-no-warn-rwx-segments.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | Signed-off-by: Anton Antonov <Anton.Antonov@arm.com> | ||
2 | Upstream-Status: Backport [https://github.com/OP-TEE/optee_os/pull/5474] | ||
3 | |||
4 | From 0b8a917fa51a366806edc0f04b88cd23b24098c4 Mon Sep 17 00:00:00 2001 | ||
5 | From: Jerome Forissier <jerome.forissier@linaro.org> | ||
6 | Date: Fri, 5 Aug 2022 09:48:03 +0200 | ||
7 | Subject: [PATCH] core: link: add --no-warn-rwx-segments | ||
8 | |||
9 | binutils ld.bfd generates one RWX LOAD segment by merging several sections | ||
10 | with mixed R/W/X attributes (.text, .rodata, .data). After version 2.38 it | ||
11 | also warns by default when that happens [1], which breaks the build due to | ||
12 | --fatal-warnings. The RWX segment is not a problem for the TEE core, since | ||
13 | that information is not used to set memory permissions. Therefore, silence | ||
14 | the warning. | ||
15 | |||
16 | Link: [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ba951afb99912da01a6e8434126b8fac7aa75107 | ||
17 | Link: https://sourceware.org/bugzilla/show_bug.cgi?id=29448 | ||
18 | Reported-by: Dominique Martinet <dominique.martinet@atmark-techno.com> | ||
19 | Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> | ||
20 | Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | ||
21 | --- | ||
22 | core/arch/arm/kernel/link.mk | 8 ++++++-- | ||
23 | 1 file changed, 6 insertions(+), 2 deletions(-) | ||
24 | |||
25 | diff --git a/core/arch/arm/kernel/link.mk b/core/arch/arm/kernel/link.mk | ||
26 | index 7eed333a32..c39d43cbfc 100644 | ||
27 | --- a/core/arch/arm/kernel/link.mk | ||
28 | +++ b/core/arch/arm/kernel/link.mk | ||
29 | @@ -31,6 +31,7 @@ link-ldflags += -T $(link-script-pp) -Map=$(link-out-dir)/tee.map | ||
30 | link-ldflags += --sort-section=alignment | ||
31 | link-ldflags += --fatal-warnings | ||
32 | link-ldflags += --gc-sections | ||
33 | +link-ldflags += $(call ld-option,--no-warn-rwx-segments) | ||
34 | |||
35 | link-ldadd = $(LDADD) | ||
36 | link-ldadd += $(ldflags-external) | ||
37 | @@ -55,6 +56,7 @@ link-script-cppflags := \ | ||
38 | $(cppflagscore)) | ||
39 | |||
40 | ldargs-all_objs := -T $(link-script-dummy) --no-check-sections \ | ||
41 | + $(call ld-option,--no-warn-rwx-segments) \ | ||
42 | $(link-objs) $(link-ldadd) $(libgcccore) | ||
43 | cleanfiles += $(link-out-dir)/all_objs.o | ||
44 | $(link-out-dir)/all_objs.o: $(objs) $(libdeps) $(MAKEFILE_LIST) | ||
45 | @@ -67,7 +69,8 @@ $(link-out-dir)/unpaged_entries.txt: $(link-out-dir)/all_objs.o | ||
46 | $(q)$(NMcore) $< | \ | ||
47 | $(AWK) '/ ____keep_pager/ { printf "-u%s ", $$3 }' > $@ | ||
48 | |||
49 | -unpaged-ldargs = -T $(link-script-dummy) --no-check-sections --gc-sections | ||
50 | +unpaged-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections \ | ||
51 | + $(call ld-option,--no-warn-rwx-segments) | ||
52 | unpaged-ldadd := $(objs) $(link-ldadd) $(libgcccore) | ||
53 | cleanfiles += $(link-out-dir)/unpaged.o | ||
54 | $(link-out-dir)/unpaged.o: $(link-out-dir)/unpaged_entries.txt | ||
55 | @@ -95,7 +98,8 @@ $(link-out-dir)/init_entries.txt: $(link-out-dir)/all_objs.o | ||
56 | $(q)$(NMcore) $< | \ | ||
57 | $(AWK) '/ ____keep_init/ { printf "-u%s ", $$3 }' > $@ | ||
58 | |||
59 | -init-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections | ||
60 | +init-ldargs := -T $(link-script-dummy) --no-check-sections --gc-sections \ | ||
61 | + $(call ld-option,--no-warn-rwx-segments) | ||
62 | init-ldadd := $(link-objs-init) $(link-out-dir)/version.o $(link-ldadd) \ | ||
63 | $(libgcccore) | ||
64 | cleanfiles += $(link-out-dir)/init.o | ||
diff --git a/recipes-security/optee-imx/optee-os_3.17.0.imx.bb b/recipes-security/optee-imx/optee-os_3.17.0.imx.bb index 6e34eb9a..93e0ff6e 100644 --- a/recipes-security/optee-imx/optee-os_3.17.0.imx.bb +++ b/recipes-security/optee-imx/optee-os_3.17.0.imx.bb | |||
@@ -12,6 +12,10 @@ SRC_URI = "git://source.codeaurora.org/external/imx/imx-optee-os.git;protocol=ht | |||
12 | SRCBRANCH = "lf-5.15.32_2.0.0" | 12 | SRCBRANCH = "lf-5.15.32_2.0.0" |
13 | SRCREV = "984996422c25c99ebfc5194c1bb393028605bb0c" | 13 | SRCREV = "984996422c25c99ebfc5194c1bb393028605bb0c" |
14 | 14 | ||
15 | SRC_URI:append = " \ | ||
16 | file://0008-no-warn-rwx-segments.patch \ | ||
17 | " | ||
18 | |||
15 | S = "${WORKDIR}/git" | 19 | S = "${WORKDIR}/git" |
16 | 20 | ||
17 | inherit deploy python3native autotools features_check | 21 | inherit deploy python3native autotools features_check |