From c095cbef0a5dabedab8cc8ab0cb6dbc209eb0525 Mon Sep 17 00:00:00 2001 From: Kazumasa Mitsunari Date: Thu, 29 Nov 2018 20:34:28 +0900 Subject: [PATCH 01/16] Bump revision of qtaglextras This commit includes followings 2fe96de Replace slots with Q_SLOTS 72bb964 delete application_name check in tap_shortcut event Change-Id: I06034f6d87cb54b74a92191420417599cea77d10 Signed-off-by: Kazumasa Mitsunari --- recipes-demo-hmi/qtaglextras/qtaglextras_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-demo-hmi/qtaglextras/qtaglextras_git.bb b/recipes-demo-hmi/qtaglextras/qtaglextras_git.bb index 0534adea3..a874a9cfb 100644 --- a/recipes-demo-hmi/qtaglextras/qtaglextras_git.bb +++ b/recipes-demo-hmi/qtaglextras/qtaglextras_git.bb @@ -4,7 +4,7 @@ LIC_FILES_CHKSUM = "file://LICENSE-2.0.txt;md5=3b83ef96387f14655fc854ddc3c6bd57" DEPENDS += "qtbase qtdeclarative qtquickcontrols2 qlibwindowmanager libhomescreen" SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/qtaglextras;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "7c61d70c8f9630133038a8cfef7a0511b1555037" +SRCREV = "2fe96de41a540477d425403cf3a59ec6f5871521" PV = "5.8.0+git${SRCPV}" S = "${WORKDIR}/git/" -- 2.16.6 From 68534b3dfbf623837446f94799a3f80b245f10d9 Mon Sep 17 00:00:00 2001 From: wang_zhiqiang Date: Wed, 12 Dec 2018 10:18:05 +0800 Subject: [PATCH 02/16] update to lastest version change navigation to lastest version, then it will avoid the issue that can't transfer to navigation screen once more. Change-Id: Ic40f9cf9bd1640d033e1620e1e07c711b28562d4 Signed-off-by: wang_zhiqiang --- recipes-demo-hmi/navigation/navigation_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-demo-hmi/navigation/navigation_git.bb b/recipes-demo-hmi/navigation/navigation_git.bb index f35a27551..d4e69b566 100755 --- a/recipes-demo-hmi/navigation/navigation_git.bb +++ b/recipes-demo-hmi/navigation/navigation_git.bb @@ -18,7 +18,7 @@ RDEPENDS_${PN} = " flite openjtalk glib-2.0 freetype sqlite3 wayland zlib expat RDEPENDS_${PN} += " agl-service-navigation " -SRCREV="66b2f6f062e0f141cdeecd449a2d7267078906d3" +SRCREV="2d83844150cce0e245a3d90af67f43385604b569" SRC_URI="git://github.com/AGLExport/gpsnavi.git;branch=agl \ file://download_mapdata_jp.sh \ file://download_mapdata_uk.sh \ -- 2.16.6 From 16c00939e1d79f875f714f0e3bc33c42002c03a0 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Thu, 20 Dec 2018 14:46:03 +0000 Subject: [PATCH 03/16] homescreen: fix missing submodules in SRC_URI New submodule introduced in #19081 is not pulled. Fixing the url in SRC_URI should solve the issue. Change-Id: I5b6852a2e8d9c29fcf39b0c2cd9b15ce8cda2ae1 Signed-off-by: Stephane Desneux --- recipes-demo-hmi/homescreen/homescreen_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-demo-hmi/homescreen/homescreen_git.bb b/recipes-demo-hmi/homescreen/homescreen_git.bb index 283a07dc0..80d402b05 100644 --- a/recipes-demo-hmi/homescreen/homescreen_git.bb +++ b/recipes-demo-hmi/homescreen/homescreen_git.bb @@ -19,7 +19,7 @@ DEPENDS = "\ inherit qmake5 systemd pkgconfig aglwgt -SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/homescreen;protocol=https;branch=${AGL_BRANCH}" +SRC_URI = "gitsm://gerrit.automotivelinux.org/gerrit/apps/homescreen;protocol=https;branch=${AGL_BRANCH}" SRCREV = "${AGL_APP_REVISION}" PV = "1.0+git${SRCPV}" -- 2.16.6 From 6641f56275cb4d843177ab33cc38df94de586255 Mon Sep 17 00:00:00 2001 From: Vitaly Wool Date: Wed, 19 Dec 2018 16:55:18 +0100 Subject: [PATCH 04/16] Add Task Manager front-end Add graphical front-end for Task Manager to recipes-dem-hmi. Change-Id: I43f7b634e977a2140c720851a2ce75f070194e65 Signed-off-by: Vitaly Wool --- recipes-demo-hmi/taskmanager/taskmanager_git.bb | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 recipes-demo-hmi/taskmanager/taskmanager_git.bb diff --git a/recipes-demo-hmi/taskmanager/taskmanager_git.bb b/recipes-demo-hmi/taskmanager/taskmanager_git.bb new file mode 100644 index 000000000..567ce2870 --- /dev/null +++ b/recipes-demo-hmi/taskmanager/taskmanager_git.bb @@ -0,0 +1,25 @@ +SUMMARY = "Task Manager for AGL Demonstration" +DESCRIPTION = "AGL HMI Application for demonstrating task visualisation and management on AGL Distribution" +HOMEPAGE = "https://gerrit.automotivelinux.org/gerrit/#/admin/projects/apps/taskmanager" +SECTION = "apps" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=ae6497158920d9524cf208c09cc4c984" + +SRC_URI = "git://gerrit.automotivelinux.org/gerrit/apps/taskmanager;protocol=https;branch=${AGL_BRANCH}" +SRCREV = "${AGL_APP_REVISION}" + +PV = "1.0+git${SRCPV}" +S = "${WORKDIR}/git" + +# build-time dependencies +DEPENDS += "qtquickcontrols2 \ + qtwebsockets \ + libqtappfw \ + libhomescreen \ + qlibwindowmanager \ +" + +inherit qmake5 aglwgt + +RDEPENDS_${PN} += "agl-service-taskmanager" -- 2.16.6 From f224d66798c7c41bcadefb39f07fc3d7cbe71ec2 Mon Sep 17 00:00:00 2001 From: Frederic Marec Date: Wed, 19 Dec 2018 15:57:02 +0100 Subject: [PATCH 05/16] docs: add yaml book Bug-AGL: SPEC-1988 Change-Id: Icf1eaadb0df87189b01cc87966d23f5b21aa249f Signed-off-by: Frederic Marec --- docs/devguides-book.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/devguides-book.yml diff --git a/docs/devguides-book.yml b/docs/devguides-book.yml new file mode 100644 index 000000000..58c2847ff --- /dev/null +++ b/docs/devguides-book.yml @@ -0,0 +1,13 @@ +type: books +books: +- + id: meta-agl-demo + title: Meta AGL Demo + description: Meta AGL Demo documentation + keywords: + author: "AGL" + version: master + chapters: + - url: ../README.md + destination: meta-agl-demo.md + name: meta-agl-demo \ No newline at end of file -- 2.16.6 From dac8f03df4a2abaa8e588fa4487e731bc0253a08 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 13 Nov 2018 22:41:52 -0500 Subject: [PATCH 06/16] Remove weston-ivi-extension Remove weston-ivi-extension recipe files, as they are being moved to the meta-agl-profile-graphical layer in the meta-agl repository. This allows using weston-ivi-extension in images other than agl-demo-platform. Bug-AGL: SPEC-1730 Change-Id: I31af55b4b0a6233b955688f888b42c4861385188 Signed-off-by: Scott Murray --- .../0001-Added-ivi-id-agent-to-CMake.patch | 35 -- .../0002-ivi-id-agent-added-ivi-id-agent.patch | 538 --------------------- .../0003-ivi-controller-load-id-agent-module.patch | 70 --- .../wandboard_fix_build.patch | 13 - .../wayland/wayland-ivi-extension_2.0.2.bb | 34 -- 5 files changed, 690 deletions(-) delete mode 100644 recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch delete mode 100644 recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch delete mode 100644 recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch delete mode 100644 recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch delete mode 100644 recipes-graphics/wayland/wayland-ivi-extension_2.0.2.bb diff --git a/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch b/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch deleted file mode 100644 index feeef0e22..000000000 --- a/recipes-graphics/wayland/wayland-ivi-extension/0001-Added-ivi-id-agent-to-CMake.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 48977cb77410247df547063d9d7bcd381fb13cde Mon Sep 17 00:00:00 2001 -From: Michael Teyfel -Date: Fri, 12 Oct 2018 17:12:24 +0200 -Subject: [PATCH 1/3] Added ivi-id-agent to CMake - -Signed-off-by: Michael Teyfel ---- - CMakeLists.txt | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index c82136e..33662b9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -23,6 +23,9 @@ SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) - - project(wayland-ivi-extension) - -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(WESTON weston>=2.0.0 REQUIRED) -+ - SET(IVI_EXTENSION_VERSION 2.0.2) - SET(ILM_API_VERSION 2.0.2) - -@@ -35,6 +38,7 @@ add_subdirectory(ivi-layermanagement-api/ilmClient) - add_subdirectory(ivi-layermanagement-api/ilmControl) - add_subdirectory(ivi-layermanagement-api/test) - add_subdirectory(ivi-layermanagement-examples) -+add_subdirectory(ivi-id-agent-modules/ivi-id-agent) - - if(WITH_ILM_INPUT) - add_subdirectory(ivi-input-api/ilmInput) --- -2.7.4 - diff --git a/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch b/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch deleted file mode 100644 index 2b78357fe..000000000 --- a/recipes-graphics/wayland/wayland-ivi-extension/0002-ivi-id-agent-added-ivi-id-agent.patch +++ /dev/null @@ -1,538 +0,0 @@ -From 42fc715a430068cdb4484e2cb119418da8ac4e6f Mon Sep 17 00:00:00 2001 -From: Michael Teyfel -Date: Fri, 12 Oct 2018 16:46:57 +0200 -Subject: [PATCH 2/3] ivi-id-agent: added ivi-id-agent - -This is a reference implementation of an ivi-id-agent plugin. It -creates surface-ids for desktop-surfaces depending on the configuration -provided in "weston.ini". For more please refer to the reference -implementation in this commit. - -The only public interface available is the "id_agent_module_init" -function. It is responsible for initialization of structs and reading -the configuration. - -In the reference "weston.ini" two types of configurations can be found: - -[desktop-app] is used to configure a particular application. Therefore -the desired surface-id must be provided. Moreover "app-title" is the -title that is provided by the desktop application (xdg-protocol). -"app-id" behaves accordingly. Although both parameters can be set, it -is not mandatory. Finally at least one has to be set. - -[desktop-app-default] enables the id-agent to generate generic -surface-ids for unconfigured applications, e.g. for development. This -tag is optional. To generate the id an interval starting from -"default-surface-id" to "default-surface-id-max" is used. The id is -incremented until the interval is exceeded. - -In the function "get_id" a surface-id is assigned by means of the -configuration. It can be adjusted, if another behavior is desired. -In this plugin the parameters, that are described above, are evaluated. - -To use these patches please also apply the dedicated patches for -weston: https://github.com/mtey/weston/tree/xdg_support_ivi_id_agent -Since libweston-desktop is used to introduce desktop-surface support, -xdg-protocol is supported. - -Signed-off-by: Michael Teyfel ---- - ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt | 69 ++++ - .../ivi-id-agent/src/ivi-id-agent.c | 381 +++++++++++++++++++++ - ivi-id-agent-modules/ivi-id-agent/weston.ini.in | 20 ++ - 3 files changed, 470 insertions(+) - create mode 100644 ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt - create mode 100644 ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c - create mode 100644 ivi-id-agent-modules/ivi-id-agent/weston.ini.in - -diff --git a/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt -new file mode 100644 -index 0000000..2def105 ---- /dev/null -+++ b/ivi-id-agent-modules/ivi-id-agent/CMakeLists.txt -@@ -0,0 +1,69 @@ -+############################################################################### -+# -+# Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH -+# -+# -+# Licensed under the Apache License, Version 2.0 (the "License"); -+# you may not use this file except in compliance with the License. -+# You may obtain a copy of the License at -+# -+# http://www.apache.org/licenses/LICENSE-2.0 -+# -+# Unless required by applicable law or agreed to in writing, software -+# distributed under the License is distributed on an "AS IS" BASIS, -+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+# See the License for the specific language governing permissions and -+# limitations under the License. -+# -+############################################################################### -+ -+cmake_minimum_required (VERSION 2.6) -+ -+project(ivi-id-agent) -+ -+find_package(PkgConfig REQUIRED) -+pkg_check_modules(WAYLAND_SERVER wayland-server REQUIRED) -+pkg_check_modules(WESTON weston>=2.0.0 REQUIRED) -+pkg_check_modules(PIXMAN pixman-1 REQUIRED) -+pkg_check_modules(LIBWESTON_DESKTOP libweston-desktop-2 REQUIRED) -+ -+find_package(Threads REQUIRED) -+ -+include_directories( -+ src -+ ${WAYLAND_SERVER_INCLUDE_DIRS} -+ ${WESTON_INCLUDE_DIRS} -+ ${PIXMAN_INCLUDE_DIRS} -+) -+ -+link_directories( -+ ${WAYLAND_SERVER_LIBRARY_DIRS} -+ ${PIXMAN_LIBRARY_DIRS} -+) -+ -+ -+add_library(${PROJECT_NAME} MODULE -+ src/ivi-id-agent.c -+) -+ -+set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "") -+ -+add_dependencies(${PROJECT_NAME} -+ ${WAYLAND_SERVER_LIBRARIES} -+ ${PIXMAN_LIBRARIES} -+) -+ -+set(LIBS -+ ${LIBS} -+ ${WAYLAND_SERVER_LIBRARIES} -+ ${LIBWESTON_DESKTOP_LIBRARIES} -+) -+ -+set(CMAKE_C_LDFLAGS "-module -avoid-version") -+ -+target_link_libraries(${PROJECT_NAME} ${LIBS}) -+ -+install ( -+ TARGETS ${PROJECT_NAME} -+ LIBRARY DESTINATION lib${LIB_SUFFIX}/weston -+) -diff --git a/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c b/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c -new file mode 100644 -index 0000000..9bc115d ---- /dev/null -+++ b/ivi-id-agent-modules/ivi-id-agent/src/ivi-id-agent.c -@@ -0,0 +1,381 @@ -+/* -+ * Copyright (C) 2017 Advanced Driver Information Technology Joint Venture GmbH -+ * -+ * Permission to use, copy, modify, distribute, and sell this software and -+ * its documentation for any purpose is hereby granted without fee, provided -+ * that the above copyright notice appear in all copies and that both that -+ * copyright notice and this permission notice appear in supporting -+ * documentation, and that the name of the copyright holders not be used in -+ * advertising or publicity pertaining to distribution of the software -+ * without specific, written prior permission. The copyright holders make -+ * no representations about the suitability of this software for any -+ * purpose. It is provided "as is" without express or implied warranty. -+ * -+ * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS -+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -+ * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY -+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER -+ * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF -+ * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN -+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -+ */ -+ -+#include -+#include -+#include -+#include -+ -+#include -+#include -+#include "config-parser.h" -+#include -+ -+#ifndef INVALID_ID -+#define INVALID_ID 0xFFFFFFFF -+#endif -+ -+struct db_elem -+{ -+ struct wl_list link; -+ uint32_t surface_id; -+ char *cfg_app_id; -+ char *cfg_title; -+ struct ivi_layout_surface *layout_surface; -+}; -+ -+struct ivi_id_agent -+{ -+ uint32_t default_behavior_set; -+ uint32_t default_surface_id; -+ uint32_t default_surface_id_max; -+ struct wl_list app_list; -+ struct weston_compositor *compositor; -+ const struct ivi_layout_interface *interface; -+ -+ struct wl_listener desktop_surface_configured; -+ struct wl_listener destroy_listener; -+ struct wl_listener surface_removed; -+}; -+ -+static int32_t -+check_config_parameter(char *cfg_val, char *val) -+{ -+ if (cfg_val == NULL) -+ return IVI_SUCCEEDED; -+ else if (val == NULL || strcmp(cfg_val, val) != 0) -+ return IVI_FAILED; -+ -+ return IVI_SUCCEEDED; -+} -+ -+static int32_t -+get_id_from_config(struct ivi_id_agent *ida, struct ivi_layout_surface -+ *layout_surface) { -+ struct db_elem *db_elem; -+ char *temp_app_id = NULL; -+ char *temp_title = NULL; -+ int ret = IVI_FAILED; -+ -+ struct weston_surface *weston_surface = -+ ida->interface->surface_get_weston_surface(layout_surface); -+ -+ /* Get app id and title */ -+ struct weston_desktop_surface *wds = weston_surface_get_desktop_surface( -+ weston_surface); -+ -+ if (weston_desktop_surface_get_app_id(wds) != NULL) -+ temp_app_id = strdup(weston_desktop_surface_get_app_id(wds)); -+ -+ if (weston_desktop_surface_get_title(wds) != NULL) -+ temp_title = strdup(weston_desktop_surface_get_title(wds)); -+ -+ /* -+ * Check for every config parameter to be fulfilled. This part must be -+ * extended, if additional attributes are desired to be checked. -+ */ -+ wl_list_for_each(db_elem, &ida->app_list, link) -+ { -+ if (check_config_parameter(db_elem->cfg_app_id, temp_app_id) == 0) { -+ if (check_config_parameter(db_elem->cfg_title, temp_title) == 0) { -+ /* Found configuration for application. */ -+ int res = ida->interface->surface_set_id(layout_surface, -+ db_elem->surface_id); -+ if (res) -+ continue; -+ -+ db_elem->layout_surface = layout_surface; -+ ret = IVI_SUCCEEDED; -+ -+ break; -+ } -+ } -+ } -+ -+ free(temp_app_id); -+ free(temp_title); -+ -+ return ret; -+} -+ -+/* -+ * This function generates the id of a surface in regard to the desired -+ * parameters. For implementation of different behavior in id generation please -+ * adjust this function. -+ * In this implementation the app_id and/or title of the application is used for -+ * identification. It is also possible to use the pid, uid or gid for example. -+ */ -+static int32_t -+get_id(struct ivi_id_agent *ida, struct ivi_layout_surface *layout_surface) -+{ -+ if (get_id_from_config(ida, layout_surface) == IVI_SUCCEEDED) -+ return IVI_SUCCEEDED; -+ -+ /* No default layer available */ -+ if (ida->default_behavior_set == 0) { -+ weston_log("ivi-id-agent: Could not find configuration for application\n"); -+ goto ivi_failed; -+ -+ /* Default behavior for unknown applications */ -+ } else if (ida->default_surface_id < ida->default_surface_id_max) { -+ weston_log("ivi-id-agent: No configuration for application adding to " -+ "default layer\n"); -+ -+ /* -+ * Check if ivi-shell application already created an application with -+ * desired surface_id -+ */ -+ struct ivi_layout_surface *temp_layout_surf = -+ ida->interface->get_surface_from_id( -+ ida->default_surface_id); -+ if ((temp_layout_surf != NULL) && (temp_layout_surf != layout_surface)) { -+ weston_log("ivi-id-agent: surface_id already used by an ivi-shell " -+ "application\n"); -+ goto ivi_failed; -+ } -+ -+ ida->interface->surface_set_id(layout_surface, -+ ida->default_surface_id); -+ ida->default_surface_id++; -+ -+ } else { -+ weston_log("ivi-id-agent: Interval for default surface_id generation " -+ "exceeded\n"); -+ goto ivi_failed; -+ } -+ -+ return IVI_SUCCEEDED; -+ -+ivi_failed: -+ return IVI_FAILED; -+} -+ -+static void -+desktop_surface_event_configure(struct wl_listener *listener, -+ void *data) -+{ -+ struct ivi_id_agent *ida = wl_container_of(listener, ida, -+ desktop_surface_configured); -+ -+ struct ivi_layout_surface *layout_surface = -+ (struct ivi_layout_surface *) data; -+ -+ if (get_id(ida, layout_surface) == IVI_FAILED) -+ weston_log("ivi-id-agent: Could not create surface_id for application\n"); -+} -+ -+static void -+surface_event_remove(struct wl_listener *listener, void *data) { -+ struct ivi_id_agent *ida = wl_container_of(listener, ida, -+ surface_removed); -+ struct ivi_layout_surface *layout_surface = -+ (struct ivi_layout_surface *) data; -+ struct db_elem *db_elem = NULL; -+ -+ wl_list_for_each(db_elem, &ida->app_list, link) -+ { -+ if(db_elem->layout_surface == layout_surface) { -+ db_elem->layout_surface = NULL; -+ break; -+ } -+ } -+} -+ -+static int32_t deinit(struct ivi_id_agent *ida); -+ -+static void -+id_agent_module_deinit(struct wl_listener *listener, void *data) { -+ (void)data; -+ struct ivi_id_agent *ida = wl_container_of(listener, ida, destroy_listener); -+ -+ deinit(ida); -+} -+ -+static int32_t -+check_config(struct db_elem *curr_db_elem, struct ivi_id_agent *ida) -+{ -+ struct db_elem *db_elem; -+ -+ if (ida->default_surface_id <= curr_db_elem->surface_id -+ && curr_db_elem->surface_id <= ida->default_surface_id_max) { -+ weston_log("ivi-id-agent: surface_id: %d in default id interval " -+ "[%d, %d] (CONFIG ERROR)\n", curr_db_elem->surface_id, -+ ida->default_surface_id, ida->default_surface_id_max); -+ goto ivi_failed; -+ } -+ -+ wl_list_for_each(db_elem, &ida->app_list, link) -+ { -+ if(curr_db_elem == db_elem) -+ continue; -+ -+ if (db_elem->surface_id == curr_db_elem->surface_id) { -+ weston_log("ivi-id-agent: Duplicate surface_id: %d (CONFIG ERROR)\n", -+ curr_db_elem->surface_id); -+ goto ivi_failed; -+ } -+ } -+ -+ return IVI_SUCCEEDED; -+ -+ivi_failed: -+ return IVI_FAILED; -+} -+ -+static int32_t -+read_config(struct ivi_id_agent *ida) -+{ -+ struct weston_config *config = NULL; -+ struct weston_config_section *section = NULL; -+ const char *name = NULL; -+ -+ config = wet_get_config(ida->compositor); -+ if (!config) -+ goto ivi_failed; -+ -+ section = weston_config_get_section(config, "desktop-app-default", NULL, -+ NULL); -+ -+ if (section) { -+ weston_log("ivi-id-agent: Default behavior for unknown applications is " -+ "set\n"); -+ ida->default_behavior_set = 1; -+ -+ weston_config_section_get_uint(section, "default-surface-id", -+ &ida->default_surface_id, INVALID_ID); -+ weston_config_section_get_uint(section, "default-surface-id-max", -+ &ida->default_surface_id_max, INVALID_ID); -+ -+ if (ida->default_surface_id == INVALID_ID || -+ ida->default_surface_id_max == INVALID_ID) { -+ weston_log("ivi-id-agent: Missing configuration for default " -+ "behavior\n"); -+ ida->default_behavior_set = 0; -+ } -+ } else { -+ ida->default_behavior_set = 0; -+ } -+ -+ section = NULL; -+ while (weston_config_next_section(config, §ion, &name)) { -+ struct db_elem *db_elem = NULL; -+ -+ if (strcmp(name, "desktop-app") != 0) -+ continue; -+ -+ db_elem = calloc(1, sizeof *db_elem); -+ if (db_elem == NULL) { -+ weston_log("ivi-id-agent: No memory to allocate\n"); -+ goto ivi_failed; -+ } -+ -+ wl_list_insert(&ida->app_list, &db_elem->link); -+ -+ weston_config_section_get_uint(section, "surface-id", -+ &db_elem->surface_id, INVALID_ID); -+ -+ if (db_elem->surface_id == INVALID_ID) { -+ weston_log("ivi-id-agent: surface-id is not set in configuration\n"); -+ goto ivi_failed; -+ } -+ -+ weston_config_section_get_string(section, "app-id", -+ &db_elem->cfg_app_id, NULL); -+ weston_config_section_get_string(section, "app-title", -+ &db_elem->cfg_title, NULL); -+ -+ if (db_elem->cfg_app_id == NULL && db_elem->cfg_title == NULL) { -+ weston_log("ivi-id-agent: Every parameter is NULL in app " -+ "configuration\n"); -+ goto ivi_failed; -+ } -+ -+ if (check_config(db_elem, ida) == IVI_FAILED) { -+ weston_log("ivi-id-agent: No valid config found, deinit...\n"); -+ goto ivi_failed; -+ } -+ } -+ -+ if(ida->default_behavior_set == 0 && wl_list_empty(&ida->app_list)) { -+ weston_log("ivi-id-agent: No valid config found, deinit...\n"); -+ goto ivi_failed; -+ } -+ -+ return IVI_SUCCEEDED; -+ -+ivi_failed: -+ return IVI_FAILED; -+} -+ -+WL_EXPORT int32_t -+id_agent_module_init(struct weston_compositor *compositor, -+ const struct ivi_layout_interface *interface) -+{ -+ struct ivi_id_agent *ida = NULL; -+ -+ ida = calloc(1, sizeof *ida); -+ if (ida == NULL) { -+ weston_log("failed to allocate ivi_id_agent\n"); -+ goto ivi_failed; -+ } -+ -+ ida->compositor = compositor; -+ ida->interface = interface; -+ ida->desktop_surface_configured.notify = desktop_surface_event_configure; -+ ida->destroy_listener.notify = id_agent_module_deinit; -+ ida->surface_removed.notify = surface_event_remove; -+ -+ wl_signal_add(&compositor->destroy_signal, &ida->destroy_listener); -+ ida->interface->add_listener_configure_desktop_surface( -+ &ida->desktop_surface_configured); -+ interface->add_listener_remove_surface(&ida->surface_removed); -+ -+ wl_list_init(&ida->app_list); -+ if(read_config(ida) != 0) { -+ weston_log("ivi-id-agent: Read config failed\n"); -+ deinit(ida); -+ goto ivi_failed; -+ } -+ -+ return IVI_SUCCEEDED; -+ -+ivi_failed: -+ return IVI_FAILED; -+} -+ -+static int32_t -+deinit(struct ivi_id_agent *ida) -+{ -+ struct db_elem *db_elem; -+ wl_list_for_each(db_elem, &ida->app_list, link) { -+ free(db_elem->cfg_app_id); -+ free(db_elem->cfg_title); -+ free(db_elem); -+ } -+ -+ wl_list_remove(&ida->desktop_surface_configured.link); -+ wl_list_remove(&ida->destroy_listener.link); -+ wl_list_remove(&ida->surface_removed.link); -+ free(ida); -+ -+ return IVI_SUCCEEDED; -+} -diff --git a/ivi-id-agent-modules/ivi-id-agent/weston.ini.in b/ivi-id-agent-modules/ivi-id-agent/weston.ini.in -new file mode 100644 -index 0000000..48a196c ---- /dev/null -+++ b/ivi-id-agent-modules/ivi-id-agent/weston.ini.in -@@ -0,0 +1,20 @@ -+[core] -+shell=ivi-shell.so -+require-input=false -+ -+[ivi-shell] -+ivi-module=ivi-controller.so -+ivi-input-module=ivi-input-controller.so -+ivi-id-agent-module=ivi-id-agent.so -+ -+[desktop-app] -+surface-id=111 -+app-title=Flower -+ -+[desktop-app] -+surface-id=251 -+app-title=Flower -+ -+[desktop-app-default] -+default-surface-id=2000000 -+default-surface-id-max=2001000 --- -2.7.4 - diff --git a/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch b/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch deleted file mode 100644 index 06fe7843a..000000000 --- a/recipes-graphics/wayland/wayland-ivi-extension/0003-ivi-controller-load-id-agent-module.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 5fed5c51ca8c1574804362bfdea4930c16457d34 Mon Sep 17 00:00:00 2001 -From: Michael Teyfel -Date: Fri, 12 Oct 2018 16:57:24 +0200 -Subject: [PATCH 3/3] ivi-controller: load id-agent module - -Signed-off-by: Michael Teyfel ---- - weston-ivi-shell/src/ivi-controller.c | 39 +++++++++++++++++++++++++++++++++++ - 1 file changed, 39 insertions(+) - -diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c -index 6d95c88..f6ac174 100644 ---- a/weston-ivi-shell/src/ivi-controller.c -+++ b/weston-ivi-shell/src/ivi-controller.c -@@ -2164,6 +2164,41 @@ load_input_module(struct ivishell *shell) - return 0; - } - -+static int load_id_agent_module(struct ivishell *shell) -+{ -+ struct weston_config *config = wet_get_config(shell->compositor); -+ struct weston_config_section *section; -+ char *id_agent_module = NULL; -+ -+ int (*id_agent_module_init)(struct weston_compositor *compositor, -+ const struct ivi_layout_interface *interface); -+ -+ section = weston_config_get_section(config, "ivi-shell", NULL, NULL); -+ -+ if (weston_config_section_get_string(section, "ivi-id-agent-module", -+ &id_agent_module, NULL) < 0) { -+ /* input events are handled by weston's default grabs */ -+ weston_log("ivi-controller: No ivi-id-agent-module set\n"); -+ return 0; -+ } -+ -+ id_agent_module_init = wet_load_module_entrypoint(id_agent_module, "id_agent_module_init"); -+ if (!id_agent_module_init) { -+ free(id_agent_module); -+ return -1; -+ } -+ -+ if (id_agent_module_init(shell->compositor, shell->interface) != 0) { -+ weston_log("ivi-controller: Initialization of id-agent module failed\n"); -+ free(id_agent_module); -+ return -1; -+ } -+ -+ free(id_agent_module); -+ -+ return 0; -+} -+ - static void - launch_client_process(void *data) - { -@@ -2229,6 +2264,10 @@ controller_module_init(struct weston_compositor *compositor, - return -1; - } - -+ if (load_id_agent_module(shell) < 0) { -+ weston_log("ivi-controller: id-agent module not loaded\n"); -+ } -+ - if (shell->bkgnd_surface_id && shell->ivi_client_name) { - loop = wl_display_get_event_loop(compositor->wl_display); - wl_event_loop_add_idle(loop, launch_client_process, shell); --- -2.7.4 - diff --git a/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch b/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch deleted file mode 100644 index 86b448be1..000000000 --- a/recipes-graphics/wayland/wayland-ivi-extension/wandboard_fix_build.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 3610fa9..8b4614d 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -34,7 +34,7 @@ add_subdirectory(ivi-layermanagement-api/ilmCommon) - add_subdirectory(ivi-layermanagement-api/ilmClient) - add_subdirectory(ivi-layermanagement-api/ilmControl) - add_subdirectory(ivi-layermanagement-api/test) --add_subdirectory(ivi-layermanagement-examples) -+#add_subdirectory(ivi-layermanagement-examples) - - if(WITH_ILM_INPUT) - add_subdirectory(ivi-input-api/ilmInput) diff --git a/recipes-graphics/wayland/wayland-ivi-extension_2.0.2.bb b/recipes-graphics/wayland/wayland-ivi-extension_2.0.2.bb deleted file mode 100644 index 3f0e34f4b..000000000 --- a/recipes-graphics/wayland/wayland-ivi-extension_2.0.2.bb +++ /dev/null @@ -1,34 +0,0 @@ -SUMMARY = "Wayland IVI Extension" -DESCRIPTION = "GENIVI Layer Management API based on Wayland IVI Extension" -HOMEPAGE = "http://projects.genivi.org/wayland-ivi-extension" -BUGTRACKER = "http://bugs.genivi.org/enter_bug.cgi?product=Wayland%20IVI%20Extension" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=1f1a56bb2dadf5f2be8eb342acf4ed79" - -SRCREV = "ff067a640451de46836200624ece7ac777977c30" -SRC_URI = "git://github.com/GENIVI/${BPN}.git;branch=2.0;protocol=http \ - file://0001-Added-ivi-id-agent-to-CMake.patch \ - file://0002-ivi-id-agent-added-ivi-id-agent.patch \ - file://0003-ivi-controller-load-id-agent-module.patch \ - " -SRC_URI_append_wandboard = " file://wandboard_fix_build.patch" - -S = "${WORKDIR}/git" - -DEPENDS = "weston virtual/libgles2 pixman wayland-native" - -FILESEXTRAPATHS_prepend := ":${THISDIR}/wayland-ivi-extension:" - -# workaround paralellism issue: -PARALLEL_MAKE = "" - -inherit cmake - -EXTRA_OECMAKE := "-DWITH_ILM_INPUT=1" - -FILES_${PN} += "${libdir}/weston/*" -FILES_${PN} += "${datadir}/wayland-protocols/stable/ivi-application/*" - -FILES_${PN}-dbg += "${libdir}/weston/.debug/*" - -EXTRA_OECMAKE += "-DLIB_SUFFIX=${@d.getVar('baselib', True).replace('lib', '')}" -- 2.16.6 From 25c0b44e2e741b348e424249d82e29b9578d8d78 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 4 Dec 2018 17:31:48 -0500 Subject: [PATCH 07/16] Add agl-demo-preload feature Add a feature to preload the maps for the navigation app and the API key for the POI app. The intent is to allow building an image that works "out of the box" without manually installing things. The selection of UK or Japan maps can be controlled by setting the variable DEMO_MAPS_LOCALE to either "uk" (default) or "jp" in local.conf or site.conf. The POI API key should be set in one of those locations with the variable POIAPP_API_KEY (default value is an empty string). Change-Id: I25537935ddac740090f2121d0a83305c746185b0 Signed-off-by: Scott Murray --- recipes-demo-hmi/navigation/navigation-maps-jp_1.0.bb | 14 ++++++++++++++ recipes-demo-hmi/navigation/navigation-maps-uk_1.0.bb | 14 ++++++++++++++ recipes-demo-hmi/navigation/navigation-maps.inc | 14 ++++++++++++++ recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb | 17 +++++++++++++++++ .../packagegroups/packagegroup-agl-demo-platform.bb | 5 +++++ templates/feature/agl-demo-preload/50_local.conf.inc | 1 + 6 files changed, 65 insertions(+) create mode 100755 recipes-demo-hmi/navigation/navigation-maps-jp_1.0.bb create mode 100755 recipes-demo-hmi/navigation/navigation-maps-uk_1.0.bb create mode 100755 recipes-demo-hmi/navigation/navigation-maps.inc create mode 100755 recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb create mode 100644 templates/feature/agl-demo-preload/50_local.conf.inc diff --git a/recipes-demo-hmi/navigation/navigation-maps-jp_1.0.bb b/recipes-demo-hmi/navigation/navigation-maps-jp_1.0.bb new file mode 100755 index 000000000..27979b3db --- /dev/null +++ b/recipes-demo-hmi/navigation/navigation-maps-jp_1.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "AGL Reference Navigation application Japan maps" +DESCRIPTION = "Preload the Japanese maps for the AGL Navigation application." +HOMEPAGE = "http://agl.wismobi.com/" +SECTION = "apps" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM="file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" + +SRC_URI = "http://agl.wismobi.com/data/japan_TR9/navi_data.tar.gz" +SRC_URI[md5sum] = "4fd44b0633d44d41c07227d086cd299c" +SRC_URI[sha256sum] = "ce39a36741baccd6b40277acb8c81ebc181997c75483dffb46ccd22f7877295a" + +require navigation-maps.inc + +RCONFLICTS_${PN} = "navigation-maps-uk" diff --git a/recipes-demo-hmi/navigation/navigation-maps-uk_1.0.bb b/recipes-demo-hmi/navigation/navigation-maps-uk_1.0.bb new file mode 100755 index 000000000..1718c36b0 --- /dev/null +++ b/recipes-demo-hmi/navigation/navigation-maps-uk_1.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "AGL Reference Navigation application UK maps" +DESCRIPTION = "Preload the UK maps for the AGL Navigation application." +HOMEPAGE = "http://agl.wismobi.com/" +SECTION = "apps" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM="file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" + +SRC_URI = "http://agl.wismobi.com/data/UnitedKingdom_TR9/navi_data_UK.tar.gz" +SRC_URI[md5sum] = "f711c6d2c88553a1de4db9f7e12f6e8e" +SRC_URI[sha256sum] = "515bdc81ac0615d541e0d18c186ad5cd24de2d47b60e13079a918f6dec802fd7" + +require navigation-maps.inc + +RCONFLICTS_${PN} = "navigation-maps-jp" diff --git a/recipes-demo-hmi/navigation/navigation-maps.inc b/recipes-demo-hmi/navigation/navigation-maps.inc new file mode 100755 index 000000000..49b7ab496 --- /dev/null +++ b/recipes-demo-hmi/navigation/navigation-maps.inc @@ -0,0 +1,14 @@ +DEPENDS = "tar-native" + +SRC_URI_append = ";downloadfilename=${BP}.tar.gz;unpack=0" + +do_compile[noexec] = "1" + +do_install () { + install -d ${D}${localstatedir}/mapdata + tar -C ${D}${localstatedir}/mapdata --no-same-owner -xf ${WORKDIR}/${BP}.tar.gz +} + +FILES_${PN} += "${localstatedir}/mapdata/*" + +RDEPENDS_${PN} += "navigation" diff --git a/recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb b/recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb new file mode 100755 index 000000000..ad6546fea --- /dev/null +++ b/recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb @@ -0,0 +1,17 @@ +SUMMARY = "AGL Reference POI application API key." +DESCRIPTION = "Preload the API key for the AGL POI application." +HOMEPAGE = "https://github.com/AGLExport/genivi-navi-yelp-client" +SECTION = "apps" +LICENSE = "Proprietary" +LIC_FILES_CHKSUM="file://${COMMON_LICENSE_DIR}/Proprietary;md5=0557f9d92cf58f2ccdd50f62f8ac0b28" + +do_fetch[noexec] = "1" +do_unpack[noexec] = "1" +do_compile[noexec] = "1" + +POIAPP_API_KEY ?= "" + +do_install () { + install -d ${D}${sysconfdir} + echo "${POIAPP_API_KEY}" > ${D}${sysconfdir}/poikey +} diff --git a/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb b/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb index 9deaea2a1..40e4d3c20 100755 --- a/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb +++ b/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb @@ -61,6 +61,10 @@ QTAGLEXTRAS = "${@bb.utils.contains("DISTRO_FEATURES", "agl-hmi-framework", " qt # mapviewer and mapviewer-demo are required for AGL cluster demo MAPVIEWER = "${@bb.utils.contains("DISTRO_FEATURES", "agl-cluster-demo-support", " mapviewer mapviewer-demo", "",d)}" +# Preload navigation maps and poi API key for demo if requested +DEMO_MAPS_LOCALE ?= "uk" +DEMO_PRELOAD = "${@bb.utils.contains("DISTRO_FEATURES", "agl-demo-preload", " navigation-maps-${DEMO_MAPS_LOCALE} poiapp-api-key", "",d)}" + RDEPENDS_${PN}_append = " \ qtquickcontrols2-agl \ qtquickcontrols2-agl-style \ @@ -70,6 +74,7 @@ RDEPENDS_${PN}_append = " \ ${AGL_APIS} \ ${QTAGLEXTRAS} \ ${MAPVIEWER} \ + ${DEMO_PRELOAD} \ " diff --git a/templates/feature/agl-demo-preload/50_local.conf.inc b/templates/feature/agl-demo-preload/50_local.conf.inc new file mode 100644 index 000000000..c7524e5ae --- /dev/null +++ b/templates/feature/agl-demo-preload/50_local.conf.inc @@ -0,0 +1 @@ +DISTRO_FEATURES_append = " agl-demo-preload" -- 2.16.6 From d83abd39742aa01cab3db251ca28fab2306c764a Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Fri, 7 Dec 2018 11:53:32 -0500 Subject: [PATCH 08/16] Rework mapviewer and mapviewer-demo Rework the mapviewer and mapviewer-demo recipes to get mapviewer working out of the box for the cluster demo: - Remove the old on/off scripts, as the intent is that the cluster demo work out of the box on an image built with the agl-cluster-demo-support feature. - The separate weston systemd unit has been replaced with a drop-in over-ride file. - A new systemd unit is installed to configure the network connection to the cluster board. This is required now because the weston unit no longer runs as root. - A systemd drop-in is added to have afm-api-windowmanager@.service depend on weston-ready. This is a bit of a workaround ATM, as the windowmanager service was consistently failing due to Weston taking longer to start with the gst-record feature enabled. It is likely that making this more generic should be investigated. - The mapviewer systemd unit has been updated. Its Install target is now afm-user-session@.target; in my testing this seemed the least invasive solution, as there are some dependency loop issues that currently prevent adding it to multi-user.target. As well, its dependencies have been updated from weston and HomeScreen to afm-api-windowmanager@, which is not entirely ideal, but is about the best that can be done ATM given that mapviewer interacts with the other windowmanager users via Weston, but is not an app framework application. Change-Id: I8826e670ae156edd461cc657acefc86e7836a916 Signed-off-by: Scott Murray --- recipes-demo-hmi/navigation/mapviewer-demo.bb | 51 +++++++++++----------- .../mapviewer-demo-network-conf.service | 15 +++++++ .../mapviewer-demo/switch_off_mapviewer-demo.sh | 5 --- .../mapviewer-demo/switch_on_mapviewer-demo.sh | 6 --- .../mapviewer-demo/weston-mapviewer-demo.conf | 11 +++++ .../mapviewer-demo/weston-mapviewer-demo.service | 16 ------- .../navigation/mapviewer-demo/weston-ready.conf | 4 ++ .../navigation/mapviewer/mapviewer.service | 12 ++--- recipes-demo-hmi/navigation/mapviewer_%.bbappend | 23 ++++------ 9 files changed, 70 insertions(+), 73 deletions(-) create mode 100644 recipes-demo-hmi/navigation/mapviewer-demo/mapviewer-demo-network-conf.service delete mode 100755 recipes-demo-hmi/navigation/mapviewer-demo/switch_off_mapviewer-demo.sh delete mode 100755 recipes-demo-hmi/navigation/mapviewer-demo/switch_on_mapviewer-demo.sh create mode 100644 recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.conf delete mode 100644 recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.service create mode 100644 recipes-demo-hmi/navigation/mapviewer-demo/weston-ready.conf mode change 100755 => 100644 recipes-demo-hmi/navigation/mapviewer/mapviewer.service diff --git a/recipes-demo-hmi/navigation/mapviewer-demo.bb b/recipes-demo-hmi/navigation/mapviewer-demo.bb index fe897709a..95910da77 100644 --- a/recipes-demo-hmi/navigation/mapviewer-demo.bb +++ b/recipes-demo-hmi/navigation/mapviewer-demo.bb @@ -1,5 +1,5 @@ -SUMMARY = "Setting files of mapviewer for the AGL Demonstrator @ CES2017" -DESCRIPTION = "Setting files of mapviewer for the AGL Demonstrator @ CES2017" +SUMMARY = "Setting files of mapviewer for the AGL Demonstrator" +DESCRIPTION = "Setting files of mapviewer for the AGL Demonstrator" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" @@ -8,35 +8,36 @@ SECTION = "apps" inherit systemd SRC_URI = " \ - file://switch_off_mapviewer-demo.sh \ - file://switch_on_mapviewer-demo.sh \ file://weston-mapviewer-demo.ini \ - file://weston-mapviewer-demo.service \ - " + file://weston-mapviewer-demo.conf \ + file://weston-ready.conf \ + file://mapviewer-demo-network-conf.service \ +" do_install() { - # Map viewer demo - install -d ${D}/usr/AGL/${PN} - install -m 0755 ${WORKDIR}/switch_off_${PN}.sh ${D}/usr/AGL/${PN} - install -m 0755 ${WORKDIR}/switch_on_${PN}.sh ${D}/usr/AGL/${PN} - + # Install tweaked weston configuration install -d ${D}${sysconfdir}/xdg/weston install -m 0644 ${WORKDIR}/weston-${PN}.ini ${D}${sysconfdir}/xdg/weston/weston-${PN}.ini - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/weston-mapviewer-demo.service ${D}${systemd_system_unitdir} - sed -i "s:/home/root:${ROOT_HOME}:" ${D}${systemd_system_unitdir}/weston-mapviewer-demo.service + # Install weston service unit configuration over-ride drop-in + install -d ${D}${systemd_system_unitdir}/weston.service.d + install -m 0644 ${WORKDIR}/weston-mapviewer-demo.conf ${D}${systemd_system_unitdir}/weston.service.d + + # Install cluster demo network configuration service unit + install -m 0644 ${WORKDIR}/mapviewer-demo-network-conf.service ${D}${systemd_system_unitdir} + # Add symlink to network.target.wants + install -d ${D}${sysconfdir}/systemd/system/network.target.wants + ln -s ${systemd_system_unitdir}/mapviewer-demo-network-conf.service ${D}${sysconfdir}/systemd/system/network.target.wants/ + + # Workaround for now to ensure that the windowmanager and its dependencies + # start after weston, which takes longer with gst-record enabled. + # This should be investigated a bit further and likely reworked into + # something more generically applicable. + install -d ${D}${sysconfdir}/systemd/system/afm-api-windowmanager@.service.d + install -m 0644 ${WORKDIR}/weston-ready.conf ${D}${sysconfdir}/systemd/system/afm-api-windowmanager@.service.d } -## DO NOT ENABLE 'weston-mapviewer-demo.service' BY DEFAULT -## -## The 'weston-mapviewer-demo.service' is exclusive of default 'weston.ini', -## it should be enabled/disabled by 'switch_on_mapviewer-demo.sh'/'switch_off_mapviewer-demo.sh'. -## -#SYSTEMD_SERVICE_${PN} = "weston-mapviewer-demo.service" - FILES_${PN} += " \ - ${systemd_system_unitdir} \ - /usr/AGL/${PN}/ \ - ${sysconfdir}/xdg/weston/${PN} \ - " + ${sysconfdir}/xdg/weston/ \ + ${systemd_system_unitdir} \ +" diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/mapviewer-demo-network-conf.service b/recipes-demo-hmi/navigation/mapviewer-demo/mapviewer-demo-network-conf.service new file mode 100644 index 000000000..1a6e2d8b7 --- /dev/null +++ b/recipes-demo-hmi/navigation/mapviewer-demo/mapviewer-demo-network-conf.service @@ -0,0 +1,15 @@ +[Unit] +Description=Configure dedicated link for cluster demo network +After=sys-subsystem-net-devices-eth1.device +Requires=sys-subsystem-net-devices-eth1.device +Before=network.target + +[Service] +# Note that this is done as opposed to using connman as configuring an +# interface on a second network separate from the rest of the interfaces +# is non-trivial in connman and needs further investigation. +ExecStart=/sbin/ifconfig eth1 192.168.20.93 +Type=oneshot + +[Install] +WantedBy=network.target diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/switch_off_mapviewer-demo.sh b/recipes-demo-hmi/navigation/mapviewer-demo/switch_off_mapviewer-demo.sh deleted file mode 100755 index 22fa16c7c..000000000 --- a/recipes-demo-hmi/navigation/mapviewer-demo/switch_off_mapviewer-demo.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -/bin/systemctl disable weston-mapviewer-demo.service -/bin/systemctl enable weston.service -/bin/systemctl disable mapviewer.service diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/switch_on_mapviewer-demo.sh b/recipes-demo-hmi/navigation/mapviewer-demo/switch_on_mapviewer-demo.sh deleted file mode 100755 index f61cdc700..000000000 --- a/recipes-demo-hmi/navigation/mapviewer-demo/switch_on_mapviewer-demo.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -/bin/systemctl disable weston.service -/bin/systemctl enable weston-mapviewer-demo.service -/bin/systemctl enable mapviewer.service - diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.conf b/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.conf new file mode 100644 index 000000000..8bccffd29 --- /dev/null +++ b/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.conf @@ -0,0 +1,11 @@ +[Unit] +# Add dependency on network, since the recorder feature requires it +After=network.target +Requires=network.target + +[Service] +# GSM? +ExecStartPre=/bin/sleep 2 +# Replace default ExecStart line with one that uses the cluster demo specific ini +ExecStart= +ExecStart=/usr/bin/weston --idle-time=0 --tty=1 --gst-record --config=weston-mapviewer-demo.ini --log=/run/platform/display/weston.log diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.service b/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.service deleted file mode 100644 index 65275cc03..000000000 --- a/recipes-demo-hmi/navigation/mapviewer-demo/weston-mapviewer-demo.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Weston reference Wayland compositor -Conflicts=getty@tty1.service -After=dbus.service rc.pvr.service - -[Service] -ExecStartPre=/sbin/ifconfig eth0 192.168.20.93 -ExecStartPre=/bin/rm -rf /home/root/.cache/gstreamer-1.0 -#ExecStartPre=/bin/sleep 10 -ExecStart=/usr/bin/weston-launch -u root -- --idle-time=4294967 --gst-record --config=weston-mapviewer-demo.ini -ExecStop=/usr/bin/killall -s KILL weston -Type=simple - -[Install] -WantedBy=multi-user.target -Alias=weston.service diff --git a/recipes-demo-hmi/navigation/mapviewer-demo/weston-ready.conf b/recipes-demo-hmi/navigation/mapviewer-demo/weston-ready.conf new file mode 100644 index 000000000..e90eed5f8 --- /dev/null +++ b/recipes-demo-hmi/navigation/mapviewer-demo/weston-ready.conf @@ -0,0 +1,4 @@ +[Unit] +Requires=weston-ready.service +After=weston-ready.service + diff --git a/recipes-demo-hmi/navigation/mapviewer/mapviewer.service b/recipes-demo-hmi/navigation/mapviewer/mapviewer.service old mode 100755 new mode 100644 index c7baae7a8..971327cc2 --- a/recipes-demo-hmi/navigation/mapviewer/mapviewer.service +++ b/recipes-demo-hmi/navigation/mapviewer/mapviewer.service @@ -1,22 +1,22 @@ [Unit] -Conflicts=getty@tty1.service -After=weston.service HomeScreen.service +Requires=afm-api-windowmanager@0.service +After=afm-api-windowmanager@0.service -# map viewr is a child application which can work with navigation. +# mapviewer is a child application which can work with navigation. # This app requires mapdata. It has to be stored at /var/mapdata/navi_data_UK . -# currently the position to be shown is 384x368 surface on screen 1 for CES2017 cluster demo. +# currently the position to be shown is 384x368 surface on screen 1 for cluster demo. [Service] +Environment="XDG_RUNTIME_DIR=/run/platform/display" ExecStartPre=/bin/sleep 5 ExecStart=/usr/bin/mapview ExecStartPost=/usr/bin/LayerManagerControl create layer 11001 1920 1080 ExecStartPost=/usr/bin/LayerManagerControl set layer 11001 visibility 1 ExecStartPost=/usr/bin/LayerManagerControl set screen 1 render order 11001 ExecStartPost=/usr/AGL/mapviewer/mapviewer-settings.sh - ExecStop=/usr/bin/killall -s KILL mapview Type=simple Restart=always [Install] -WantedBy=default.target +WantedBy=afm-user-session@.target diff --git a/recipes-demo-hmi/navigation/mapviewer_%.bbappend b/recipes-demo-hmi/navigation/mapviewer_%.bbappend index 4e89af064..a5597083b 100644 --- a/recipes-demo-hmi/navigation/mapviewer_%.bbappend +++ b/recipes-demo-hmi/navigation/mapviewer_%.bbappend @@ -3,30 +3,23 @@ FILESEXTRAPATHS_append := ":${THISDIR}/${PN}" SRC_URI_append = "\ file://mapviewer-settings.sh \ file://mapviewer.service \ - " +" inherit systemd SYSTEMD_PACKAGES = "${PN}" do_install_append() { - install -d ${D}/usr/AGL/${PN} - install -m 0755 ${WORKDIR}/mapviewer-settings.sh ${D}/usr/AGL/${PN}/ + install -d ${D}${prefix}/AGL/${PN} + install -m 0755 ${WORKDIR}/mapviewer-settings.sh ${D}${prefix}/AGL/${PN}/ - # Install systemd unit files + # Install systemd unit file if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then - install -d ${D}${systemd_user_unitdir} - install -m 644 -p -D ${WORKDIR}/mapviewer.service ${D}${systemd_user_unitdir}/mapviewer.service + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/mapviewer.service ${D}${systemd_system_unitdir}/mapviewer.service fi } -## DO NOT ENABLE 'weston-mapviewer-demo.service' BY DEFAULT -## -## This should be enabled/disabled by 'switch_on_mapviewer-demo.sh'/'switch_off_mapviewer-demo.sh'. -## -#SYSTEMD_SERVICE_${PN} = "mapviewer.service" +SYSTEMD_SERVICE_${PN} = "mapviewer.service" -FILES_${PN} += " \ - ${systemd_user_unitdir}/mapviewer.service \ - /usr/AGL/mapviewer/ \ - " +FILES_${PN} += "${prefix}/AGL/${PN}/" -- 2.16.6 From d786abb46aa885898c61d08dc7d6b4564bea2b93 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Sun, 16 Dec 2018 20:51:25 -0500 Subject: [PATCH 09/16] poiapp-api-key: Add client ID Somehow in my original testing the POI app was working even though the client ID was not being added to /etc/poikey as the first line. Add a POIAPP_CLIENT_ID variable to go with POIAPP_API_KEY, and write them both to the file. As well, mark the package as platform independent, as it contains just a text configuration file. Change-Id: Iab5d6aa44007c61457697882d9a2ece12f984acf Signed-off-by: Scott Murray --- recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb b/recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb index ad6546fea..4d53fdbfb 100755 --- a/recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb +++ b/recipes-demo-hmi/navigation/poiapp-api-key_1.0.bb @@ -9,9 +9,13 @@ do_fetch[noexec] = "1" do_unpack[noexec] = "1" do_compile[noexec] = "1" +POIAPP_CLIENT_ID ?= "" POIAPP_API_KEY ?= "" do_install () { install -d ${D}${sysconfdir} - echo "${POIAPP_API_KEY}" > ${D}${sysconfdir}/poikey + echo "${POIAPP_CLIENT_ID}" > ${D}${sysconfdir}/poikey + echo "${POIAPP_API_KEY}" >> ${D}${sysconfdir}/poikey } + +PACKAGE_ARCH = "all" -- 2.16.6 From 4913c46bf2c4099bf467eee30c0faf1d41618fa2 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Tue, 18 Dec 2018 16:22:10 -0500 Subject: [PATCH 10/16] Disable btwilink by default on m3ulcb Testing for CES has found the wilink BT on the M3+Kingfisher somewhat unreliable. To disable it by default for now, add a demo platform configuration hook to packagegroup-agl-demo-platform and use it to pick up a modprobe configuration file to prevent btwilink from loading. This addition is specific to the m3ulcb platform, and the variable DEMO_ENABLE_BTWILINK can be used to over-ride the behavior by setting it to "true" in local.conf or site.conf. Change-Id: Ia645d9329594547f83601526e3f3fd5da5845b24 Signed-off-by: Scott Murray --- .../btwilink-disable-conf/btwilink-disable-conf_1.0.bb | 14 ++++++++++++++ .../btwilink-disable-conf/files/btwilink-disable.conf | 1 + .../packagegroups/packagegroup-agl-demo-platform.bb | 10 ++++++++-- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 recipes-connectivity/btwilink-disable-conf/btwilink-disable-conf_1.0.bb create mode 100644 recipes-connectivity/btwilink-disable-conf/files/btwilink-disable.conf diff --git a/recipes-connectivity/btwilink-disable-conf/btwilink-disable-conf_1.0.bb b/recipes-connectivity/btwilink-disable-conf/btwilink-disable-conf_1.0.bb new file mode 100644 index 000000000..9170a84e6 --- /dev/null +++ b/recipes-connectivity/btwilink-disable-conf/btwilink-disable-conf_1.0.bb @@ -0,0 +1,14 @@ +SUMMARY = "btwilink module disabling modprobe configuration" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" + +SRC_URI = "file://btwilink-disable.conf" + +COMPATIBLE_MACHINE = "m3ulcb" + +do_compile[noexec] = "1" + +do_install() { + install -d ${D}${sysconfdir}/modprobe.d + install -m 0644 ${WORKDIR}/btwilink-disable.conf ${D}${sysconfdir}/modprobe.d +} diff --git a/recipes-connectivity/btwilink-disable-conf/files/btwilink-disable.conf b/recipes-connectivity/btwilink-disable-conf/files/btwilink-disable.conf new file mode 100644 index 000000000..8d28f629e --- /dev/null +++ b/recipes-connectivity/btwilink-disable-conf/files/btwilink-disable.conf @@ -0,0 +1 @@ +install btwilink /bin/false diff --git a/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb b/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb index 40e4d3c20..d7dddb7db 100755 --- a/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb +++ b/recipes-platform/packagegroups/packagegroup-agl-demo-platform.bb @@ -65,6 +65,13 @@ MAPVIEWER = "${@bb.utils.contains("DISTRO_FEATURES", "agl-cluster-demo-support", DEMO_MAPS_LOCALE ?= "uk" DEMO_PRELOAD = "${@bb.utils.contains("DISTRO_FEATURES", "agl-demo-preload", " navigation-maps-${DEMO_MAPS_LOCALE} poiapp-api-key", "",d)}" +# Hook for demo platform configuration +# ATM, only used to disable btwilink module on M3ULCB + Kingfisher by default, +# setting DEMO_ENABLE_BTWILINK to "true" in local.conf / site.conf re-enables. +DEMO_ENABLE_BTWILINK ?= "" +DEMO_PLATFORM_CONF = "" +DEMO_PLATFORM_CONF_append_m3ulcb = "${@bb.utils.contains("DEMO_ENABLE_BTWILINK", "true", "", " btwilink-disable-conf", d)}" + RDEPENDS_${PN}_append = " \ qtquickcontrols2-agl \ qtquickcontrols2-agl-style \ @@ -75,6 +82,5 @@ RDEPENDS_${PN}_append = " \ ${QTAGLEXTRAS} \ ${MAPVIEWER} \ ${DEMO_PRELOAD} \ + ${DEMO_PLATFORM_CONF} \ " - - -- 2.16.6 From 602b0293ac24702e1e4957312dcd1e765d28e125 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 20 Dec 2018 17:50:23 +0100 Subject: [PATCH 11/16] Add the libafb-helpers and libappcontroller to SDK Bug-AGL: SPEC-1689 Change-Id: I5f7ab962f9df3b931aeae7fa44f0160801ca1c1d Signed-off-by: Romain Forlot --- recipes-platform/images/agl-demo-platform-crosssdk.bb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-platform/images/agl-demo-platform-crosssdk.bb b/recipes-platform/images/agl-demo-platform-crosssdk.bb index 65de7fe7c..d51ae053b 100755 --- a/recipes-platform/images/agl-demo-platform-crosssdk.bb +++ b/recipes-platform/images/agl-demo-platform-crosssdk.bb @@ -44,6 +44,8 @@ TOOLCHAIN_TARGET_TASK += " \ libssp-dev \ lua-dev \ lua-staticdev \ + libafb-helpers-staticdev \ + libappcontroller-staticdev \ ${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'ffmpeg-dev', '', d)} \ " -- 2.16.6 From fa93473cc5b3c016fbf8b850a9cae657799ad308 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Thu, 27 Dec 2018 12:29:58 +0100 Subject: [PATCH 12/16] Revert "Add the libafb-helpers and libappcontroller to SDK" This reverts commit 602b0293ac24702e1e4957312dcd1e765d28e125. This is needed due to the other revert in meta-agl (#19359). Otherwise, agl-demo-platform-crosssdk is not buildable. Bug-AGL: SPEC-1689 Change-Id: Iae246faf53f8fa4946891de49646aec87fb14c19 Signed-off-by: Stephane Desneux --- recipes-platform/images/agl-demo-platform-crosssdk.bb | 2 -- 1 file changed, 2 deletions(-) diff --git a/recipes-platform/images/agl-demo-platform-crosssdk.bb b/recipes-platform/images/agl-demo-platform-crosssdk.bb index d51ae053b..65de7fe7c 100755 --- a/recipes-platform/images/agl-demo-platform-crosssdk.bb +++ b/recipes-platform/images/agl-demo-platform-crosssdk.bb @@ -44,8 +44,6 @@ TOOLCHAIN_TARGET_TASK += " \ libssp-dev \ lua-dev \ lua-staticdev \ - libafb-helpers-staticdev \ - libappcontroller-staticdev \ ${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'ffmpeg-dev', '', d)} \ " -- 2.16.6 From d069edcf73573b2c6e3e7deab89db2d4d058b691 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Fri, 21 Dec 2018 03:50:26 +0200 Subject: [PATCH 13/16] recipes-demo-hmi: libqtappfw: update SRCREV cdfb8ce libqtappfw: mediaplayer: set album art via qml context Change-Id: Ibc386c63dd4fe8dc2f39593de3f9be1964cc06cc Signed-off-by: Matt Ranostay --- recipes-demo-hmi/libqtappfw/libqtappfw_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-demo-hmi/libqtappfw/libqtappfw_git.bb b/recipes-demo-hmi/libqtappfw/libqtappfw_git.bb index a972f669c..06fcfba6f 100644 --- a/recipes-demo-hmi/libqtappfw/libqtappfw_git.bb +++ b/recipes-demo-hmi/libqtappfw/libqtappfw_git.bb @@ -13,7 +13,7 @@ DEPENDS += "qtbase qtdeclarative qtwebsockets libvcard" inherit cmake_qt5 SRC_URI = "git://gerrit.automotivelinux.org/gerrit/src/libqtappfw;protocol=https;branch=${AGL_BRANCH}" -SRCREV = "2a37b2bd4aa01ae5567921bd894aae68287a0e99" +SRCREV = "cdfb8ce39e99616d84742c337213fc4bfebd1ad4" S = "${WORKDIR}/git/" # PV needs to be modified with SRCPV to work AUTOREV correctly -- 2.16.6 From 8f8f17a76fec4500a62232d23895bdc0b86fe234 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Fri, 28 Dec 2018 02:05:56 +0200 Subject: [PATCH 14/16] recipe-connectivity: libvcard: update SRCREV 6f76a76 Fix version number in README 20c1bcc Add support to unfold long vcard lines according to rfc6350 d41f15a Avoid adding empty property parameters, otherwise vCardProperty will be considered invalid, since empty parameters are considered invalid (RFC 6350 does not include a restriction about properties without parameters) Bug-AGL: SPEC-2088 Change-Id: I38c0d35a8306c70ff68b9f3c2cb24cba06fb667e Signed-off-by: Matt Ranostay --- recipes-connectivity/libvcard/libvcard_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-connectivity/libvcard/libvcard_git.bb b/recipes-connectivity/libvcard/libvcard_git.bb index 30680228c..86e3c0f14 100644 --- a/recipes-connectivity/libvcard/libvcard_git.bb +++ b/recipes-connectivity/libvcard/libvcard_git.bb @@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=f94eaed54ffa1718d593504bae740faf" DEPENDS += "qtbase" -SRCREV = "4250e2468552ea01954244a2d9cd5d2b44b00042" +SRCREV = "9b43ca01865f171cdd8a7d47b6da7c1a41c03e38" SRC_URI = "git://github.com/pol51/libvcard.git;protocol=https" PV = "1.0+gitr${SRCPV}" -- 2.16.6 From 3b619c6ed499f2fc6ef650a5b11dde71b4f3e6a0 Mon Sep 17 00:00:00 2001 From: Scott Murray Date: Thu, 20 Dec 2018 22:30:11 -0500 Subject: [PATCH 15/16] navigation: Add 4A support To properly support 4A in the navigation app, add a patch to pull in the 4A binding, add some code to open / close the "navigation" role, and use a simple gstreamer pipeline to play the generated files. The existing playback script templates have had their playback commands removed, but are retained for driving the voice file generation. Note that a patch is being used for now, as gpsnavi is managed outside of AGL on github. Additionally, that repository has no flounder branch, and its HEAD does not work on flounder at present, complicating things. Change-Id: Ie5c63c2ae22237a80dc034b98d7279d3c203273f Signed-off-by: Scott Murray (cherry picked from commit 6f1a4e94f9b978639e858fbe8ce98012a1781ee5) --- .../navigation/0001-add-4A-playback-support.patch | 361 +++++++++++++++++++++ recipes-demo-hmi/navigation/navigation_git.bb | 3 +- 2 files changed, 363 insertions(+), 1 deletion(-) create mode 100644 recipes-demo-hmi/navigation/navigation/0001-add-4A-playback-support.patch diff --git a/recipes-demo-hmi/navigation/navigation/0001-add-4A-playback-support.patch b/recipes-demo-hmi/navigation/navigation/0001-add-4A-playback-support.patch new file mode 100644 index 000000000..b4192358c --- /dev/null +++ b/recipes-demo-hmi/navigation/navigation/0001-add-4A-playback-support.patch @@ -0,0 +1,361 @@ +gpsnavi: Add AGL 4A playback support + +To properly support 4A on AGL, pull in the binding, add some code +to open / close the "navigation" role, and use a simple gstreamer +pipeline to play the generated files. The existing script templates +have had their playback commands removed, but are retained for +driving the voice file generation. + +Signed-off-by: Scott Murray + +diff --git a/agl/config.xml b/agl/config.xml +index 9d4c0ca..960f652 100755 +--- a/agl/config.xml ++++ b/agl/config.xml +@@ -7,11 +7,13 @@ + AISIN AW + + ++ + + + + + ++ + + GPL + +diff --git a/configure.ac b/configure.ac +index 33348c3..6b7b391 100755 +--- a/configure.ac ++++ b/configure.ac +@@ -26,11 +26,13 @@ PKG_CHECK_MODULES([GLIB], [glib-2.0 gthread-2.0]) + PKG_CHECK_MODULES([FREETYPE2], [freetype2]) + PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-egl egl]) + PKG_CHECK_MODULES([GL], [glesv2]) ++PKG_CHECK_MODULES([GSTREAMER], [gstreamer-1.0]) + PKG_CHECK_MODULES([ZLIB], [zlib]) + PKG_CHECK_MODULES([SQLITE3], [sqlite3]) + PKG_CHECK_MODULES([EXPAT], [expat]) + PKG_CHECK_MODULES([OPENSSL], [openssl]) + PKG_CHECK_MODULES([DBUSCXX], [dbus-c++-1]) ++PKG_CHECK_MODULES([LIBAFBWSC], [libafbwsc]) + PKG_CHECK_MODULES([WINDOWMANAGER], [libwindowmanager]) + PKG_CHECK_MODULES([HOMESCREEN], [libhomescreen]) + +diff --git a/flite_agl.in b/flite_agl.in +index 28b512c..d11b043 100644 +--- a/flite_agl.in ++++ b/flite_agl.in +@@ -1,6 +1,3 @@ + #!/bin/sh + TMP=/tmp/navi.wav + echo "$1" | flite_hts_engine -m @datadir@/Voice/us/cmu_us_arctic_slt.htsvoice -o $TMP +-paplay --property='media.role=Navi' $TMP +-rm -f $TMP +- +diff --git a/jtalk_agl.in b/jtalk_agl.in +index 76900f4..857c824 100644 +--- a/jtalk_agl.in ++++ b/jtalk_agl.in +@@ -1,6 +1,3 @@ + #!/bin/sh + TMP=/tmp/navi.wav + echo "$1" | open_jtalk -ow $TMP -m @exec_prefix@/share/Voice/mei/mei_normal.htsvoice -x @exec_prefix@/share/dic/ +-paplay --property='media.role=Navi' $TMP +-rm -f $TMP +- +diff --git a/src/Makefile.am b/src/Makefile.am +index affb9a5..6d0fa55 100755 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -26,6 +26,7 @@ sms/sms-core/SMCoreDM/RG/RG_GuideNear.c \ + sms/sms-core/SMCoreDM/RG/RG_ShareData.c \ + sms/sms-core/SMCoreDM/RG/RG_GuideVoiceBuild_en.c \ + sms/sms-core/SMCoreDM/RG/RG_GuideVoice.c \ ++sms/sms-core/SMCoreDM/RG/RG_GuideVoice4A.cpp \ + sms/sms-core/SMCoreDM/RG/RG_GuideApi.c \ + sms/sms-core/SMCoreDM/SCRTThread.c \ + sms/sms-core/SMCoreDAL/SMDALAreaCls.c \ +@@ -537,6 +538,8 @@ libnavicore_la_CFLAGS = -fPIC \ + @FREETYPE2_CFLAGS@ \ + @WAYLAND_CFLAGS@ \ + @GL_CFLAGS@ \ ++ @GSTREAMER_CFLAGS@ \ ++ @LIBAFBWSC_CFLAGS@ \ + @ZLIB_CFLAGS@ \ + @SQLITE3_CFLAGS@ \ + @EXPAT_CFLAGS@ \ +@@ -547,6 +550,8 @@ libnavicore_la_CXXFLAGS = -fPIC \ + @FREETYPE2_CFLAGS@ \ + @WAYLAND_CFLAGS@ \ + @GL_CFLAGS@ \ ++ @GSTREAMER_CFLAGS@ \ ++ @LIBAFBWSC_CFLAGS@ \ + @ZLIB_CFLAGS@ \ + @SQLITE3_CFLAGS@ \ + @EXPAT_CFLAGS@ \ +@@ -555,6 +560,8 @@ libnavicore_la_CXXFLAGS = -fPIC \ + libnavicore_la_LIBADD = \ + @OPENSSL_LIBS@ \ + @GL_LIBS@ \ ++ @GSTREAMER_LIBS@ \ ++ @LIBAFBWSC_LIBS@ \ + @ZLIB_LIBS@ \ + @SQLITE3_LIBS@ \ + @EXPAT_LIBS@ +diff --git a/src/sms/sms-core/SMCoreDM/RG/RG_GuideVoice.c b/src/sms/sms-core/SMCoreDM/RG/RG_GuideVoice.c +index 3828d5c..36e6775 100755 +--- a/src/sms/sms-core/SMCoreDM/RG/RG_GuideVoice.c ++++ b/src/sms/sms-core/SMCoreDM/RG/RG_GuideVoice.c +@@ -16,6 +16,8 @@ + + #include "sms-core/SMCoreDM/SMCoreDMInternal.h" + ++extern int play_voice(const char* voice_gen_cmd); ++ + typedef struct _tts_text_tbl + { + INT32 code; +@@ -205,9 +207,9 @@ E_SC_RESULT RG_CTL_CreateVoiceText(RT_NAME_t *in, INT32 language) + } + else + { +- strncat(tts_voice, "\" & ", (TTSMAX - len - 1)); ++ strncat(tts_voice, "\"", (TTSMAX - len - 1)); + +- system(tts_voice); ++ play_voice(tts_voice); + } + + return (e_SC_RESULT_SUCCESS); +diff --git a/src/sms/sms-core/SMCoreDM/RG/RG_GuideVoice4A.cpp b/src/sms/sms-core/SMCoreDM/RG/RG_GuideVoice4A.cpp +new file mode 100644 +index 0000000..6b59c0e +--- /dev/null ++++ b/src/sms/sms-core/SMCoreDM/RG/RG_GuideVoice4A.cpp +@@ -0,0 +1,223 @@ ++/* ++ * Copyright (C) 2018 Konsulko Group ++ * Author: Scott Murray ++ * ++ * This program is licensed under GPL version 2 license. ++ * See the LICENSE file distributed with this source file. ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++extern "C" ++{ ++#include ++#include ++#include ++} ++ ++#define NAVI_TMPFILE "/tmp/navi.wav" ++ ++static struct afb_wsj1* ws; ++static struct afb_wsj1_itf itf; ++sd_event* loop; ++ ++// port and token from src/glview/glview_wayland.cpp ++extern long g_port; ++extern std::string g_token; ++ ++static int set_role_state(bool state); ++ ++void play_voice_file(const char *output) ++{ ++ if(!output) ++ return; ++ ++ // Initialize GStreamer ++ gst_init(NULL, NULL); ++ ++ std::string pipeline_str = "filesrc location="; ++ pipeline_str += NAVI_TMPFILE; ++ pipeline_str += " ! wavparse ! audioconvert ! audioresample ! alsasink device="; ++ pipeline_str += output; ++ GstElement *pipeline = gst_parse_launch(pipeline_str.c_str(), NULL); ++ if(!pipeline) { ++ std::cerr << "gstreamer pipeline construction failed!" << std::endl; ++ return; ++ } ++ ++ // Start pipeline ++ gst_element_set_state(pipeline, GST_STATE_PLAYING); ++ std::cerr << "Playing guidance" << std::endl; ++ ++ // Wait until error or EOS ++ GstBus *bus = gst_element_get_bus(pipeline); ++ GstMessage *msg = gst_bus_timed_pop_filtered(bus, ++ GST_CLOCK_TIME_NONE, ++ (GstMessageType) (GST_MESSAGE_ERROR | GST_MESSAGE_EOS)); ++ ++ // Free resources ++ if(msg != NULL) ++ gst_message_unref(msg); ++ gst_object_unref(bus); ++ gst_element_set_state(pipeline, GST_STATE_NULL); ++ gst_object_unref(pipeline); ++ ++ // Remove temporary file ++ unlink(NAVI_TMPFILE); ++ ++ return; ++} ++ ++static void on_hangup(void *closure, struct afb_wsj1 *wsj) ++{ ++} ++ ++static void on_call(void *closure, const char *api, const char *verb, struct afb_wsj1_msg *msg) ++{ ++} ++ ++static void on_event(void* closure, const char* event, struct afb_wsj1_msg *msg) ++{ ++} ++ ++static void on_reply(void *closure, struct afb_wsj1_msg *msg) ++{ ++ bool state = (bool) closure; ++ ++ if(!state) { ++ // Role is closed, return ++ return; ++ } ++ ++ // We opened the role, play the file ++ struct json_object* reply = afb_wsj1_msg_object_j(msg); ++ if(reply) { ++ struct json_object* response; ++ int rc = json_object_object_get_ex(reply, "response", &response); ++ if(rc) { ++ struct json_object* val; ++ rc = json_object_object_get_ex(response, "device_uri", &val); ++ if (rc && json_object_get_string_len(val)) { ++ const char* jres_pcm = json_object_get_string(val); ++ play_voice_file(jres_pcm); ++ } ++ } ++ } ++ ++ // Give up role now that we're done ++ set_role_state(false); ++} ++ ++static void *event_loop_run(void *args) ++{ ++ struct sd_event* loop = (struct sd_event*)(args); ++ ++ for(;;) ++ sd_event_run(loop, 30000000); ++} ++ ++static int start_event_loop(void) ++{ ++ if(ws && loop) { ++ pthread_t thread_id; ++ if(pthread_create(&thread_id, NULL, event_loop_run, loop) != 0) { ++ return -1; ++ } else { ++ return thread_id; ++ } ++ } else { ++ return -1; ++ } ++} ++ ++static int init_ws(int port, std::string &token) ++{ ++ loop = NULL; ++ std::string uri; ++ ++ if(sd_event_default(&loop) < 0) { ++ std::cerr << __FUNCTION__ << ": Failed to create event loop" << std::endl; ++ goto error; ++ } ++ ++ // Initialize interface for websocket ++ itf.on_hangup = on_hangup; ++ itf.on_call = on_call; ++ itf.on_event = on_event; ++ ++ uri = "ws://localhost:" + std::to_string(port) + "/api?token=" + token; ++ std::cerr << "Using URI: " << uri << std::endl; ++ ws = afb_ws_client_connect_wsj1(loop, uri.c_str(), &itf, NULL); ++ if(ws == NULL) { ++ std::cerr << __FUNCTION__ << ": Failed to create websocket connection" << std::endl; ++ goto error; ++ } ++ start_event_loop(); ++ return 0; ++error: ++ if(loop) { ++ sd_event_unref(loop); ++ } ++ return -1; ++} ++ ++static int set_role_state(bool state) ++{ ++ int rc; ++ json_object *jsonData = json_object_new_object(); ++ ++ json_object_object_add(jsonData, "action", json_object_new_string(state ? "open" : "close")); ++ rc = afb_wsj1_call_j(ws, "ahl-4a", "navigation", jsonData, on_reply, (void*) state); ++ if (rc < 0) { ++ std::cerr << __FUNCTION__ << ": Failed to call ahl-4a/navigation!" << std::endl; ++ } ++ return rc; ++} ++ ++pthread_mutex_t ws_mutex = PTHREAD_MUTEX_INITIALIZER; ++ ++static void *play_voice_handler(void *data) ++{ ++ int rc; ++ char *voice_gen_cmd = (char*) data; ++ if(!voice_gen_cmd) ++ return NULL; ++ ++ pthread_mutex_lock(&ws_mutex); ++ if(!ws) { ++ rc = init_ws(g_port, g_token); ++ pthread_mutex_unlock(&ws_mutex); ++ if(rc < 0) ++ return NULL; ++ } ++ pthread_mutex_unlock(&ws_mutex); ++ ++ // Generate guidance voice file ++ rc = system(voice_gen_cmd); ++ free(voice_gen_cmd); ++ ++ // Try to get role and play file ++ set_role_state(true); ++ ++ return NULL; ++} ++ ++extern "C" int play_voice(const char* voice_gen_cmd) ++{ ++ pthread_t handler_thread; ++ char *tmp; ++ ++ if(!voice_gen_cmd) ++ return -1; ++ ++ tmp = strdup(voice_gen_cmd); ++ return pthread_create(&handler_thread, NULL, play_voice_handler, (void*) tmp); ++} diff --git a/recipes-demo-hmi/navigation/navigation_git.bb b/recipes-demo-hmi/navigation/navigation_git.bb index d4e69b566..119d7d102 100755 --- a/recipes-demo-hmi/navigation/navigation_git.bb +++ b/recipes-demo-hmi/navigation/navigation_git.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM="file://LICENSE;md5=3595e9c703a847d990664d2b396a9df0 \ DEPENDS = " \ glib-2.0 freetype sqlite3 wayland zlib expat openssl virtual/libgles2 virtual/libgl virtual/egl \ - wayland libdbus-c++ af-main af-binder libwindowmanager libhomescreen \ + wayland libdbus-c++ af-main af-binder libwindowmanager libhomescreen gstreamer1.0 \ " RDEPENDS_${PN} = " flite openjtalk glib-2.0 freetype sqlite3 wayland zlib expat openssl \ @@ -20,6 +20,7 @@ RDEPENDS_${PN} += " agl-service-navigation " SRCREV="2d83844150cce0e245a3d90af67f43385604b569" SRC_URI="git://github.com/AGLExport/gpsnavi.git;branch=agl \ + file://0001-add-4A-playback-support.patch \ file://download_mapdata_jp.sh \ file://download_mapdata_uk.sh \ file://org.agl.naviapi.conf \ -- 2.16.6 From f4eb970c8fc93d7670afbd75ec2e51c40337ed93 Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Thu, 20 Dec 2018 17:50:23 +0100 Subject: [PATCH 16/16] Add the libafb-helpers and libappcontroller to SDK Bug-AGL: SPEC-1689 Change-Id: I373bc6eac903c7513fddee25f82f30e7d1567f1a Signed-off-by: Romain Forlot --- recipes-platform/images/agl-demo-platform-crosssdk.bb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes-platform/images/agl-demo-platform-crosssdk.bb b/recipes-platform/images/agl-demo-platform-crosssdk.bb index 65de7fe7c..95c090cbd 100755 --- a/recipes-platform/images/agl-demo-platform-crosssdk.bb +++ b/recipes-platform/images/agl-demo-platform-crosssdk.bb @@ -44,6 +44,9 @@ TOOLCHAIN_TARGET_TASK += " \ libssp-dev \ lua-dev \ lua-staticdev \ + libafb-helpers-staticdev \ + libafb-helpers-qt-staticdev \ + libappcontroller-staticdev \ ${@bb.utils.contains('LICENSE_FLAGS_WHITELIST', 'commercial', 'ffmpeg-dev', '', d)} \ " -- 2.16.6