ccimx93: update graphics package for NXP release 6.1.36-2.1.0

Backport of graphics package for ccimx93 from NXP's Mickledore-based
6.1.36-2.1.0 release. Mainly copies and appends of graphics recipes
from the new release, and restricted to ccimx93 by changing the
COMPATIBLE_MACHINE, so it does not affect other platforms.

Notice, that the new version of weston used now by the ccimx93 requires
a different profile file (weston-socket.sh). This profile supercedes the
old 'weston.sh'.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
This commit is contained in:
Javier Viguera 2023-11-15 18:55:15 +01:00
parent 3aee8c39f7
commit b48f2806eb
20 changed files with 619 additions and 1 deletions

View File

@ -82,3 +82,11 @@ PREFERRED_VERSION_gstreamer1.0-plugins-bad:ccimx93 ?= "1.22.0.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-base:ccimx93 ?= "1.22.0.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-good:ccimx93 ?= "1.22.0.imx"
PREFERRED_VERSION_gstreamer1.0-plugins-ugly:ccimx93 ?= "1.22.0"
PREFERRED_VERSION_libdrm:ccimx93 ?= "2.4.115.imx"
PREFERRED_VERSION_nativesdk-wayland:ccimx93 ?= "1.22.0.imx"
PREFERRED_VERSION_wayland:ccimx93 ?= "1.22.0.imx"
PREFERRED_VERSION_wayland-native:ccimx93 ?= "1.22.0.imx"
PREFERRED_VERSION_wayland-protocols:ccimx93 ?= "1.32.imx"
PREFERRED_VERSION_weston:ccimx93 ?= "11.0.2.imx"
PREFERRED_VERSION_xwayland:ccimx93 ?= "23.1.1.imx"

View File

