From 6d4cb5ab7a5041dcb7cb611e1d66f97c3508efe9 Mon Sep 17 00:00:00 2001 From: Mike Engel Date: Fri, 5 Feb 2021 15:25:42 +0100 Subject: [PATCH] recipes-graphics: wayland: Update recipes to new BSP release imx_5.4.70_2.3.0 Signed-off-by: Mike Engel --- .../wayland/wayland-protocols_1.18.imx.bb | 7 - .../wayland/wayland-protocols_1.20.imx.bb | 26 ++++ ...build-Fix-strndup-detection-on-MinGW.patch | 34 +++++ ...missing-dependencies-on-protocol-hea.patch | 115 +++++++++++++++ ...hardcode-the-path-to-wayland-scanner.patch | 26 ++++ ...-the-native-wayland-scanner-directly.patch | 27 ++++ .../wayland/wayland/run-ptest | 17 +++ .../wayland/wayland_1.18.0.bb | 60 +++++++- .../wayland/weston-init.bbappend | 6 + .../wayland/weston-init/weston.ini | 6 +- ...ntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch | 47 +++++++ ...ovide-a-default-version-that-doesn-t.patch | 54 ++++---- .../weston/dont-use-plane-add-prop.patch | 23 +++ .../recipes-graphics/wayland/weston_9.0.0.bb | 131 ++++++++++++++++++ ...eston_8.0.0.imx.bb => weston_9.0.0.imx.bb} | 6 +- 15 files changed, 546 insertions(+), 39 deletions(-) delete mode 100644 meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb create mode 100644 meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb create mode 100644 meta-digi-dey/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch create mode 100644 meta-digi-dey/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch create mode 100644 meta-digi-dey/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch create mode 100644 meta-digi-dey/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch create mode 100644 meta-digi-dey/recipes-graphics/wayland/wayland/run-ptest create mode 100644 meta-digi-dey/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch create mode 100644 meta-digi-dey/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch create mode 100644 meta-digi-dey/recipes-graphics/wayland/weston_9.0.0.bb rename meta-digi-dey/recipes-graphics/wayland/{weston_8.0.0.imx.bb => weston_9.0.0.imx.bb} (91%) diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb b/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb deleted file mode 100644 index 8ba8f9ee8..000000000 --- a/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb +++ /dev/null @@ -1,7 +0,0 @@ -require recipes-graphics/wayland/wayland-protocols_1.17.imx.bb - -WAYLAND_PROTOCOLS_SRC ?= "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https" -SRCBRANCH = "wayland-protocols-imx-1.18" -SRC_URI = "${WAYLAND_PROTOCOLS_SRC};branch=${SRCBRANCH} " -SRCREV = "ee18c1f66877f7fb652467c349108395c20d4f9a" -S = "${WORKDIR}/git" diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb b/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb new file mode 100644 index 000000000..7928ec16f --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/wayland-protocols_1.20.imx.bb @@ -0,0 +1,26 @@ +SUMMARY = "Collection of additional Wayland protocols" +DESCRIPTION = "Wayland protocols that add functionality not \ +available in the Wayland core protocol. Such protocols either add \ +completely new functionality, or extend the functionality of some other \ +protocol either in Wayland core, or some other protocol in \ +wayland-protocols." +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ + file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" + +WAYLAND_PROTOCOLS_SRC ?= "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https" +SRCBRANCH = "wayland-protocols-imx-1.20" +SRC_URI = "${WAYLAND_PROTOCOLS_SRC};branch=${SRCBRANCH} " +SRCREV = "9cacf108d0ee5863c7a656da5d2271bc2396e43d" +S = "${WORKDIR}/git" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit autotools pkgconfig + +PACKAGES = "${PN}" +FILES_${PN} += "${datadir}/pkgconfig/wayland-protocols.pc" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch b/meta-digi-dey/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch new file mode 100644 index 000000000..c2ceae4a4 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch @@ -0,0 +1,34 @@ +From e6783c99f051c6d8252db5f388d805cef0e16357 Mon Sep 17 00:00:00 2001 +From: Joshua Watt +Date: Thu, 20 Feb 2020 15:20:45 -0600 +Subject: [PATCH] build: Fix strndup detection on MinGW + +GCC and meson conspire together to incorrectly detect that strndup() +exists on MinGW as __builtin_strndup, when no such function exists. As a +work around, meson will skip looking for __builtin functions if an +'#include' is in the prefix, so add '#include ' when looking +for strndup(). + +See: https://github.com/mesonbuild/meson/issues/3672 + +Signed-off-by: Joshua Watt +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63] +--- + meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/meson.build ++++ b/meson.build +@@ -36,11 +36,11 @@ have_funcs = [ + 'posix_fallocate', + 'prctl', + 'memfd_create', +- 'strndup', + ] + foreach f: have_funcs + config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) + endforeach ++config_h.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup')) + + if get_option('libraries') + ffi_dep = dependency('libffi') diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch b/meta-digi-dey/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch new file mode 100644 index 000000000..61de0e04e --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/wayland/0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch @@ -0,0 +1,115 @@ +From b2c74f6a3dbe0aee2413800837314136947a4985 Mon Sep 17 00:00:00 2001 +From: Jan Beich +Date: Sat, 15 Feb 2020 02:03:45 +0000 +Subject: [PATCH] meson/tests: add missing dependencies on protocol headers + +In file included from ../tests/connection-test.c:43: +In file included from ../tests/test-compositor.h:30: +../src/wayland-client.h:40:10: fatal error: 'wayland-client-protocol.h' file not found + #include "wayland-client-protocol.h" + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +In file included from ../tests/display-test.c:45: +In file included from ../src/wayland-server.h:104: +src/wayland-server-protocol.h:4454:2: error: unterminated /* comment + /** + ^ +In file included from ../tests/cpp-compile-test.cpp:2: +In file included from src/wayland-server-protocol.h:8: +In file included from ../src/wayland-server.h:104: +src/wayland-server-protocol.h:3:2: error: unterminated conditional directive + #ifndef WAYLAND_SERVER_PROTOCOL_H + ^ +../tests/headers-protocol-test.c:33:2: error: including wayland-server-protocol.h did not include wayland-server.h! + #error including wayland-server-protocol.h did not include wayland-server.h! + ^ +In file included from ../tests/headers-protocol-test.c:26: +In file included from src/wayland-client-protocol.h:8: +In file included from ../src/wayland-client.h:40: +src/wayland-client-protocol.h:1358:2: error: unterminated conditional directive + #ifndef WL_SHM_FORMAT_ENUM + ^ +In file included from ../tests/protocol-logger-test.c:34: +In file included from ../src/wayland-client.h:40: +src/wayland-client-protocol.h:2613:1: error: unterminated /* comment +/** +^ +../tests/resources-test.c:49:36: error: use of undeclared identifier 'wl_seat_interface' + res = wl_resource_create(client, &wl_seat_interface, 4, 0); + ^ +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin +--- + tests/meson.build | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) + +diff --git a/tests/meson.build b/tests/meson.build +index c28a2a3..f1af7b4 100644 +--- a/tests/meson.build ++++ b/tests/meson.build +@@ -69,7 +69,7 @@ test( + executable( + 'cpp-compile-test', + 'cpp-compile-test.cpp', +- wayland_server_protocol_core_h, ++ wayland_server_protocol_h, + include_directories: src_inc + ) + ) +@@ -91,17 +91,25 @@ tests = { + 'array-test': [], + 'client-test': [ wayland_server_protocol_h ], + 'display-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + tests_server_protocol_h, + tests_client_protocol_c, + tests_protocol_c, + ], +- 'connection-test': [ wayland_server_protocol_h ], ++ 'connection-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, ++ ], + 'event-loop-test': [ wayland_server_protocol_h ], + 'fixed-test': [], + 'interface-test': [ wayland_client_protocol_h ], + 'list-test': [], + 'map-test': [], +- 'sanity-test' : [ wayland_server_protocol_h ], ++ 'sanity-test' : [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, ++ ], + 'socket-test': [ + wayland_client_protocol_h, + wayland_server_protocol_h, +@@ -116,7 +124,7 @@ tests = { + files('../src/wayland-server.c'), + wayland_server_protocol_h, + ], +- 'resources-test': [ wayland_server_protocol_core_h ], ++ 'resources-test': [ wayland_server_protocol_h ], + 'message-test': [ + wayland_client_protocol_h, + wayland_server_protocol_h, +@@ -126,14 +134,16 @@ tests = { + wayland_server_protocol_h, + ], + 'protocol-logger-test': [ +- wayland_server_protocol_core_h, +- wayland_client_protocol_core_h, ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + ], + 'headers-test': [ ++ wayland_client_protocol_h, ++ wayland_server_protocol_h, + 'headers-protocol-test.c', +- 'headers-protocol-core-test.c', +- wayland_server_protocol_core_h, + wayland_client_protocol_core_h, ++ wayland_server_protocol_core_h, ++ 'headers-protocol-core-test.c', + ], + 'os-wrappers-test': [], + } diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch b/meta-digi-dey/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch new file mode 100644 index 000000000..2199548bd --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/wayland/0002-Do-not-hardcode-the-path-to-wayland-scanner.patch @@ -0,0 +1,26 @@ +From cbb28635a1079d68e62dbaa1e21791a20dbbbaf4 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Mon, 17 Feb 2020 21:46:18 +0100 +Subject: [PATCH] Do not hardcode the path to wayland-scanner + +This results in host contamination during builds. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + src/meson.build | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/meson.build b/src/meson.build +index 294aee0..7e410fa 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -49,7 +49,7 @@ pkgconfig.generate( + 'datarootdir=' + join_paths('${prefix}', get_option('datadir')), + 'pkgdatadir=' + join_paths('${datarootdir}', meson.project_name()), + 'bindir=' + join_paths('${prefix}', get_option('bindir')), +- 'wayland_scanner=${bindir}/wayland-scanner' ++ 'wayland_scanner=wayland-scanner' + ], + filebase: 'wayland-scanner' + ) diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch b/meta-digi-dey/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch new file mode 100644 index 000000000..f98037a85 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/wayland/0002-meson.build-find-the-native-wayland-scanner-directly.patch @@ -0,0 +1,27 @@ +From 2582d2653ba80917d7bc47088e1a5f49530fddaa Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Sun, 16 Feb 2020 16:29:53 +0100 +Subject: [PATCH] meson.build: find the native wayland-scanner directly in PATH + +Otherwise, meson attempts to use the target pkg-config and fails. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin +--- + src/meson.build | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/src/meson.build b/src/meson.build +index 3e8c9bf..294aee0 100644 +--- a/src/meson.build ++++ b/src/meson.build +@@ -55,8 +55,7 @@ pkgconfig.generate( + ) + + if meson.is_cross_build() +- scanner_dep = dependency('wayland-scanner', native: true, version: '>=1.14.0') +- wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner')) ++ wayland_scanner_for_build = find_program('wayland-scanner') + else + wayland_scanner_for_build = wayland_scanner + endif diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland/run-ptest b/meta-digi-dey/recipes-graphics/wayland/wayland/run-ptest new file mode 100644 index 000000000..7e8d9de04 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/wayland/run-ptest @@ -0,0 +1,17 @@ +#!/bin/sh + +export WAYLAND_SCANNER=wayland-scanner +export TEST_DATA_DIR=tests/data +export TEST_OUTPUT_DIR=tests/output +export SED=sed +export WAYLAND_EGL_LIB=/usr/lib/libwayland-egl.so.1 +export NM=nm + +for i in `ls tests/*-test tests/wayland-egl-symbols-check tests/scanner-test.sh`; do + $i + if [ $? -eq 0 ]; then + echo "PASS: $i" + else + echo "FAIL: $i" + fi +done diff --git a/meta-digi-dey/recipes-graphics/wayland/wayland_1.18.0.bb b/meta-digi-dey/recipes-graphics/wayland/wayland_1.18.0.bb index 19bcdf1fe..00be3aac2 100644 --- a/meta-digi-dey/recipes-graphics/wayland/wayland_1.18.0.bb +++ b/meta-digi-dey/recipes-graphics/wayland/wayland_1.18.0.bb @@ -1,4 +1,62 @@ -require recipes-graphics/wayland/wayland_1.17.0.bb +SUMMARY = "Wayland, a protocol between a compositor and clients" +DESCRIPTION = "Wayland is a protocol for a compositor to talk to its clients \ +as well as a C library implementation of that protocol. The compositor can be \ +a standalone display server running on Linux kernel modesetting and evdev \ +input devices, an X application, or a wayland client itself. The clients can \ +be traditional applications, X servers (rootless or fullscreen) or other \ +display servers." +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=b31d8f53b6aaf2b4985d7dd7810a70d1 \ + file://src/wayland-server.c;endline=24;md5=b8e046164a766bb1ede8ba38e9dcd7ce" +DEPENDS = "expat libffi wayland-native" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://run-ptest \ + file://0002-meson.build-find-the-native-wayland-scanner-directly.patch \ + file://0002-Do-not-hardcode-the-path-to-wayland-scanner.patch \ + file://0001-build-Fix-strndup-detection-on-MinGW.patch \ + file://0001-meson-tests-add-missing-dependencies-on-protocol-hea.patch \ + " SRC_URI[md5sum] = "23317697b6e3ff2e1ac8c5ba3ed57b65" SRC_URI[sha256sum] = "4675a79f091020817a98fd0484e7208c8762242266967f55a67776936c2e294d" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit meson pkgconfig ptest + +PACKAGECONFIG ??= "dtd-validation" +PACKAGECONFIG[dtd-validation] = "-Ddtd_validation=true,-Ddtd_validation=false,libxml2,," + +EXTRA_OEMESON = "-Ddocumentation=false" +EXTRA_OEMESON_class-native = "-Ddocumentation=false -Dlibraries=false" + +# Wayland installs a M4 macro for other projects to use, which uses the target +# pkg-config to find files. Replace pkg-config with pkg-config-native. +do_install_append_class-native() { + sed -e 's,PKG_CHECK_MODULES(.*),,g' \ + -e 's,$PKG_CONFIG,pkg-config-native,g' \ + -i ${D}/${datadir}/aclocal/wayland-scanner.m4 +} + +do_install_ptest() { + mkdir -p ${D}${PTEST_PATH}/tests/data + cp -rf ${B}/tests/*-test ${B}/tests/*-checker ${D}${PTEST_PATH}/tests + cp -rf ${B}/tests/*-checker ${D}${PTEST_PATH} + cp -rf ${S}/tests/scanner-test.sh ${D}${PTEST_PATH}/tests + cp -rf ${S}/tests/data/* ${D}${PTEST_PATH}/tests/data/ + cp -rf ${S}/egl/wayland-egl-symbols-check ${D}${PTEST_PATH}/tests/ +} + +sysroot_stage_all_append_class-target () { + rm ${SYSROOT_DESTDIR}/${datadir}/aclocal/wayland-scanner.m4 + cp ${STAGING_DATADIR_NATIVE}/aclocal/wayland-scanner.m4 ${SYSROOT_DESTDIR}/${datadir}/aclocal/ +} + +FILES_${PN} = "${libdir}/*${SOLIBS}" +FILES_${PN}-dev += "${bindir} ${datadir}/wayland" + +BBCLASSEXTEND = "native nativesdk" + +RDEPENDS_${PN}-ptest += "binutils sed" diff --git a/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend b/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend index 2b3e593bd..6673d4b18 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend +++ b/meta-digi-dey/recipes-graphics/wayland/weston-init.bbappend @@ -15,6 +15,12 @@ SRC_URI += " \ INI_UNCOMMENT_ASSIGNMENTS_append_mx8mp = " \ use-g2d=1 \ " +INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \ + drm-device=card0 \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx8 = " \ + repaint-window=16 \ +" # Digi: use g2d on ccimx6sbc to fix desktop window issue # Also needed to workaround an HDMI hotplug issue on the ccimx6qpsbc diff --git a/meta-digi-dey/recipes-graphics/wayland/weston-init/weston.ini b/meta-digi-dey/recipes-graphics/wayland/weston-init/weston.ini index 9e8bde4d3..1fec1d696 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston-init/weston.ini +++ b/meta-digi-dey/recipes-graphics/wayland/weston-init/weston.ini @@ -3,6 +3,8 @@ idle-time=0 #use-g2d=1 #xwayland=true +#drm-device=card0 +#repaint-window=16 #enable-overlay-view=1 #[shell] @@ -14,7 +16,7 @@ touchscreen_calibrator=true #[output] #name=HDMI-A-1 #mode=1920x1080@60 -#transform=90 +#transform=rotate-90 #[output] #name=HDMI-A-2 @@ -23,7 +25,7 @@ touchscreen_calibrator=true # off Disables the output # preferred Uses the preferred mode # current Uses the current crt controller mode -#transform=90 +#transform=rotate-90 [screen-share] command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch new file mode 100644 index 000000000..6fe86ff3f --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/weston/0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch @@ -0,0 +1,47 @@ +From 58760e09eed662a72da939ff4802d605489cff8e Mon Sep 17 00:00:00 2001 +From: Denys Dmytriyenko +Date: Tue, 8 Sep 2020 19:37:42 -0400 +Subject: [PATCH] tests: include fcntl.h for open(), O_RDWR, O_CLOEXEC and + O_CREAT + +musl libc (unlike glibc) requires explicitly incuding fcntl.h to define open(), +O_RDWR, O_CLOEXEC and O_CREAT. Otherwise the build fails with the errors: + +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c: In function 'wait_for_lock': +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:7: warning: implicit declaration of function 'open'; did you mean 'popen'? [-Wimplicit-function-declaration] +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~ +| | popen +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: error: 'O_RDWR' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:23: note: each undeclared identifier is reported only once for each function it appears in +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:32: error: 'O_CLOEXEC' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~~~ +| ../weston-9.0.0/tests/weston-test-fixture-compositor.c:135:44: error: 'O_CREAT' undeclared (first use in this function) +| 135 | fd = open(lock_path, O_RDWR | O_CLOEXEC | O_CREAT, 00700); +| | ^~~~~~~ + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/493/diffs?commit_id=b10c0e843dcb8148bbe869bb15261955b94ac98c] + +Signed-off-by: Denys Dmytriyenko +--- + tests/weston-test-fixture-compositor.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tests/weston-test-fixture-compositor.c b/tests/weston-test-fixture-compositor.c +index 0c9855f..e0e32c9 100644 +--- a/tests/weston-test-fixture-compositor.c ++++ b/tests/weston-test-fixture-compositor.c +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + #include "shared/helpers.h" + #include "weston-test-fixture-compositor.h" +-- +2.7.4 + diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index 1e24abf82..3279a728c 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/meta-digi-dey/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -1,7 +1,8 @@ -From 682b7d79a7b81ec8e38760381104b24ad549e8c0 Mon Sep 17 00:00:00 2001 +From a1548c742bf2dedbb47282d8a00407b60bbab669 Mon Sep 17 00:00:00 2001 From: Tom Hochstein Date: Wed, 22 Feb 2017 15:53:30 +0200 Subject: [PATCH] weston-launch: Provide a default version that doesn't require + PAM weston-launch requires PAM for starting weston as a non-root user. @@ -16,17 +17,18 @@ Signed-off-by: Tom Hochstein Signed-off-by: Jussi Kukkonen Signed-off-by: Denys Dmytriyenko Signed-off-by: Ming Liu + --- libweston/meson.build | 16 ++++++++++++---- libweston/weston-launch.c | 21 +++++++++++++++++++++ meson_options.txt | 7 +++++++ 3 files changed, 40 insertions(+), 4 deletions(-) -Index: git/libweston/meson.build -=================================================================== ---- git.orig/libweston/meson.build -+++ git/libweston/meson.build -@@ -224,16 +224,24 @@ dep_vertex_clipping = declare_dependency +diff --git a/libweston/meson.build b/libweston/meson.build +index 08d23ec..cb9fd3f 100644 +--- a/libweston/meson.build ++++ b/libweston/meson.build +@@ -216,16 +216,24 @@ dep_vertex_clipping = declare_dependency( ) if get_option('weston-launch') @@ -55,10 +57,10 @@ Index: git/libweston/meson.build include_directories: common_inc, install: true ) -Index: git/libweston/weston-launch.c -=================================================================== ---- git.orig/libweston/weston-launch.c -+++ git/libweston/weston-launch.c +diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c +index 521cb2c..2d42d33 100644 +--- a/libweston/weston-launch.c ++++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ #include @@ -80,7 +82,7 @@ Index: git/libweston/weston-launch.c int tty; int ttynr; int sock[2]; -@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_laun +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) return false; } @@ -96,7 +98,7 @@ Index: git/libweston/weston-launch.c static int setup_launcher_socket(struct weston_launch *wl) -@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int statu +@@ -466,6 +472,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -104,15 +106,15 @@ Index: git/libweston/weston-launch.c if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int statu +@@ -473,6 +480,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } +#endif - if (ioctl(wl->tty, KDSKBMUTE, 0) && - ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, + /* + * Get a fresh handle to the tty as the previous one is in +@@ -710,6 +718,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1); @@ -120,7 +122,7 @@ Index: git/libweston/weston-launch.c env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, +@@ -718,6 +727,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -128,7 +130,7 @@ Index: git/libweston/weston-launch.c /* * We open a new session, so it makes sense -@@ -745,8 +755,10 @@ static void +@@ -789,8 +799,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -139,7 +141,7 @@ Index: git/libweston/weston-launch.c fprintf(stderr, " -t, --tty Start session on alternative tty,\n" " e.g. -t /dev/tty4, requires -u option.\n"); fprintf(stderr, " -v, --verbose Be verbose\n"); -@@ -760,7 +772,9 @@ main(int argc, char *argv[]) +@@ -804,7 +816,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -149,7 +151,7 @@ Index: git/libweston/weston-launch.c { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -772,11 +786,16 @@ main(int argc, char *argv[]) +@@ -816,11 +830,16 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': @@ -166,7 +168,7 @@ Index: git/libweston/weston-launch.c break; case 't': tty = optarg; -@@ -828,8 +847,10 @@ main(int argc, char *argv[]) +@@ -872,8 +891,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); @@ -177,11 +179,11 @@ Index: git/libweston/weston-launch.c if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); -Index: git/meson_options.txt -=================================================================== ---- git.orig/meson_options.txt -+++ git/meson_options.txt -@@ -101,6 +101,13 @@ option( +diff --git a/meson_options.txt b/meson_options.txt +index 239bd2d..99e4ec3 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -73,6 +73,13 @@ option( ) option( diff --git a/meta-digi-dey/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch b/meta-digi-dey/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch new file mode 100644 index 000000000..a4444e5d1 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/weston/dont-use-plane-add-prop.patch @@ -0,0 +1,23 @@ +Fix atomic modesetting with musl + +atomic modesetting seems to fail with drm weston backend and this patch fixes +it, below errors are seen before weston exits + +atomic: couldn't commit new state: Invalid argument + +Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/weston/-/issues/158] +Signed-off-by: Khem Raj + +--- a/libweston/backend-drm/kms.c ++++ b/libweston/backend-drm/kms.c +@@ -1168,8 +1168,8 @@ drm_pending_state_apply_atomic(struct dr + wl_list_for_each(plane, &b->plane_list, link) { + drm_debug(b, "\t\t[atomic] starting with plane %lu disabled\n", + (unsigned long) plane->plane_id); +- plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); +- plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_CRTC_ID, 0); ++ //plane_add_prop(req, plane, WDRM_PLANE_FB_ID, 0); + } + + flags |= DRM_MODE_ATOMIC_ALLOW_MODESET; diff --git a/meta-digi-dey/recipes-graphics/wayland/weston_9.0.0.bb b/meta-digi-dey/recipes-graphics/wayland/weston_9.0.0.bb new file mode 100644 index 000000000..0b037a377 --- /dev/null +++ b/meta-digi-dey/recipes-graphics/wayland/weston_9.0.0.bb @@ -0,0 +1,131 @@ +SUMMARY = "Weston, a Wayland compositor" +DESCRIPTION = "Weston is the reference implementation of a Wayland compositor" +HOMEPAGE = "http://wayland.freedesktop.org" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \ + file://libweston/compositor.c;endline=27;md5=6c53bbbd99273f4f7c4affa855c33c0a" + +SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ + file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ +" + +SRC_URI_append_libc-musl = " file://dont-use-plane-add-prop.patch " + +SRC_URI[sha256sum] = "5cf5d6ce192e0eb15c1fc861a436bf21b5bb3b91dbdabbdebe83e1f83aa098fe" + +UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" + +inherit meson pkgconfig useradd features_check +# depends on virtual/egl +REQUIRED_DISTRO_FEATURES = "opengl" + +DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0" +DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" + +WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" + +EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false" + +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ + ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \ + ${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \ + launch \ + image-jpeg \ + screenshare \ + shell-desktop \ + shell-fullscreen \ + shell-ivi" + +# +# Compositor choices +# +# Weston on KMS +PACKAGECONFIG[kms] = "-Dbackend-drm=true,-Dbackend-drm=false,drm udev virtual/egl virtual/libgles2 virtual/libgbm mtdev" +# Weston on Wayland (nested Weston) +PACKAGECONFIG[wayland] = "-Dbackend-wayland=true,-Dbackend-wayland=false,virtual/egl virtual/libgles2" +# Weston on X11 +PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libxcb libxcb libxcursor cairo" +# Headless Weston +PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false" +# Weston on framebuffer +PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev" +# weston-launch +PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm" +# VA-API desktop recorder +PACKAGECONFIG[vaapi] = "-Dbackend-drm-screencast-vaapi=true,-Dbackend-drm-screencast-vaapi=false,libva" +# Weston with EGL support +PACKAGECONFIG[egl] = "-Drenderer-gl=true,-Drenderer-gl=false,virtual/egl" +# Weston with lcms support +PACKAGECONFIG[lcms] = "-Dcolor-management-lcms=true,-Dcolor-management-lcms=false,lcms" +# Weston with webp support +PACKAGECONFIG[webp] = "-Dimage-webp=true,-Dimage-webp=false,libwebp" +# Weston with systemd-login support +PACKAGECONFIG[systemd] = "-Dsystemd=true -Dlauncher-logind=true,-Dsystemd=false -Dlauncher-logind=false,systemd dbus" +# Weston with Xwayland support (requires X11 and Wayland) +PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false" +# colord CMS support +PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-colord=false,colord" +# Clients support +PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Virtual remote output with GStreamer on DRM backend +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer-1.0" +# Weston with PAM support +PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam" +# Weston with screen-share support +PACKAGECONFIG[screenshare] = "-Dscreenshare=true,-Dscreenshare=false" +# Traditional desktop shell +PACKAGECONFIG[shell-desktop] = "-Dshell-desktop=true,-Dshell-desktop=false" +# Fullscreen shell +PACKAGECONFIG[shell-fullscreen] = "-Dshell-fullscreen=true,-Dshell-fullscreen=false" +# In-Vehicle Infotainment (IVI) shell +PACKAGECONFIG[shell-ivi] = "-Dshell-ivi=true,-Dshell-ivi=false" +# JPEG image loading support +PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg" + +do_install_append() { + # Weston doesn't need the .la files to load modules, so wipe them + rm -f ${D}/${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.la + + # If X11, ship a desktop file to launch it + if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then + install -d ${D}${datadir}/applications + install ${WORKDIR}/weston.desktop ${D}${datadir}/applications + + install -d ${D}${datadir}/icons/hicolor/48x48/apps + install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then + install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland + fi + + if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then + chmod u+s ${D}${bindir}/weston-launch + fi +} + +PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ + libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" + +FILES_${PN}-dev += "${libdir}/${BPN}/libexec_weston.so" +FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so* ${datadir}" + +FILES_libweston-${WESTON_MAJOR_VERSION} = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-${WESTON_MAJOR_VERSION}/*.so" +SUMMARY_libweston-${WESTON_MAJOR_VERSION} = "Helper library for implementing 'wayland window managers'." + +FILES_${PN}-examples = "${bindir}/*" + +FILES_${PN}-xwayland = "${libdir}/libweston-${WESTON_MAJOR_VERSION}/xwayland.so" +RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland" + +RDEPENDS_${PN} += "xkeyboard-config" +RRECOMMENDS_${PN} = "weston-init liberation-fonts" +RRECOMMENDS_${PN}-dev += "wayland-protocols" + +USERADD_PACKAGES = "${PN}" +GROUPADD_PARAM_${PN} = "--system weston-launch" diff --git a/meta-digi-dey/recipes-graphics/wayland/weston_8.0.0.imx.bb b/meta-digi-dey/recipes-graphics/wayland/weston_9.0.0.imx.bb similarity index 91% rename from meta-digi-dey/recipes-graphics/wayland/weston_8.0.0.imx.bb rename to meta-digi-dey/recipes-graphics/wayland/weston_9.0.0.imx.bb index 244651044..6276359b8 100644 --- a/meta-digi-dey/recipes-graphics/wayland/weston_8.0.0.imx.bb +++ b/meta-digi-dey/recipes-graphics/wayland/weston_9.0.0.imx.bb @@ -1,9 +1,9 @@ -require recipes-graphics/wayland/weston_7.0.0.bb +require weston_9.0.0.bb SRC_URI_remove = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz" WESTON_SRC ?= "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https" -SRC_URI_prepend = "${WESTON_SRC};branch=weston-imx-8.0 " -SRCREV = "f13d40a3a0504a00baf2f28abe83b65dab8b2e10" +SRC_URI_prepend = "${WESTON_SRC};branch=weston-imx-9.0 " +SRCREV = "a1823f20a1d6e24d2f56e98c5576eda34a94f567" S = "${WORKDIR}/git" # Disable OpenGL for parts with GPU support for 2D but not 3D