diff options
author | Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp> | 2024-11-26 00:55:00 +0900 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2024-11-29 17:17:03 +0000 |
commit | 81f834e59c4896fe771a18de4b4a445d0aba1fdb (patch) | |
tree | 9e829951c9eda3b4932c766d828a25c569508a27 /meta-agl-ic-container | |
parent | 195e125f238d4a08b4f4306c5815fdb2740dc984 (diff) |
Revert "Remove weston with wayland-ivi-extention"
This reverts commit 24f2da7bfd7fa66e8a3b8ed7e5d8c09ef6956c68.
Bug-AGL: SPEC-5308
Change-Id: Ibf15daed630f08ad07bf6f91aaef016927eee0ac
Signed-off-by: Naoto Yamaguchi <naoto.yamaguchi@aisin.co.jp>
Diffstat (limited to 'meta-agl-ic-container')
15 files changed, 446 insertions, 0 deletions
diff --git a/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager/agl.json.in b/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager/agl.json.in new file mode 100644 index 00000000..c241b788 --- /dev/null +++ b/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager/agl.json.in @@ -0,0 +1,70 @@ +{ + "screen": [ + { + "name": "ivi-screen", + "dispname": "@DRM_IVI_DEVICE@" + } + ], + "layer": [ + { + "name": "ivi-layer", + "id": 2000, + "width": 1920, + "height": 1080, + "x": 0, + "y": 0, + "z": 10, + "attach": "ivi-screen" + } + ], + "surface": [ + { + "name": "momiscreen", + "id": 2000, + "x": 0, + "y": 988, + "z": 10, + "attach": "ivi-layer" + }, + { + "name": "mominavi", + "id": 2010, + "x": 0, + "y": 0, + "z": 100, + "attach": "ivi-layer" + }, + { + "name": "momiplay", + "id": 2011, + "x": 0, + "y": 0, + "z": 110, + "attach": "ivi-layer" + }, + { + "name": "momiradio", + "id": 2012, + "x": 0, + "y": 0, + "z": 120, + "attach": "ivi-layer" + }, + { + "name": "momisetting", + "id": 2013, + "x": 0, + "y": 0, + "z": 130, + "attach": "ivi-layer" + }, + { + "name": "xdg-test", + "id": 9801, + "x": 0, + "y": 0, + "z": 300, + "attach": "ivi-layer" + } + ] +} diff --git a/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager/ilm-manager.service b/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager/ilm-manager.service new file mode 100644 index 00000000..b91b65f1 --- /dev/null +++ b/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager/ilm-manager.service @@ -0,0 +1,12 @@ +[Unit] +Description=Tiny Window Manager +After=weston.service +Wants=weston.service + +[Service] +Type=simple +EnvironmentFile=/etc/default/weston +ExecStart=/usr/bin/ilmmanager + +[Install] +WantedBy=weston.service diff --git a/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager_git.bb b/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager_git.bb new file mode 100644 index 00000000..072613fc --- /dev/null +++ b/meta-agl-ic-container/recipes-demo/ilm-manager/ilm-manager_git.bb @@ -0,0 +1,38 @@ +SUMMARY = "Tiny window manager for wayland-ivi-extension" +DESCRIPTION = "Tiny window manager for wayland-ivi-extension" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=89aea4e17d99a7cacdbeed46a0096b10" + +DEPENDS = "jsoncpp wayland-ivi-extension" + +PV = "0.1.0+rev${SRCPV}" + +SRCREV = "e3a33d47195e4656f7117753d27a0f2d6b21aab9" +SRC_URI = " \ + git://github.com/AGLExport/ilm-manager.git;branch=master;protocol=https \ + file://agl.json.in \ + file://ilm-manager.service \ + " +S = "${WORKDIR}/git" + +inherit autotools pkgconfig systemd + +DRM_IVI_DEVICE = "HDMI-A-1" +DRM_IVI_DEVICE:qemuall = "Virtual-1" + +do_install:append() { + #install scripts + + sed 's|@DRM_IVI_DEVICE@|${DRM_IVI_DEVICE}|g' \ + ${WORKDIR}/agl.json.in > ${B}/agl.json + + install -d ${D}${sysconfdir} + install -m 0644 ${B}/agl.json ${D}${sysconfdir} + + install -d ${D}/${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/ilm-manager.service ${D}${systemd_system_unitdir} +} + +FILES:${PN} += " ${systemd_system_unitdir} ${sysconfdir} " +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "ilm-manager.service" diff --git a/meta-agl-ic-container/recipes-graphics/wayland/wayland-ivi-extension/0001-Update-libweston-to-version-13.patch b/meta-agl-ic-container/recipes-graphics/wayland/wayland-ivi-extension/0001-Update-libweston-to-version-13.patch new file mode 100644 index 00000000..008d0f4b --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/wayland-ivi-extension/0001-Update-libweston-to-version-13.patch @@ -0,0 +1,62 @@ +From e7984b2a8a7508cdbc3f269f4e0789edcfe8b30a Mon Sep 17 00:00:00 2001 +From: James Thomas <james.thomas@codethink.co.uk> +Date: Thu, 22 Feb 2024 12:26:58 +0000 +Subject: [PATCH] Update libweston to version 13 + +Upstream-Status: Submitted [https://github.com/COVESA/wayland-ivi-extension/pull/185] +Signed-off-by: Scott Murray <scott.murray@konsulko.com> + +--- + CMakeLists.txt | 2 +- + weston-ivi-shell/src/ivi-controller.c | 10 +++++----- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d6428c2..5917875 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -28,7 +28,7 @@ include(GNUInstallDirs) + SET(IVI_EXTENSION_VERSION 2.3.2) + SET(ILM_API_VERSION 2.3.2) + +-SET(LIBWESTON_VER 12) ++SET(LIBWESTON_VER 13) + + SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter" ) + SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unused-parameter" ) +diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c +index 4701aec..94ca83e 100644 +--- a/weston-ivi-shell/src/ivi-controller.c ++++ b/weston-ivi-shell/src/ivi-controller.c +@@ -881,15 +881,15 @@ set_bkgnd_surface_prop(struct ivishell *shell) + wl_list_for_each(output, &compositor->output_list, link) { + if (!count) + { +- x = output->x; +- y = output->y; ++ x = output->pos.c.x; ++ y = output->pos.c.y; + count++; + } +- dest_width = output->x + output->width; ++ dest_width = output->pos.c.x + output->width; + if (output->height > dest_height) + dest_height = output->height; + weston_log("set_bkgnd_surface_prop: o_name:%s x:%d y:%d o_width:%d o_height:%d\n", +- output->name, output->x, output->y, output->width, output->height); ++ output->name, output->pos.c.x, output->pos.c.y, output->width, output->height); + } + + w_surface = view->surface; +@@ -2197,7 +2197,7 @@ launch_client_process(void *data) + setenv(IVI_CLIENT_ENABLE_CURSOR_ENV_NAME, option, 0x1); + } + +- shell->client = weston_client_start(shell->compositor, ++ shell->client = wet_client_start(shell->compositor, + shell->ivi_client_name); + + shell->client_destroy_listener.notify = ivi_shell_client_destroy; +-- +2.44.0 + diff --git a/meta-agl-ic-container/recipes-graphics/wayland/wayland-ivi-extension_git.bb b/meta-agl-ic-container/recipes-graphics/wayland/wayland-ivi-extension_git.bb new file mode 100644 index 00000000..56090f5d --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/wayland-ivi-extension_git.bb @@ -0,0 +1,30 @@ +SUMMARY = "Wayland IVI Extension" +DESCRIPTION = "GENIVI Layer Management API based on Wayland IVI Extension" +HOMEPAGE = "https://github.com/COVESA/wayland-ivi-extension" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=1f1a56bb2dadf5f2be8eb342acf4ed79" + +DEPENDS = "weston virtual/libgles2 pixman wayland-native" + +PV = "2.3.2+git${SRCPV}" + +SRC_URI = " \ + git://github.com/COVESA/${BPN}.git;protocol=https;branch=master \ + file://0001-Update-libweston-to-version-13.patch \ +" +SRCREV = "60d616ad3abd925956207b9b6ff981afa004e792" + +S = "${WORKDIR}/git" + +inherit cmake pkgconfig + +EXTRA_OECMAKE := "-DWITH_ILM_INPUT=1" +EXTRA_OECMAKE += "-DLIB_SUFFIX=${@d.getVar('baselib').replace('lib', '')}" + +FILES:${PN} += "${datadir}/wayland-protocols/stable/ivi-application/ivi-application.xml" +FILES:${PN} += "${libdir}/weston/*" +FILES:${PN}-dbg += "${libdir}/weston/.debug/*" + +# Need these temporarily to prevent a non-fatal do_package_qa issue +INSANE_SKIP:${PN} += "dev-deps" +INSANE_SKIP:${PN}-dev += "dev-elf dev-so" diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test.bb b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test.bb new file mode 100644 index 00000000..15b44ed2 --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test.bb @@ -0,0 +1,43 @@ +SUMMARY = "Configuration files for the Weston compositors for DRM lease testing" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = " \ + file://weston.ini.ivi \ + file://weston.ini.cluster \ +" + +S = "${WORKDIR}" + +inherit allarch update-alternatives + +# On-target weston.ini directory +weston_ini_dir = "${sysconfdir}/xdg/weston" + +do_install() { + install -d ${D}${weston_ini_dir} + install -m 0644 ${WORKDIR}/weston.ini.ivi ${D}${weston_ini_dir}/ + install -m 0644 ${WORKDIR}/weston.ini.cluster ${D}${weston_ini_dir}/ +} + +ALTERNATIVE_LINK_NAME[weston.ini] = "${weston_ini_dir}/weston.ini" + +RDEPENDS:${PN} = "${BPN}-ivi" +ALLOW_EMPTY:${PN} = "1" + +PACKAGE_BEFORE_PN += "${PN}-ivi" + +FILES:${PN}-ivi = "${weston_ini_dir}/weston.ini.ivi" + +RPROVIDES:${PN}-ivi = "weston-ini" +ALTERNATIVE:${PN}-ivi = "weston.ini" +ALTERNATIVE_TARGET_${PN}-ivi = "${weston_ini_dir}/weston.ini.ivi" + +PACKAGE_BEFORE_PN += "${PN}-cluster" + +FILES:${PN}-cluster = "${weston_ini_dir}/weston.ini.cluster" + +RPROVIDES:${PN}-cluster = "weston-ini" +RCONFLICTS:${PN}-cluster = "${PN}-ivi" +ALTERNATIVE:${PN}-cluster = "weston.ini" +ALTERNATIVE_TARGET_${PN}-cluster = "${weston_ini_dir}/weston.ini.cluster" diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test/weston.ini.cluster b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test/weston.ini.cluster new file mode 100644 index 00000000..13347577 --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test/weston.ini.cluster @@ -0,0 +1,26 @@ +[core] +backend=drm-backend.so +require-input=false +idle-time=0 +modules=systemd-notify.so + +[shell] +locking=false +panel-position=none +background-color=0xff00ff00 + +[output] +name=Virtual-1 +mode=1920x1080 + +[output] +name=Virtual-2 +mode=1920x1080 + +[output] +name=HDMI-A-1 +mode=1920x1080 + +[output] +name=HDMI-A-2 +mode=1920x1080 diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test/weston.ini.ivi b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test/weston.ini.ivi new file mode 100644 index 00000000..24d4ee29 --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-drm-lease-test/weston.ini.ivi @@ -0,0 +1,26 @@ +[core] +backend=drm-backend.so +require-input=false +idle-time=0 +modules=systemd-notify.so + +[shell] +locking=false +panel-position=none +background-color=0xffff0000 + +[output] +name=Virtual-1 +mode=1920x1080 + +[output] +name=Virtual-2 +mode=1920x1080 + +[output] +name=HDMI-A-1 +mode=1920x1080 + +[output] +name=HDMI-A-2 +mode=1920x1080 diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.cluster-guest.ini b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.cluster-guest.ini new file mode 100644 index 00000000..c709d60d --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.cluster-guest.ini @@ -0,0 +1,9 @@ +[core] +backend=drm-backend.so +require-input=false +modules=systemd-notify.so +repaint-window=34 + +[shell] +panel-position=none +background-color=0xff000000 diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.default.ini b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.default.ini new file mode 100644 index 00000000..c709d60d --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.default.ini @@ -0,0 +1,9 @@ +[core] +backend=drm-backend.so +require-input=false +modules=systemd-notify.so +repaint-window=34 + +[shell] +panel-position=none +background-color=0xff000000 diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.ivi-guest.ini b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.ivi-guest.ini new file mode 100644 index 00000000..a664f5e0 --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest/weston.ivi-guest.ini @@ -0,0 +1,14 @@ +[core] +shell=ivi-shell.so +backend=drm-backend.so +require-input=false +modules=systemd-notify.so,ivi-controller.so + +[ivi-shell] +ivi-input-module=ivi-input-controller.so +ivi-id-agent-module=ivi-id-agent.so + +[desktop-app-default] +default-surface-id=9801 +default-surface-id-max=9821 + diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest_0.1.bb b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest_0.1.bb new file mode 100644 index 00000000..740fa8ff --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-ini-conf-guest_0.1.bb @@ -0,0 +1,34 @@ +SUMMARY = "Configuration file for the Weston and AGL Wayland compositors for guest container" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = " \ + file://weston.default.ini \ + file://weston.cluster-guest.ini \ + file://weston.ivi-guest.ini \ +" + +S = "${WORKDIR}" + +inherit allarch + +# Default weston.ini +WESTON_INI_FILE ??= "weston.default.ini" + +# Set container specific weston.ini +WESTON_INI_FILE:aglcontainercluster ?= "weston.cluster-guest.ini" +WESTON_INI_FILE:aglcontainerivi ?= "weston.ivi-guest.ini" + +do_install() { + install -D -p -m0644 ${WORKDIR}/${WESTON_INI_FILE} ${D}${sysconfdir}/xdg/weston/weston.ini +} + +FILES:${PN} += " \ + ${sysconfdir}/xdg/weston/weston.ini \ + " +CONFFILES:${PN} += " \ + ${sysconfdir}/xdg/weston/weston.ini \ + " +RDEPENDS:${PN} = "weston-init-guest" +RPROVIDES:${PN} = "weston-ini" +RCONFLICTS:${PN} = "weston-ini-conf" diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest/weston.env b/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest/weston.env new file mode 100644 index 00000000..7df25aa2 --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest/weston.env @@ -0,0 +1,6 @@ +XDG_RUNTIME_DIR=/run/user/0 +DLM_RUNTIME_PATH=/var/display/drm-lease-manager +DRM_LEASE_DEVICE=lease +WAYLAND_DISPLAY=wayland-1 +LIBSEAT_BACKEND=builtin +SEATD_VTBOUND=0 diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest/weston.service b/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest/weston.service new file mode 100644 index 00000000..94a2a530 --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest/weston.service @@ -0,0 +1,21 @@ +[Unit] +Description=Weston Wayland Compositor +RequiresMountsFor=/run +After=multi-user.target +Wants=multi-user.target + +[Service] +User=root +PAMName=login +EnvironmentFile=-/etc/default/weston +StandardError=journal +PermissionsStartOnly=true +IgnoreSIGPIPE=no +Type=notify +Restart=on-failure +StartLimitInterval=0 + +ExecStart=/usr/bin/weston --config /etc/xdg/weston/weston.ini --idle-time=0 --drm-lease=${DRM_LEASE_DEVICE} --log=/var/log/weston.log + +[Install] +WantedBy=multi-user.target diff --git a/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest_0.1.bb b/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest_0.1.bb new file mode 100644 index 00000000..c95f92e0 --- /dev/null +++ b/meta-agl-ic-container/recipes-graphics/wayland/weston-init-guest_0.1.bb @@ -0,0 +1,46 @@ +SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor in guest cotainer" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://weston.env \ + file://weston.service \ + " + +S = "${WORKDIR}" + +inherit features_check systemd + +do_install() { + install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston + + # Install Weston systemd service and accompanying udev rule + install -D -p -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service + sed -i -e s:/etc:${sysconfdir}:g \ + -e s:/usr/bin:${bindir}:g \ + -e s:/var:${localstatedir}:g \ + ${D}${systemd_unitdir}/system/weston.service +} + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +# rdepends on weston-init-guest which depends on wayland +REQUIRED_DISTRO_FEATURES = "wayland" + +FILES:${PN} += " \ + ${sysconfdir}/xdg/weston/weston.ini \ + ${systemd_system_unitdir}/weston.service \ + ${sysconfdir}/default/weston \ + " +CONFFILES:${PN} += " \ + ${sysconfdir}/xdg/weston/weston.ini \ + ${sysconfdir}/default/weston \ + " +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE:${PN} = "weston.service" +SYSTEMD_AUTO_ENABLE = "enable" + +RDEPENDS:${PN} = " \ + weston \ + weston-ini \ + " +RCONFLICTS:${PN} = "weston-init" |