@ -0,0 +1,74 @@
SUMMARY = "Userspace interface to the kernel DRM services"
DESCRIPTION = "The runtime library for accessing the kernel DRM services. DRM \
stands for \"Direct Rendering Manager\", which is the kernel portion of the \
\"Direct Rendering Infrastructure\" (DRI). DRI is required for many hardware \
accelerated OpenGL drivers."
HOMEPAGE = "http://dri.freedesktop.org"
SECTION = "x11/base"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE;md5=9eb1f4831351ab42d762c40b3ebb7add \
file://xf86drm.c;beginline=9;endline=32;md5=c8a3b961af7667c530816761e949dc71"
PROVIDES = "drm"
DEPENDS = "libpthread-stubs"
SRC_URI = "${IMX_LIBDRM_SRC};branch=${SRCBRANCH}"
IMX_LIBDRM_SRC ?= "git://github.com/nxp-imx/libdrm-imx.git;protocol=https;nobranch=1"
SRCBRANCH ?= "libdrm-imx-2.4.115"
SRCREV = "0f889a1f9640f6210132dd565141eb19005245fb"
S = "${WORKDIR}/git"
DEFAULT_PREFERENCE = "-1"
COMPATIBLE_MACHINE = "(ccimx93)"
inherit meson pkgconfig manpages
PACKAGECONFIG ??= "intel radeon amdgpu nouveau vmwgfx omap freedreno vc4 etnaviv tests install-test-programs"
PACKAGECONFIG[intel] = "-Dintel=enabled,-Dintel=disabled,libpciaccess"
PACKAGECONFIG[radeon] = "-Dradeon=enabled,-Dradeon=disabled"
PACKAGECONFIG[amdgpu] = "-Damdgpu=enabled,-Damdgpu=disabled"
PACKAGECONFIG[nouveau] = "-Dnouveau=enabled,-Dnouveau=disabled"
PACKAGECONFIG[vmwgfx] = "-Dvmwgfx=enabled,-Dvmwgfx=disabled"
PACKAGECONFIG[omap] = "-Domap=enabled,-Domap=disabled"
PACKAGECONFIG[exynos] = "-Dexynos=enabled,-Dexynos=disabled"
PACKAGECONFIG[freedreno] = "-Dfreedreno=enabled,-Dfreedreno=disabled"
PACKAGECONFIG[tegra] = "-Dtegra=enabled,-Dtegra=disabled"
PACKAGECONFIG[vc4] = "-Dvc4=enabled,-Dvc4=disabled"
PACKAGECONFIG[etnaviv] = "-Detnaviv=enabled,-Detnaviv=disabled"
PACKAGECONFIG[freedreno-kgsl] = "-Dfreedreno-kgsl=true,-Dfreedreno-kgsl=false"
PACKAGECONFIG[valgrind] = "-Dvalgrind=enabled,-Dvalgrind=disabled,valgrind"
PACKAGECONFIG[install-test-programs] = "-Dinstall-test-programs=true,-Dinstall-test-programs=false"
PACKAGECONFIG[cairo-tests] = "-Dcairo-tests=enabled,-Dcairo-tests=disabled"
PACKAGECONFIG[tests] = "-Dtests=true,-Dtests=false"
PACKAGECONFIG[udev] = "-Dudev=true,-Dudev=false,udev"
PACKAGECONFIG[manpages] = "-Dman-pages=enabled,-Dman-pages=disabled,libxslt-native xmlto-native python3-docutils-native"
ALLOW_EMPTY:${PN}-drivers = "1"
PACKAGES =+ "${PN}-tests ${PN}-drivers ${PN}-radeon ${PN}-nouveau ${PN}-omap \
${PN}-intel ${PN}-exynos ${PN}-kms ${PN}-freedreno ${PN}-amdgpu \
${PN}-etnaviv"
RRECOMMENDS:${PN}-drivers = "${PN}-radeon ${PN}-nouveau ${PN}-omap ${PN}-intel \
${PN}-exynos ${PN}-freedreno ${PN}-amdgpu \
${PN}-etnaviv"
FILES:${PN}-tests = "${bindir}/*"
FILES:${PN}-radeon = "${libdir}/libdrm_radeon.so.*"
FILES:${PN}-nouveau = "${libdir}/libdrm_nouveau.so.*"
FILES:${PN}-omap = "${libdir}/libdrm_omap.so.*"
FILES:${PN}-intel = "${libdir}/libdrm_intel.so.*"
FILES:${PN}-exynos = "${libdir}/libdrm_exynos.so.*"
FILES:${PN}-kms = "${libdir}/libkms*.so.*"
FILES:${PN}-freedreno = "${libdir}/libdrm_freedreno.so.*"
FILES:${PN}-amdgpu = "${libdir}/libdrm_amdgpu.so.* ${datadir}/${PN}/amdgpu.ids"
FILES:${PN}-etnaviv = "${libdir}/libdrm_etnaviv.so.*"
BBCLASSEXTEND = "native nativesdk"
PACKAGES:prepend:imxgpu = "${PN}-vivante "
RRECOMMENDS:${PN}-drivers:append:imxgpu = " ${PN}-vivante"
FILES:${PN}-vivante = "${libdir}/libdrm_vivante.so.*"
PACKAGECONFIG:append:imxgpu = " vivante"
PACKAGECONFIG[vivante] = "-Dvivante=true,-Dvivante=false"
PACKAGE_ARCH = "${MACHINE_SOCARCH}"

View File

@ -0,0 +1,5 @@
# Copyright 2023 Digi International Inc.
LIC_FILES_CHKSUM:ccimx93 = "file://LICENSE.txt;md5=db4762b09b6bda63da103963e6e081de"
SRCREV:ccimx93 = "8d8b48c7c3d95b6c54093a09873ae796a0f09e8a"

View File

