diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /bsp/meta-freescale/recipes-graphics/wayland | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'bsp/meta-freescale/recipes-graphics/wayland')
17 files changed, 305 insertions, 745 deletions
diff --git a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch deleted file mode 100644 index 10dc2198..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0001-unstable-Add-alpha-compositing-protocol.patch +++ /dev/null @@ -1,195 +0,0 @@ -From b4be5e338be2301f83f4dfdc0cbb740f0a783464 Mon Sep 17 00:00:00 2001 -From: Haihua Hu <jared.hu@nxp.com> -Date: Thu, 14 Jun 2018 13:54:08 +0800 -Subject: [PATCH 1/2] unstable: Add alpha-compositing protocol - -It's based on the Chromium Wayland protocol of the same name ([1]) -and Alexandros's modified version ([2])with a few changes -made to the blending_equation enumeration. - -Add one more blending_equation "src_alpha / src_alpha" - -[1] https://chromium.googlesource.com/chromium/src/+/master/third_party/wayland-protocols/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -[2] https://lists.freedesktop.org/archives/wayland-devel/2017-August/034741.html - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Haihua Hu <jared.hu@nxp.com> ---- - Makefile.am | 1 + - unstable/alpha-compositing/README | 6 + - .../alpha-compositing-unstable-v1.xml | 136 +++++++++++++++++++++ - 3 files changed, 143 insertions(+) - create mode 100644 unstable/alpha-compositing/README - create mode 100644 unstable/alpha-compositing/alpha-compositing-unstable-v1.xml - -diff --git a/Makefile.am b/Makefile.am -index 4b9a901..e6c44ec 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -17,6 +17,7 @@ unstable_protocols = \ - unstable/keyboard-shortcuts-inhibit/keyboard-shortcuts-inhibit-unstable-v1.xml \ - unstable/xdg-output/xdg-output-unstable-v1.xml \ - unstable/input-timestamps/input-timestamps-unstable-v1.xml \ -+ unstable/alpha-compositing/alpha-compositing-unstable-v1.xml \ - $(NULL) - - stable_protocols = \ -diff --git a/unstable/alpha-compositing/README b/unstable/alpha-compositing/README -new file mode 100644 -index 0000000..d874156 ---- /dev/null -+++ b/unstable/alpha-compositing/README -@@ -0,0 +1,6 @@ -+Alpha compositing protocol -+ -+Maintainers: -+David Reveman <reveman at chromium.org> -+Alexandros Frantzis <alexandros.frantzis at collabora.com> -+Jared Hu <Jared Hu at nxp.com> -diff --git a/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml b/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -new file mode 100644 -index 0000000..0844b3f ---- /dev/null -+++ b/unstable/alpha-compositing/alpha-compositing-unstable-v1.xml -@@ -0,0 +1,136 @@ -+<?xml version="1.0" encoding="UTF-8"?> -+<protocol name="alpha_compositing_unstable_v1"> -+ -+ <copyright> -+ Copyright 2016 The Chromium Authors. -+ Copyright 2017 Collabora Ltd -+ Copyright 2018 NXP -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the "Software"), -+ to deal in the Software without restriction, including without limitation -+ the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ and/or sell copies of the Software, and to permit persons to whom the -+ Software is furnished to do so, subject to the following conditions: -+ -+ The above copyright notice and this permission notice (including the next -+ paragraph) shall be included in all copies or substantial portions of the -+ Software. -+ -+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ DEALINGS IN THE SOFTWARE. -+ </copyright> -+ -+ <description summary="Protocol for more advanced compositing and blending"> -+ This protocol specifies a set of interfaces used to control the alpha -+ compositing and blending of surface contents. -+ -+ Warning! The protocol described in this file is experimental and backward -+ incompatible changes may be made. Backward compatible changes may be added -+ together with the corresponding interface version bump. Backward -+ incompatible changes are done by bumping the version number in the protocol -+ and interface names and resetting the interface version. Once the protocol -+ is to be declared stable, the 'z' prefix and the version number in the -+ protocol and interface names are removed and the interface version number is -+ reset. -+ </description> -+ -+ <interface name="zwp_alpha_compositing_v1" version="1"> -+ <description summary="alpha_compositing"> -+ The global interface exposing compositing and blending capabilities is -+ used to instantiate an interface extension for a wl_surface object. -+ This extended interface will then allow the client to specify the -+ blending equation and alpha value used for compositing the wl_surface. -+ </description> -+ -+ <request name="destroy" type="destructor"> -+ <description summary="unbind from the blending interface"> -+ Informs the server that the client will not be using this -+ protocol object anymore. This does not affect any other objects, -+ blending objects included. -+ </description> -+ </request> -+ -+ <enum name="error"> -+ <entry name="blending_exists" value="0" -+ summary="the surface already has a blending object associated"/> -+ </enum> -+ -+ <request name="get_blending"> -+ <description summary="extend surface interface for blending"> -+ Instantiate an interface extension for the given wl_surface to -+ provide surface blending. If the given wl_surface already has -+ a blending object associated, the blending_exists protocol error -+ is raised. -+ </description> -+ -+ <arg name="id" type="new_id" interface="zwp_blending_v1" -+ summary="the new blending interface id"/> -+ <arg name="surface" type="object" interface="wl_surface" -+ summary="the surface"/> -+ </request> -+ </interface> -+ -+ <interface name="zwp_blending_v1" version="1"> -+ <description summary="blending interface to a wl_surface"> -+ An additional interface to a wl_surface object, which allows the -+ client to specify the blending equation used for compositing and -+ an alpha value applied to the whole surface. -+ -+ When the blending object is created its blending equation is -+ 'none' and its alpha is 1.0, i.e., it's inactive by default. Clients -+ can activate it by setting the blending equation and alpha value. -+ -+ If the wl_surface associated with the blending object is destroyed, -+ the blending object becomes inert. -+ -+ If the blending object is destroyed, the blending state is removed -+ from the wl_surface. The change will be applied on the next -+ wl_surface.commit. -+ </description> -+ -+ <request name="destroy" type="destructor"> -+ <description summary="remove blending from the surface"> -+ The associated wl_surface's blending state is removed. -+ The change is applied on the next wl_surface.commit. -+ </description> -+ </request> -+ -+ <enum name="blending_equation"> -+ <description summary="different blending equations for compositing"> -+ Blending equations that can be used when compositing a surface. -+ </description> -+ <entry name="none" value="0" summary="blending object is inactive"/> -+ <entry name="opaque" value="1" summary="(one, zero)"/> -+ <entry name="premultiplied" value="2" summary="(one, one_minus_src_alpha)"/> -+ <entry name="straight" value="3" summary="(src_alpha, one_minus_src_alpha)" /> -+ <entry name="fromsource" value="4" summary="(src_alpha, src_alpha)" /> -+ </enum> -+ -+ <request name="set_blending"> -+ <description summary="set the blending equation"> -+ Set the blending equation for compositing the wl_surface. -+ -+ The blending equation state is double-buffered state, -+ and will be applied on the next wl_surface.commit. -+ </description> -+ <arg name="equation" type="uint" summary="the new blending equation"/> -+ </request> -+ -+ <request name="set_alpha"> -+ <description summary="set the alpha value"> -+ Set the alpha value applied to the whole surface for compositing. -+ -+ The alpha value state is double-buffered state, -+ and will be applied on the next wl_surface.commit. -+ </description> -+ <arg name="value" type="fixed" summary="the new alpha value"/> -+ </request> -+ </interface> -+ -+</protocol> -\ No newline at end of file --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch deleted file mode 100644 index 654e8b09..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols/0002-unstable-Add-hdr10-metadata-protocol.patch +++ /dev/null @@ -1,134 +0,0 @@ -From 54e847c10a75ec7bd6fbb8fbdd700d085145cdce Mon Sep 17 00:00:00 2001 -From: Haihua Hu <jared.hu@nxp.com> -Date: Tue, 26 Jun 2018 15:30:18 +0800 -Subject: [PATCH 2/2] unstable: Add hdr10-metadata protocol - -this protocol is used to support hdr10 video playback. -HDR10 metadata is passed to compositor via this interface - -Upstream-Status: Inappropriate [i.MX specific] - -Signed-off-by: Haihua Hu <jared.hu@nxp.com> ---- - Makefile.am | 1 + - unstable/hdr10-metadata/README | 4 ++ - .../hdr10-metadata/hdr10-metadata-unstable-v1.xml | 84 ++++++++++++++++++++++ - 3 files changed, 89 insertions(+) - create mode 100644 unstable/hdr10-metadata/README - create mode 100644 unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml - -diff --git a/Makefile.am b/Makefile.am -index e6c44ec..b8206c7 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -18,6 +18,7 @@ unstable_protocols = \ - unstable/xdg-output/xdg-output-unstable-v1.xml \ - unstable/input-timestamps/input-timestamps-unstable-v1.xml \ - unstable/alpha-compositing/alpha-compositing-unstable-v1.xml \ -+ unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml \ - $(NULL) - - stable_protocols = \ -diff --git a/unstable/hdr10-metadata/README b/unstable/hdr10-metadata/README -new file mode 100644 -index 0000000..58a82f8 ---- /dev/null -+++ b/unstable/hdr10-metadata/README -@@ -0,0 +1,4 @@ -+hdr10 metadata protocol -+ -+Maintainers: -+Jared Hu <Jared Hu at nxp.com> -diff --git a/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml b/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml -new file mode 100644 -index 0000000..5b1bac4 ---- /dev/null -+++ b/unstable/hdr10-metadata/hdr10-metadata-unstable-v1.xml -@@ -0,0 +1,84 @@ -+<?xml version="1.0" encoding="UTF-8"?> -+<protocol name="hdr10_metadata_unstable_v1"> -+ -+ <copyright> -+ Copyright 2018 NXP -+ -+ Permission is hereby granted, free of charge, to any person obtaining a -+ copy of this software and associated documentation files (the "Software"), -+ to deal in the Software without restriction, including without limitation -+ the rights to use, copy, modify, merge, publish, distribute, sublicense, -+ and/or sell copies of the Software, and to permit persons to whom the -+ Software is furnished to do so, subject to the following conditions: -+ -+ The above copyright notice and this permission notice (including the next -+ paragraph) shall be included in all copies or substantial portions of the -+ Software. -+ -+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -+ THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -+ DEALINGS IN THE SOFTWARE. -+ </copyright> -+ -+ <description summary="Protocol for sending hdr10 metadata to compositor"> -+ This protocol specifies a set of interfaces used to set and control -+ hdr10 metadata of video contents. -+ -+ Warning! The protocol described in this file is experimental and backward -+ incompatible changes may be made. Backward compatible changes may be added -+ together with the corresponding interface version bump. Backward -+ incompatible changes are done by bumping the version number in the protocol -+ and interface names and resetting the interface version. Once the protocol -+ is to be declared stable, the 'z' prefix and the version number in the -+ protocol and interface names are removed and the interface version number is -+ reset. -+ </description> -+ -+ <interface name="zwp_hdr10_metadata_v1" version="1"> -+ <description summary="hdr10_metadata"> -+ The global interface exposing hdr10 metadata capabilities is -+ used to instantiate an interface extension for compositor. -+ This extended interface will then allow the client to pass hdr10 metadata -+ to compositor and send to display driver if supported. -+ </description> -+ -+ <request name="destroy" type="destructor"> -+ <description summary="unbind from the hdr10 metadata interface"> -+ Informs the server that the client will not be using this -+ protocol object anymore. This does not affect any other objects. -+ </description> -+ </request> -+ -+ <enum name="error"> -+ <entry name="sending_meta_error" value="0" -+ summary="error occurs when compositor handle metadata"/> -+ </enum> -+ -+ <request name="set_metadata"> -+ <description summary="interface of setting and controling hdr10 metadata"> -+ client can use this interface pass hdr10 metadata to server. Server need -+ use the recived metadata to enable hdr mode. -+ </description> -+ -+ <arg name="eotf" type="uint" summary="supported eotf"/> -+ <arg name="type" type="uint" summary="supported type"/> -+ <arg name="display_primaries_red" type="uint" -+ summary="display primaries of red, high 16bits for x, and low 16bits for y"/> -+ <arg name="display_primaries_green" type="uint" -+ summary="display primaries of green, high 16bits for x, and low 16bits for y"/> -+ <arg name="display_primaries_blue" type="uint" -+ summary="display primaries of blue, high 16bits for x, and low 16bits for y"/> -+ <arg name="white_point" type="uint" -+ summary="white point, high 16bits for x, and low 16bits for blue"/> -+ <arg name="mastering_display_luminance" type="uint" -+ summary="max and min mastering display luminance, high 16 bits for max, and low 16 bits for min"/> -+ <arg name="max_cll" type="uint" summary="max content light level"/> -+ <arg name="max_fall" type="uint" summary="max frame average light level"/> -+ </request> -+ </interface> -+ -+</protocol> --- -2.7.4 - diff --git a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.13.imx.bb b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb index 9e087432..7f15bdb3 100644 --- a/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.13.imx.bb +++ b/bsp/meta-freescale/recipes-graphics/wayland/wayland-protocols_1.18.imx.bb @@ -9,13 +9,9 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://COPYING;md5=c7b12b6702da38ca028ace54aae3d484 \ file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53" -ARCHIVE_NAME = "${BPN}-1.13" -SRC_URI = "https://wayland.freedesktop.org/releases/${ARCHIVE_NAME}.tar.xz \ - file://0001-unstable-Add-alpha-compositing-protocol.patch \ - file://0002-unstable-Add-hdr10-metadata-protocol.patch" -SRC_URI[md5sum] = "29312149dafcd4a0e739ba94995a574d" -SRC_URI[sha256sum] = "0758bc8008d5332f431b2a84fea7de64d971ce270ed208206a098ff2ebc68f38" -S = "${WORKDIR}/${ARCHIVE_NAME}" +SRC_URI = "git://source.codeaurora.org/external/imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.18" +SRCREV = "ee18c1f66877f7fb652467c349108395c20d4f9a" +S = "${WORKDIR}/git" inherit autotools pkgconfig diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-freescale/recipes-graphics/wayland/weston-init.bbappend index 76aadf94..ba68761f 100644 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init.bbappend +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston-init.bbappend @@ -6,20 +6,39 @@ IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu2d = "opengl" IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu3d = "" REQUIRED_DISTRO_FEATURES_remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}" -SRC_URI += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd wayland x11', 'file://weston.config', '', d)}" +SRC_URI_append_mx6sl = " file://weston.config" -HAS_SYSTEMD = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" -HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}" +# To customize weston.ini, start by setting the desired assignment in weston.ini, +# commented out. For example: +# #xwayland=true +# Then add the assignment to INI_UNCOMMENT_ASSIGNMENTS. +INI_UNCOMMENT_ASSIGNMENTS_append_imx = " \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland=true', '', d)} \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx7ulp = " \ + use-g2d=1 \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx8mm = " \ + use-g2d=1 \ +" +INI_UNCOMMENT_ASSIGNMENTS_append_mx8mq = " \ + gbm-format=argb8888 \ + \\[shell\\] \ + size=1920x1080 \ +" + +uncomment() { + if ! (grep "^#$1" $2); then + bbfatal "Commented setting '#$1' not found in file $2" + fi + sed -i -e 's,^#'"$1"','"$1"',g' $2 +} do_install_append() { - if ${HAS_SYSTEMD}; then - sed -i \ - -e 's,/usr/bin,${bindir},g' \ - -e 's,/etc,${sysconfdir},g' \ - -e 's,/var,${localstatedir},g' \ - ${D}${systemd_system_unitdir}/weston.service - if ${HAS_XWAYLAND}; then - install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston - fi + if [ -f "${WORKDIR}/weston.config" ]; then + install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston fi + for assignment in ${INI_UNCOMMENT_ASSIGNMENTS}; do + uncomment "$assignment" ${D}${sysconfdir}/xdg/weston/weston.ini + done } diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/imxdrm/weston.config b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/imxdrm/weston.config deleted file mode 100644 index 5693d6cb..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/imxdrm/weston.config +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland" -DESKTOP_SHELL_WINDOW=1920x1080 diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx6sl/weston.config b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx6sl/weston.config new file mode 100755 index 00000000..6456cd24 --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx6sl/weston.config @@ -0,0 +1 @@ +FB_MULTI_BUFFER=1 diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx8mm/weston.config b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx8mm/weston.config deleted file mode 100644 index eb990e40..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/mx8mm/weston.config +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland --use-g2d=1" -DESKTOP_SHELL_WINDOW=1920x1080 diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.config b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.config deleted file mode 100644 index 7c92cf11..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.config +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -OPTARGS="--xwayland" diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.ini b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.ini new file mode 100644 index 00000000..d9094b1f --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.ini @@ -0,0 +1,25 @@ +[core] +#gbm-format=argb8888 +idle-time=0 +#use-g2d=1 +#xwayland=true + +#[shell] +#size=1920x1080 + +#[output] +#name=HDMI-A-1 +#mode=1920x1080@60 +#transform=90 + +#[output] +#name=HDMI-A-2 +#mode=off +# WIDTHxHEIGHT Resolution size width and height in pixels +# off Disables the output +# preferred Uses the preferred mode +# current Uses the current crt controller mode +#transform=90 + +[screen-share] +command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.service b/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.service deleted file mode 100644 index 44c5a82f..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston-init/weston.service +++ /dev/null @@ -1,38 +0,0 @@ -[Unit] -Description=Weston Wayland Compositor (on tty7) -RequiresMountsFor=/run -Conflicts=getty@tty7.service plymouth-quit.service -After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service - -[Service] -User=root -PermissionsStartOnly=true - -# Log us in via PAM so we get our XDG & co. environment and -# are treated as logged in so we can use the tty: -PAMName=login - -# Grab tty7 -UtmpIdentifier=tty7 -TTYPath=/dev/tty7 -TTYReset=yes -TTYVHangup=yes -TTYVTDisallocate=yes - -# stderr to journal so our logging doesn't get thrown into /dev/null -StandardOutput=tty -StandardInput=tty -StandardError=journal - -EnvironmentFile=-/etc/default/weston - -# Weston does not successfully change VT, nor does systemd place us on -# the VT it just activated for us. Switch manually: -ExecStartPre=/usr/bin/chvt 7 -ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS - -IgnoreSIGPIPE=no - -[Install] -WantedBy=multi-user.target - diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch deleted file mode 100644 index 6f676048..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-g2d-renderer-Fix-open-function-build-break.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 7857e5aa2459b2746e062ae59ae0240c4af7af5d Mon Sep 17 00:00:00 2001 -From: Tom Hochstein <tom.hochstein@nxp.com> -Date: Mon, 29 Oct 2018 21:40:32 +0000 -Subject: [PATCH] g2d-renderer: Fix open function build break - -| from ../git/libweston/g2d-renderer.c:40: -| In function 'open', -| inlined from 'g2d_renderer_create' at ../git/libweston/g2d-renderer.c:1629:2: -| /home/r60874/upstream/fsl-xwayland/tmp/work/cortexa9t2hf-neon-mx6qdl-fsl-linux-gnueabi/weston/4.0.0.imx-r0/recipe- sysroot/usr/include/bits/fcntl2.h:50:4: error: call to '__open_missing_mode' declared with attribute error: open wit h O_CREAT or O_TMPFILE in second argument needs 3 arguments -| __open_missing_mode (); -| ^~~~~~~~~~~~~~~~~~~~~~ -| Makefile:5266: recipe for target 'libweston/g2d_renderer_la-g2d-renderer.lo' failed - -Upstream-Status: Inappropriate [i.MX-specific] - -Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> ---- - libweston/g2d-renderer.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: git/libweston/g2d-renderer.c -=================================================================== ---- git.orig/libweston/g2d-renderer.c -+++ git/libweston/g2d-renderer.c -@@ -1626,7 +1626,7 @@ g2d_renderer_create(struct weston_compos - path = malloc(strlen(dir) + 40); - strcpy(path, dir); - strcat(path, "/use-g2d-renderer"); -- close(open(path, O_CREAT | O_RDWR)); -+ close(open(path, O_CREAT | O_RDWR, 0600)); - free(path); - - return 0; diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch deleted file mode 100644 index 09ec1559..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-make-error-portable.patch +++ /dev/null @@ -1,78 +0,0 @@ -From ad1d2161c811cff25d1684c33611f300adb753bc Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Fri, 29 May 2015 20:56:00 -0700 -Subject: [PATCH] make error() portable - -error() is not posix but gnu extension so may not be available on all -kind of systemsi e.g. musl. - -Upstream-Status: Submitted - -Signed-off-by: Khem Raj <raj.khem@gmail.com> - ---- - configure.ac | 2 ++ - libweston/weston-error.h | 20 ++++++++++++++++++++ - libweston/weston-launch.c | 2 +- - 3 files changed, 23 insertions(+), 1 deletion(-) - create mode 100644 libweston/weston-error.h - -diff --git a/configure.ac b/configure.ac -index 7aebbdb..dc9c802 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -109,6 +109,8 @@ AC_CHECK_DECL(CLOCK_MONOTONIC,[], - [[#include <time.h>]]) - AC_CHECK_HEADERS([execinfo.h]) - -+AC_CHECK_HEADERS([error.h]) -+ - AC_CHECK_FUNCS([mkostemp strchrnul initgroups posix_fallocate]) - - # check for libdrm as a build-time dependency only -diff --git a/libweston/weston-error.h b/libweston/weston-error.h -new file mode 100644 -index 0000000..2089d02 ---- /dev/null -+++ b/libweston/weston-error.h -@@ -0,0 +1,20 @@ -+#ifndef _WESTON_ERROR_H -+#define _WESTON_ERROR_H -+ -+#if defined(HAVE_ERROR_H) -+#include <error.h> -+#else -+#include <err.h> -+#include <string.h> -+#define _weston_error(S, E, F, ...) do { \ -+ if (E) \ -+ err(S, F ": %s", ##__VA_ARGS__, strerror(E)); \ -+ else \ -+ err(S, F, ##__VA_ARGS__); \ -+} while(0) -+ -+#define error _weston_error -+#endif -+ -+#endif -+ -diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 1adcf21..166bf3b 100644 ---- a/libweston/weston-launch.c -+++ b/libweston/weston-launch.c -@@ -33,7 +33,6 @@ - #include <poll.h> - #include <errno.h> - --#include <error.h> - #include <getopt.h> - - #include <sys/types.h> -@@ -59,6 +58,7 @@ - #endif - - #include "weston-launch.h" -+#include "weston-error.h" - - #define DRM_MAJOR 226 - diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch index d648538b..62b864c1 100644 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch @@ -1,7 +1,8 @@ -From b98b9dbda902225cdd972b5bff6a641c36cc7e90 Mon Sep 17 00:00:00 2001 +From 5f2d71998eb77068cbaee2d468cbb296a42d5739 Mon Sep 17 00:00:00 2001 From: Tom Hochstein <tom.hochstein@nxp.com> Date: Wed, 22 Feb 2017 15:53:30 +0200 -Subject: [PATCH] weston-launch: Provide a default version that doesn't require PAM +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. @@ -14,46 +15,49 @@ Upstream-Status: Pending Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Denys Dmytriyenko <denys@ti.com> +Signed-off-by: Ming Liu <ming.liu@toradex.com> --- - configure.ac | 9 +++++++-- - libweston/weston-launch.c | 20 ++++++++++++++++++++ - 2 files changed, 27 insertions(+), 2 deletions(-) + libweston/meson.build | 16 ++++++++++++---- + libweston/weston-launch.c | 21 +++++++++++++++++++++ + meson_options.txt | 7 +++++++ + 3 files changed, 40 insertions(+), 4 deletions(-) -diff --git a/configure.ac b/configure.ac -index dc9c802..48cf5cb 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -451,13 +451,17 @@ AC_ARG_ENABLE(resize-optimization, - AS_IF([test "x$enable_resize_optimization" = "xyes"], - [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])]) - -+AC_ARG_WITH(pam, -+ AS_HELP_STRING([--with-pam], [Use PAM]), -+ [use_pam=$withval], [use_pam=yes]) - AC_ARG_ENABLE(weston-launch, [ --enable-weston-launch],, enable_weston_launch=yes) - AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes) --if test x$enable_weston_launch = xyes; then -+if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then - WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no]) - if test x$have_pam = xno; then -- AC_ERROR([weston-launch requires pam]) -+ AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found]) - fi -+ AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available]) - fi - - AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes") -@@ -702,6 +706,7 @@ AC_MSG_RESULT([ - Enable developer documentation ${enable_devdocs} - - weston-launch utility ${enable_weston_launch} -+ PAM support ${use_pam} - systemd-login support ${have_systemd_login} - systemd notify support ${enable_systemd_notify} - +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') +- dep_pam = cc.find_library('pam') ++ deps_weston_launch = [systemd_dep, dep_libdrm] + +- if not cc.has_function('pam_open_session', dependencies: dep_pam) +- error('pam_open_session not found for weston-launch') ++ if get_option('pam') ++ dep_pam = cc.find_library('pam') ++ if not cc.has_function('pam_open_session', dependencies: dep_pam) ++ error('pam_open_session not found for weston-launch') ++ endif ++ ++ if dep_pam.found() ++ deps_weston_launch += dep_pam ++ config_h.set('HAVE_PAM', '1') ++ endif + endif + + executable( + 'weston-launch', + 'weston-launch.c', +- dependencies: [dep_pam, systemd_dep, dep_libdrm], ++ dependencies: deps_weston_launch, + include_directories: common_inc, + install: true + ) diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c -index 166bf3b..6fb9232 100644 +index 8a711b4..54c567a 100644 --- a/libweston/weston-launch.c +++ b/libweston/weston-launch.c @@ -51,7 +51,9 @@ @@ -66,7 +70,7 @@ index 166bf3b..6fb9232 100644 #ifdef HAVE_SYSTEMD_LOGIN #include <systemd/sd-login.h> -@@ -101,8 +103,10 @@ drmSetMaster(int drm_fd) +@@ -100,8 +102,10 @@ drmSetMaster(int drm_fd) #endif struct weston_launch { @@ -77,7 +81,7 @@ index 166bf3b..6fb9232 100644 int tty; int ttynr; int sock[2]; -@@ -189,6 +193,7 @@ weston_launch_allowed(struct weston_launch *wl) +@@ -192,6 +196,7 @@ weston_launch_allowed(struct weston_launch *wl) return false; } @@ -85,7 +89,7 @@ index 166bf3b..6fb9232 100644 static int pam_conversation_fn(int msg_count, const struct pam_message **messages, -@@ -229,6 +234,7 @@ setup_pam(struct weston_launch *wl) +@@ -232,6 +237,7 @@ setup_pam(struct weston_launch *wl) return 0; } @@ -93,7 +97,7 @@ index 166bf3b..6fb9232 100644 static int setup_launcher_socket(struct weston_launch *wl) -@@ -422,6 +428,7 @@ quit(struct weston_launch *wl, int status) +@@ -431,6 +437,7 @@ quit(struct weston_launch *wl, int status) close(wl->signalfd); close(wl->sock[0]); @@ -101,7 +105,7 @@ index 166bf3b..6fb9232 100644 if (wl->new_user) { err = pam_close_session(wl->ph, 0); if (err) -@@ -429,6 +436,7 @@ quit(struct weston_launch *wl, int status) +@@ -438,6 +445,7 @@ quit(struct weston_launch *wl, int status) err, pam_strerror(wl->ph, err)); pam_end(wl->ph, err); } @@ -109,7 +113,7 @@ index 166bf3b..6fb9232 100644 if (ioctl(wl->tty, KDSKBMUTE, 0) && ioctl(wl->tty, KDSKBMODE, wl->kb_mode)) -@@ -608,6 +616,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -666,6 +674,7 @@ setup_session(struct weston_launch *wl, char **child_argv) setenv("HOME", wl->pw->pw_dir, 1); setenv("SHELL", wl->pw->pw_shell, 1); @@ -117,7 +121,7 @@ index 166bf3b..6fb9232 100644 env = pam_getenvlist(wl->ph); if (env) { for (i = 0; env[i]; ++i) { -@@ -616,6 +625,7 @@ setup_session(struct weston_launch *wl, char **child_argv) +@@ -674,6 +683,7 @@ setup_session(struct weston_launch *wl, char **child_argv) } free(env); } @@ -125,7 +129,7 @@ index 166bf3b..6fb9232 100644 /* * We open a new session, so it makes sense -@@ -683,8 +693,10 @@ static void +@@ -745,8 +755,10 @@ static void help(const char *name) { fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name); @@ -136,7 +140,7 @@ index 166bf3b..6fb9232 100644 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"); -@@ -698,7 +710,9 @@ main(int argc, char *argv[]) +@@ -760,7 +772,9 @@ main(int argc, char *argv[]) int i, c; char *tty = NULL; struct option opts[] = { @@ -146,21 +150,24 @@ index 166bf3b..6fb9232 100644 { "tty", required_argument, NULL, 't' }, { "verbose", no_argument, NULL, 'v' }, { "help", no_argument, NULL, 'h' }, -@@ -710,9 +724,13 @@ main(int argc, char *argv[]) +@@ -772,11 +786,16 @@ main(int argc, char *argv[]) while ((c = getopt_long(argc, argv, "u:t:vh", opts, &i)) != -1) { switch (c) { case 'u': +#ifdef HAVE_PAM wl.new_user = optarg; - if (getuid() != 0) - error(1, 0, "Permission denied. -u allowed for root only"); + if (getuid() != 0) { + fprintf(stderr, "weston: Permission denied. -u allowed for root only\n"); + exit(EXIT_FAILURE); + } +#else -+ error(1, 0, "-u is unsupported in this weston-launch build"); ++ fprintf(stderr, "weston: -u is unsupported in this weston-launch build\n"); ++ exit(EXIT_FAILURE); +#endif break; case 't': tty = optarg; -@@ -753,8 +771,10 @@ main(int argc, char *argv[]) +@@ -828,8 +847,10 @@ main(int argc, char *argv[]) if (setup_tty(&wl, tty) < 0) exit(EXIT_FAILURE); @@ -171,3 +178,21 @@ index 166bf3b..6fb9232 100644 if (setup_launcher_socket(&wl) < 0) exit(EXIT_FAILURE); +diff --git a/meson_options.txt b/meson_options.txt +index c862ecc..73ef2c3 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -73,6 +73,13 @@ option( + ) + + option( ++ 'pam', ++ type: 'boolean', ++ value: true, ++ description: 'Define if PAM is available' ++) ++ ++option( + 'xwayland', + type: 'boolean', + value: true, diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini b/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini deleted file mode 100644 index d6ad40df..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/imx/weston.ini +++ /dev/null @@ -1,20 +0,0 @@ -[core] -# i.MX: Disable idle timeout -idle-time=0 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini b/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini deleted file mode 100644 index d1597a42..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston/mx8mq/weston.ini +++ /dev/null @@ -1,24 +0,0 @@ -[core] -# i.MX: Disable idle timeout -idle-time=0 -gbm-format=argb8888 - -#[output] -#name=HDMI-A-1 -#mode=1920x1080@60 -#transform=90 - -[shell] -size=1920x1080 - -#[output] -#name=HDMI-A-2 -#mode=off -# WIDTHxHEIGHT Resolution size width and height in pixels -# off Disables the output -# preferred Uses the preferred mode -# current Uses the current crt controller mode -#transform=90 - -[screen-share] -command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston_4.0.0.imx.bb b/bsp/meta-freescale/recipes-graphics/wayland/weston_4.0.0.imx.bb deleted file mode 100644 index e8d74fd4..00000000 --- a/bsp/meta-freescale/recipes-graphics/wayland/weston_4.0.0.imx.bb +++ /dev/null @@ -1,144 +0,0 @@ -SUMMARY = "Weston, a Wayland compositor, i.MX fork" -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=26;md5=e342df749174a8ee11065583157c7a38" - -DEFAULT_PREFERENCE = "-1" - -SRCBRANCH = "weston-imx-4.0" -SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ - file://weston.ini \ - file://weston.png \ - file://weston.desktop \ - file://0001-make-error-portable.patch \ - file://xwayland.weston-start \ - file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ - file://0001-g2d-renderer-Fix-open-function-build-break.patch \ -" -SRCREV = "866072b52751e5023651dd9322baa513e1f74fe6" -S = "${WORKDIR}/git" - -UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html" - -inherit autotools pkgconfig useradd distro_features_check - -# Disable OpenGL for parts with GPU support for 2D but not 3D -REQUIRED_DISTRO_FEATURES = "opengl" -REQUIRED_DISTRO_FEATURES_imxgpu2d = "" -REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl" -PACKAGECONFIG_OPENGL = "opengl" -PACKAGECONFIG_OPENGL_imxgpu2d = "" -PACKAGECONFIG_OPENGL_imxgpu3d = "opengl" - -DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg" -DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native" - -WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}" - -EXTRA_OECONF = "--enable-setuid-install \ - --disable-rdp-compositor \ - " -EXTRA_OECONF_append_qemux86 = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -EXTRA_OECONF_append_qemux86-64 = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -EXTRA_OECONF_append_imxfbdev = " \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ - " -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \ - ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL} pam systemd x11', d)} \ - clients launch" -PACKAGECONFIG_remove_imxfbdev = "kms" -PACKAGECONFIG_append_imxgpu = " imxgpu" -PACKAGECONFIG_append_imxgpu2d = " imxg2d" -PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2" -# -# Compositor choices -# -# Weston on KMS -PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev" -# Weston on Wayland (nested Weston) -PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa" -# Weston on X11 -PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo" -# Headless Weston -PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor" -# Weston on framebuffer -PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev" -# weston-launch -PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm" -# VA-API desktop recorder -PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva" -# Weston with EGL support -PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl" -# Weston with cairo glesv2 support -PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo" -# Weston with lcms support -PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms" -# Weston with webp support -PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp" -# Weston with systemd-login support -PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus" -# Weston with Xwayland support (requires X11 and Wayland) -PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland" -# colord CMS support -PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord" -# Clients support -PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients" -# Weston with PAM support -PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam" -# Weston with i.MX GPU support -PACKAGECONFIG[imxgpu] = "--enable-imxgpu,--disable-imxgpu" -# Weston with i.MX G2D renderer -PACKAGECONFIG[imxg2d] = "--enable-imxg2d,--disable-imxg2d,virtual/libg2d" -# Weston with OpenGL support -PACKAGECONFIG[opengl] = "--enable-opengl,--disable-opengl" - -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 - - # install default weston.ini - install -D -m 0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini -} - -PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \ - libweston-${WESTON_MAJOR_VERSION} ${PN}-examples" - -FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir} ${sysconfdir}/xdg/weston" - -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} = "liberation-fonts" -RRECOMMENDS_${PN}-dev += "wayland-protocols" - -USERADD_PACKAGES = "${PN}" -GROUPADD_PARAM_${PN} = "--system weston-launch" - -PACKAGE_ARCH = "${MACHINE_SOCARCH}" -COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" diff --git a/bsp/meta-freescale/recipes-graphics/wayland/weston_8.0.0.imx.bb b/bsp/meta-freescale/recipes-graphics/wayland/weston_8.0.0.imx.bb new file mode 100644 index 00000000..a021a54d --- /dev/null +++ b/bsp/meta-freescale/recipes-graphics/wayland/weston_8.0.0.imx.bb @@ -0,0 +1,168 @@ +# This recipe is for the i.MX fork of weston. For ease of +# maintenance, the top section is a verbatim copy of an OE-core +# recipe. The second section customizes the recipe for i.MX. + +########### OE-core copy ################## +# Upstream hash: 9b1d30810eeecb46b977c8eed68be69aef891312 + +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 \ +" +SRC_URI[md5sum] = "53e4810d852df0601d01fd986a5b22b3" +SRC_URI[sha256sum] = "7518b49b2eaa1c3091f24671bdcc124fd49fc8f1af51161927afa4329c027848" + +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 jpeg" +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" +# +# 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" + +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" + +########### End of OE-core copy ########### + +########### i.MX overrides ################ + +SUMMARY = "Weston, a Wayland compositor, i.MX fork" + +DEFAULT_PREFERENCE = "-1" + +SRCBRANCH = "weston-imx-8.0" +SRC_URI = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=${SRCBRANCH} \ + file://weston.png \ + file://weston.desktop \ + file://xwayland.weston-start \ + file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ +" +SRCREV = "f6a7d35650121fbe7c20d4cbe0eaac730fab3b2a" +S = "${WORKDIR}/git" + +# Disable OpenGL for parts with GPU support for 2D but not 3D +REQUIRED_DISTRO_FEATURES = "opengl" +REQUIRED_DISTRO_FEATURES_imxgpu2d = "" +REQUIRED_DISTRO_FEATURES_imxgpu3d = "opengl" +PACKAGECONFIG_OPENGL = "opengl" +PACKAGECONFIG_OPENGL_imxgpu2d = "" +PACKAGECONFIG_OPENGL_imxgpu3d = "opengl" + +PACKAGECONFIG_append = " ${@bb.utils.filter('DISTRO_FEATURES', '${PACKAGECONFIG_OPENGL}', d)}" + +PACKAGECONFIG_remove_imxfbdev = "kms" +PACKAGECONFIG_append_imxfbdev = " fbdev clients" +PACKAGECONFIG_append_imxgpu = " imxgpu" +PACKAGECONFIG_append_imxgpu2d = " imxg2d" + +# Clients support +SIMPLE_CLIENTS = "all" +SIMPLE_CLIENTS_imxfbdev = "damage,im,egl,shm,touch,dmabuf-v4l" +PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLE_CLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false" +# Weston with i.MX GPU support +PACKAGECONFIG[imxgpu] = "-Dimxgpu=true,-Dimxgpu=false,virtual/egl" +# Weston with i.MX G2D renderer +PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d" +# Weston with OpenGL support +PACKAGECONFIG[opengl] = "-Dopengl=true,-Dopengl=false" + +PACKAGE_ARCH = "${MACHINE_SOCARCH}" +COMPATIBLE_MACHINE = "(imxfbdev|imxgpu)" + +########### End of i.MX overrides ######### |