From 30063de420b4f6c993dd3f2021ab84f622d69320 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Mon, 25 May 2020 15:01:08 -0400 Subject: Cluster demo support updates Changes include: - Add agl-weston-remoting feature that sets "weston-remoting" distro feature. The intent is to replace agl-gstrecorder in meta-agl-devel with something more generic. - Add weston remoting initialization timing patch to weston bbappend in meta-agl-profile-graphical, conditional on "weston-remoting" distro feature. - The 0004-unconditionally-include-mman.h.patch weston patch is no longer required after the SMACK labeling changes, remove it as cleanup. - Enable the weston "remoting" PACKAGECONFIG in weston bbappend, also conditional on "weston-remoting". A redefinition of the "remoting" PACKAGECONFIG option is required to fix a recipe bug that will have a fix sent upstream. - Rename virtualoutput.cfg weston.ini fragment to remote-output.cfg to better reflect its current contents. Bug-AGL: SPEC-3395 Signed-off-by: Scott Murray Change-Id: I9c0579670d81296492b3b8bed93aafb3f7ffc15c Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/meta-agl/+/24567 Tested-by: Jenkins Job builder account ci-image-build: Jenkins Job builder account ci-image-boot-test: Jenkins Job builder account Reviewed-by: Jan-Simon Moeller --- .../wayland/weston-ini-conf.bbappend | 12 +++---- .../wayland/weston-ini-conf/remote-output.cfg | 5 +++ .../wayland/weston-ini-conf/virtualoutput.cfg | 5 --- ...ain-change-remoting-initialization-timing.patch | 40 ++++++++++++++++++++++ .../0004-unconditionally-include-mman.h.patch | 33 ------------------ .../recipes-graphics/wayland/weston_8.0.%.bbappend | 6 +++- .../feature/agl-weston-remoting/50_local.conf.inc | 1 + .../README_feature_agl-weston-remoting.md | 9 +++++ templates/feature/agl-weston-remoting/included.dep | 1 + 9 files changed, 67 insertions(+), 45 deletions(-) create mode 100644 meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg delete mode 100644 meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg create mode 100644 meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch delete mode 100644 meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-unconditionally-include-mman.h.patch create mode 100644 templates/feature/agl-weston-remoting/50_local.conf.inc create mode 100644 templates/feature/agl-weston-remoting/README_feature_agl-weston-remoting.md create mode 100644 templates/feature/agl-weston-remoting/included.dep diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend index 00cd35b3a..f954514cf 100644 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend +++ b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf.bbappend @@ -2,11 +2,11 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" PACKAGE_ARCH = "${MACHINE_ARCH}" -SRC_URI += "${@bb.utils.contains("DISTRO_FEATURES", "gst-record", "file://virtualoutput.cfg", "",d)}" +SRC_URI += "${@bb.utils.contains("DISTRO_FEATURES", "weston-remoting", "file://remote-output.cfg", "",d)}" -do_configure_append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'gst-record', 'true', 'false', d)}; then - echo virtual=1 >> ${WORKDIR}/core.cfg - fi -} +#do_configure_append() { +# if ${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', 'true', 'false', d)}; then +# echo virtual=1 >> ${WORKDIR}/core.cfg +# fi +#} diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg new file mode 100644 index 000000000..f69a2e096 --- /dev/null +++ b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/remote-output.cfg @@ -0,0 +1,5 @@ +[remote-output] +name=remote-1 +mode=640x720@30 +host=192.168.20.99 +port=5005 diff --git a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg b/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg deleted file mode 100644 index f69a2e096..000000000 --- a/meta-agl-bsp/recipes-graphics/wayland/weston-ini-conf/virtualoutput.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[remote-output] -name=remote-1 -mode=640x720@30 -host=192.168.20.99 -port=5005 diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch new file mode 100644 index 000000000..61772182c --- /dev/null +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-main-change-remoting-initialization-timing.patch @@ -0,0 +1,40 @@ +From 0a0103f20437d9ed63b6cec500027a6d7bf6185f Mon Sep 17 00:00:00 2001 +From: Harunobu Kurokawa +Date: Mon, 20 May 2019 18:31:32 +0900 +Subject: [PATCH] main: change remoting initialization timing + +Upstream-Status: Pending[1] + +[1]: https://gitlab.freedesktop.org/wayland/weston/issues/246 + +Signed-off-by: Tomohito Esaki +Signed-off-by: Harunobu Kurokawa +[Updated for Weston 8.0.0] +Signed-off-by: Scott Murray + +--- +diff --git a/compositor/main.c b/compositor/main.c +index 8eb8a47..22686b0 100644 +--- a/compositor/main.c ++++ b/compositor/main.c +@@ -2518,9 +2518,6 @@ load_drm_backend(struct weston_compositor *c, + ret = weston_compositor_load_backend(c, WESTON_BACKEND_DRM, + &config.base); + +- /* remoting */ +- load_remoting(c, wc); +- + /* pipewire */ + load_pipewire(c, wc); + +@@ -3278,6 +3275,10 @@ wet_main(int argc, char *argv[]) + if (wet.init_failed) + goto out; + ++ /* remoting: only support on drm-backend */ ++ if (strstr(backend, "drm-backend.so")) ++ load_remoting(wet.compositor, config); ++ + if (idle_time < 0) + weston_config_section_get_int(section, "idle-time", &idle_time, -1); + if (idle_time < 0) diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-unconditionally-include-mman.h.patch b/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-unconditionally-include-mman.h.patch deleted file mode 100644 index 278087156..000000000 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston/0004-unconditionally-include-mman.h.patch +++ /dev/null @@ -1,33 +0,0 @@ -commit 7b36f171d09354a2d3a48db0ae2d34d66aa4f1ae -Author: James Hilliard -Date: Sat Feb 1 20:02:29 2020 -0700 - - unconditionally include sys/mman.h in os-compatibility.c - - Fixes: - ../shared/os-compatibility.c:273:25: error: ‘PROT_READ’ undeclared (first use in this function); did you mean ‘LOCK_READ’? - map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, file->fd, 0); - ^~~~~~~~~ - LOCK_READ - - Signed-off-by: James Hilliard - -Upstream-Status: Backport - -Signed-off-by: Scott Murray - -diff --git a/shared/os-compatibility.c b/shared/os-compatibility.c -index 5e1ce479..041c929f 100644 ---- a/shared/os-compatibility.c -+++ b/shared/os-compatibility.c -@@ -34,10 +34,7 @@ - #include - #include - #include -- --#ifdef HAVE_MEMFD_CREATE - #include --#endif - - #include "os-compatibility.h" - diff --git a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.%.bbappend b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.%.bbappend index bafd6bbcf..bada11c3f 100644 --- a/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.%.bbappend +++ b/meta-agl-profile-graphical/recipes-graphics/wayland/weston_8.0.%.bbappend @@ -8,12 +8,16 @@ SRC_URI_append = "\ file://0001-Allow-regular-users-to-launch-Weston_7.0.0.patch \ file://0002-ivi-shell-Fix-crash-due-no-transmitter-screen.patch \ file://0001-libweston-Expose-weston_output_damage-in-libweston.patch \ - file://0004-unconditionally-include-mman.h.patch \ + file://0004-main-change-remoting-initialization-timing.patch \ file://smack-weston \ " EXTRA_OEMESON_append = " -Denable-user-start=true" +# Workaround for incorrect upstream definition +PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base" +PACKAGECONFIG_append = "${@bb.utils.contains('DISTRO_FEATURES', 'weston-remoting', ' remoting', '', d)}" + do_install_append() { if ${@bb.utils.contains('DISTRO_FEATURES', 'smack', 'true', 'false', d)}; then # Install SMACK rules diff --git a/templates/feature/agl-weston-remoting/50_local.conf.inc b/templates/feature/agl-weston-remoting/50_local.conf.inc new file mode 100644 index 000000000..da1ddb3a0 --- /dev/null +++ b/templates/feature/agl-weston-remoting/50_local.conf.inc @@ -0,0 +1 @@ +DISTRO_FEATURES_append = " weston-remoting" diff --git a/templates/feature/agl-weston-remoting/README_feature_agl-weston-remoting.md b/templates/feature/agl-weston-remoting/README_feature_agl-weston-remoting.md new file mode 100644 index 000000000..03b05d496 --- /dev/null +++ b/templates/feature/agl-weston-remoting/README_feature_agl-weston-remoting.md @@ -0,0 +1,9 @@ +--- +description: Feature agl-weston-remoting +authors: Scott Murray +--- + +### Feature agl-weston-remoting + +Enables secondary remote display configuration using Weston's remoting feaure. + diff --git a/templates/feature/agl-weston-remoting/included.dep b/templates/feature/agl-weston-remoting/included.dep new file mode 100644 index 000000000..032609b8a --- /dev/null +++ b/templates/feature/agl-weston-remoting/included.dep @@ -0,0 +1 @@ +agl-profile-graphical -- cgit 1.2.3-korg