@ -0,0 +1,41 @@
From b4c64b6f07743e3fb63ce52359bc664ab7d60df0 Mon Sep 17 00:00:00 2001
From: Joshua Watt <JPEWhacker@gmail.com>
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 <string.h>' when looking
for strndup().
See: https://github.com/mesonbuild/meson/issues/3672
Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge_requests/63]
Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Denys Dmytriyenko <denis@denix.org>
---
meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meson.build b/meson.build
index 3bc25c9..adde7b9 100644
--- a/meson.build
+++ b/meson.build
@@ -38,11 +38,11 @@ have_funcs = [
'prctl',
'memfd_create',
'mremap',
- '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'))
config_h.set10('HAVE_XUCRED_CR_PID', cc.has_member('struct xucred', 'cr_pid', prefix : '#include <sys/ucred.h>'))
have_broken_msg_cmsg_cloexec = false
if host_machine.system() == 'freebsd'
--
2.7.4

View File

@ -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

View File

@ -0,0 +1,67 @@
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://gitlab.freedesktop.org/wayland/wayland/-/releases/1.22.0/downloads/${BP_ORIGINAL}.tar.xz \
file://run-ptest \
file://0001-build-Fix-strndup-detection-on-MinGW.patch \
"
SRC_URI[sha256sum] = "1540af1ea698a471c2d8e9d288332c7e0fd360c8f1d12936ebb7e7cbc2425842"
BP_ORIGINAL = "${BPN}-1.22.0"
S = "${WORKDIR}/${BP_ORIGINAL}"
UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
UPSTREAM_CHECK_REGEX = "wayland-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
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"
# 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/
}
PACKAGES =+ "${PN}-tools"
FILES:${PN}-tools = "${bindir}/wayland-scanner"
FILES:${PN}-dev += "${datadir}/${BPN}/wayland-scanner.mk"
BBCLASSEXTEND = "native nativesdk"
RDEPENDS:${PN}-ptest += "binutils sed ${PN}-tools"
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
DEFAULT_PREFERENCE = "-1"

View File

@ -0,0 +1,53 @@
# This recipe copy helps keep meta-freescale master branch compatible
# with Yocto langdale.
# (From OE-Core rev: 35fdbd0ea81650a0421d50fb53989d96c5956331)
SUMMARY = "XWayland is an X Server that runs under Wayland."
DESCRIPTION = "XWayland is an X Server running as a Wayland client, \
and thus is capable of displaying native X11 client applications in a \
Wayland compositor environment. The goal of XWayland is to facilitate \
the transition from X Window System to Wayland environments, providing \
a way to run unported applications in the meantime."
HOMEPAGE = "https://fedoraproject.org/wiki/Changes/XwaylandStandalone"
DEFAULT_PREFERENCE = "-1"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=5df87950af51ac2c5822094553ea1880"
SRC_URI = "https://www.x.org/archive/individual/xserver/${BP_ORIGINAL}.tar.xz"
BP_ORIGINAL = "${BPN}-23.1.1"
SRC_URI[sha256sum] = "fb9461f5cb9fea5e07e91882311b0c88b43e8843b017ebac05eb5af69aa34c15"
S = "${WORKDIR}/${BP_ORIGINAL}"
UPSTREAM_CHECK_REGEX = "xwayland-(?P<pver>\d+(\.(?!90\d)\d+)+)\.tar"
inherit meson features_check pkgconfig
REQUIRED_DISTRO_FEATURES = "x11 opengl"
DEPENDS += "xorgproto xtrans pixman libxkbfile libxfont2 wayland wayland-native wayland-protocols libdrm libepoxy libxcvt"
OPENGL_PKGCONFIGS = "glx glamor dri3"
PACKAGECONFIG ??= "${XORG_CRYPTO} \
${@bb.utils.contains('DISTRO_FEATURES', 'opengl', '${OPENGL_PKGCONFIGS}', '', d)} \
"
PACKAGECONFIG[dri3] = "-Ddri3=true,-Ddri3=false,libxshmfence"
PACKAGECONFIG[glx] = "-Dglx=true,-Dglx=false,virtual/libgl virtual/libx11"
PACKAGECONFIG[glamor] = "-Dglamor=true,-Dglamor=false,libepoxy virtual/libgbm,libegl"
PACKAGECONFIG[unwind] = "-Dlibunwind=true,-Dlibunwind=false,libunwind"
PACKAGECONFIG[xinerama] = "-Dxinerama=true,-Dxinerama=false"
# Xorg requires a SHA1 implementation, pick one
XORG_CRYPTO ??= "openssl"
PACKAGECONFIG[openssl] = "-Dsha1=libcrypto,,openssl"
PACKAGECONFIG[nettle] = "-Dsha1=libnettle,,nettle"
PACKAGECONFIG[gcrypt] = "-Dsha1=libgcrypt,,libgcrypt"
do_install:append() {
# remove files not needed and clashing with xserver-xorg
rm -rf ${D}/${libdir}/xorg/
}
FILES:${PN} += "${libdir}/xorg/protocol.txt"
RDEPENDS:${PN} += "xkbcomp"

View File

@ -0,0 +1,14 @@
# Copyright 2023 Digi International Inc.
#
# Reuse meta-freescale's linux-imx-headers_5.15.bb
#
require recipes-kernel/linux/linux-imx-headers_5.15.bb
SRCBRANCH = "lf-6.1.y"
LOCALVERSION = "-6.1.36-2.1.0"
SRCREV = "04b05c5527e9af8d81254638c307df07dc9a5dd3"
IMX_UAPI_HEADERS:remove = "isl29023.h"
COMPATIBLE_MACHINE = "(ccimx93)"

View File

@ -0,0 +1,8 @@
# distro features required by weston recipes
inherit features_check
# requires pam enabled if started via systemd
#
REQUIRED_DISTRO_FEATURES = "wayland opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"

View File

@ -0,0 +1,16 @@
# Copyright 2023 Digi International Inc.
#
# Reuse meta-freescale's wayland-protocols_1.25.imx.bb
#
require recipes-graphics/wayland/wayland-protocols_1.25.imx.bb
LIC_FILES_CHKSUM = "file://LICENSE;md5=c7b12b6702da38ca028ace54aae3d484 \
file://stable/presentation-time/presentation-time.xml;endline=26;md5=4646cd7d9edc9fa55db941f2d3a7dc53"
SRC_URI = "git://github.com/nxp-imx/wayland-protocols-imx.git;protocol=https;branch=wayland-protocols-imx-1.32"
SRCREV = "7ece577d467f8afb2f5a2f7fff3761a1e0ee9dad"
BBCLASSEXTEND = "native nativesdk"
COMPATIBLE_MACHINE = "(ccimx93)"

View File

@ -0,0 +1,40 @@
From 3aa4024ac4107e68552be4dfe5fce511900629c9 Mon Sep 17 00:00:00 2001
From: Max Krummenacher <max.krummenacher@toradex.com>
Date: Mon, 11 Jul 2022 19:38:19 +0000
Subject: [PATCH] Revert "protocol: no found wayland-scanner with Yocto
toolchain"
This reverts commit 7859a762617682bd804e210ad3bda6bdcd3ea24a.
With openembedded commit e525db4eb9 ("wayland: update 1.20.0 -> 1.21.0")
package config seems no longer to provide the path to the native
weston scanner.
Thus the build fails with:
| Run-time dependency wayland-scanner found: YES 1.21.0
| Program /usr/bin/wayland-scanner found: NO
|
| ../git/protocol/meson.build:2:0: ERROR: Program '/usr/bin/wayland-scanner' not found or not executable
Dropping weston 9.0.0-imx commit 7859a762 (protocol: no found
wayland-scanner with Yocto toolchain") fixes the issue.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
protocol/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/protocol/meson.build b/protocol/meson.build
index e8698530..ba52089b 100644
--- a/protocol/meson.build
+++ b/protocol/meson.build
@@ -1,4 +1,4 @@
-dep_scanner = dependency('wayland-scanner', native: false)
+dep_scanner = dependency('wayland-scanner', native: true)
prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner'))
dep_wp = dependency('wayland-protocols', version: '>= 1.26',
--
2.25.1

View File

@ -0,0 +1,9 @@
#!/bin/sh
# SPDX-FileCopyrightText: Huawei Inc.
# SPDX-License-Identifier: Apache-2.0
if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
add_weston_module "systemd-notify.so"
fi

View File

@ -0,0 +1,9 @@
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=Weston
Comment=Wayland Compostitor
Exec=weston
Icon=weston
Terminal=false
Categories=Utility;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1,6 @@
#!/bin/sh
if type Xwayland >/dev/null 2>/dev/null; then
mkdir -m 775 -p /tmp/.X11-unix
chown root:video /tmp/.X11-unix
fi

View File

@ -6,12 +6,14 @@ SRC_URI += " \
file://digi_background.png \
file://profile \
"
SRC_URI:append:ccimx93 = " file://weston-socket.sh"
INI_UNCOMMENT_ASSIGNMENTS:append:mx9-nxp-bsp = " \
repaint-window=16 \
"
INI_UNCOMMENT_ASSIGNMENTS:append:mx93-nxp-bsp = " \
use-g2d=1 \
gbm-format=argb8888 \
use-g2d=true \
"
update_file() {
@ -39,6 +41,10 @@ do_install:append() {
}
do_install:append:ccimx93() {
# The ccimx93 uses a new version of weston where 'weston-socket.sh' supercedes 'weston.sh'
\rm -f ${D}${sysconfdir}/profile.d/weston.sh
install -Dm0644 ${WORKDIR}/weston-socket.sh ${D}${sysconfdir}/profile.d/weston-socket.sh
install -d ${D}${sysconfdir}/default/
echo "QMLSCENE_DEVICE=softwarecontext" >> ${D}${sysconfdir}/default/weston
}

View File

@ -0,0 +1,20 @@
#!/bin/sh
# set weston variables for use with global weston socket
global_socket="/run/wayland-0"
if [ -e "$global_socket" ]; then
weston_group=$(stat -c "%G" "$global_socket")
if [ "$(id -u)" = "0" ]; then
export WAYLAND_DISPLAY="$global_socket"
else
case "$(groups "$USER")" in
*"$weston_group"*)
export WAYLAND_DISPLAY="$global_socket"
;;
*)
;;
esac
fi
unset weston_group
fi
unset global_socket

View File

@ -0,0 +1,36 @@
[core]
#gbm-format=argb8888
idle-time=0
#use-g2d=true
#xwayland=true
#repaint-window=16
#enable-overlay-view=1
#[shell]
#size=1920x1080
[libinput]
touchscreen_calibrator=true
#[output]
#name=HDMI-A-1
#mode=1920x1080@60
#transform=rotate-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=rotate-90
[screen-share]
command=@bindir@/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
#start-on-startup=true
# Digi: Set custom background
[shell]
background-image=/usr/share/weston/digi_background.png
background-type=scale-crop

View File

@ -0,0 +1,189 @@
# 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: 7f1932cb5a408320a5b542e20ba2807718349e8f
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=eb6d5297798cabe2ddc65e2af519bcf0 \
"
SRC_URI = "https://gitlab.freedesktop.org/wayland/weston/uploads/f5648c818fba5432edc3ea63c4db4813/${BPN}-${PV}.tar.xz \
file://weston.png \
file://weston.desktop \
file://xwayland.weston-start \
file://systemd-notify.weston-start \
"
SRC_URI[sha256sum] = "a413f68c252957fc3191c3650823ec356ae8c124ccc0cb440da5cdc4e2cb9e57"
UPSTREAM_CHECK_URI = "https://wayland.freedesktop.org/releases.html"
UPSTREAM_CHECK_REGEX = "weston-(?P<pver>\d+\.\d+\.(?!9\d+)\d+)"
inherit meson pkgconfig useradd
# depends on virtual/egl
#
require ${THISDIR}/required-distro-features.inc
DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0"
DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '', d)}"
WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
EXTRA_OEMESON += "-Dpipewire=false"
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms wayland egl clients', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
${@bb.utils.filter('DISTRO_FEATURES', 'systemd x11', d)} \
${@bb.utils.contains_any('DISTRO_FEATURES', 'wayland x11', '', 'headless', d)} \
${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'sysvinit', 'launcher-libseat', '', d)} \
image-jpeg \
screenshare \
shell-desktop \
shell-fullscreen \
shell-ivi \
shell-kiosk \
"
# Can be 'damage', 'im', 'egl', 'shm', 'touch', 'dmabuf-feedback', 'dmabuf-v4l', 'dmabuf-egl' or 'all'
SIMPLECLIENTS ?= "all"
#
# 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 RDP
PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
# 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,xwayland"
# colord CMS support
PACKAGECONFIG[colord] = "-Ddeprecated-color-management-colord=true,-Ddeprecated-color-management-colord=false,colord"
# Clients support
PACKAGECONFIG[clients] = "-Dsimple-clients=${SIMPLECLIENTS} -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
# Virtual remote output with GStreamer on DRM backend
PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
# 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"
# Kiosk shell
PACKAGECONFIG[shell-kiosk] = "-Dshell-kiosk=true,-Dshell-kiosk=false"
# JPEG image loading support
PACKAGECONFIG[image-jpeg] = "-Dimage-jpeg=true,-Dimage-jpeg=false, jpeg"
# support libseat based launch
PACKAGECONFIG[launcher-libseat] = "-Dlauncher-libseat=true,-Dlauncher-libseat=false,seatd"
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', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
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 += "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"
LIC_FILES_CHKSUM:remove = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70"
LIC_FILES_CHKSUM += "file://LICENSE;md5=d79ee9e66bb0f95d3386a7acae780b70"
DEFAULT_PREFERENCE = "-1"
SRC_URI:remove = "https://gitlab.freedesktop.org/wayland/weston/uploads/f5648c818fba5432edc3ea63c4db4813/${BPN}-${PV}.tar.xz"
SRC_URI:prepend = "${WESTON_SRC};branch=${SRCBRANCH} "
WESTON_SRC ?= "git://github.com/nxp-imx/weston-imx.git;protocol=https"
SRC_URI += "file://0001-Revert-protocol-no-found-wayland-scanner-with-Yocto-.patch"
SRCBRANCH = "weston-imx-11.0.2"
SRCREV = "a3c5e63aa94f8d27b72780e333370be78c9a7653"
S = "${WORKDIR}/git"
PACKAGECONFIG_IMX_REMOVALS ?= "wayland x11"
PACKAGECONFIG:remove = "${PACKAGECONFIG_IMX_REMOVALS}"
PACKAGECONFIG:append:imxgpu2d = " imxg2d"
PACKAGECONFIG:append:mx93-nxp-bsp = " imxg2d"
# Override
PACKAGECONFIG[xwayland] = "-Dxwayland=true,-Dxwayland=false,libxcursor xwayland"
# Weston with i.MX G2D renderer
PACKAGECONFIG[imxg2d] = "-Drenderer-g2d=true,-Drenderer-g2d=false,virtual/libg2d"
# links with imx-gpu libs which are pre-built for glibc
# gcompat will address it during runtime
LDFLAGS:append:imxgpu:libc-musl = " -Wl,--allow-shlib-undefined"
PACKAGE_ARCH = "${MACHINE_SOCARCH}"
COMPATIBLE_MACHINE = "(ccimx93)"
########### End of i.MX overrides #########