diff options
author | Joel Winarske <joel.winarske@gmail.com> | 2023-10-17 10:35:36 -0700 |
---|---|---|
committer | Scott Murray <scott.murray@konsulko.com> | 2023-10-18 16:33:26 -0400 |
commit | 15df7f399d57729b6583d24cecf0e9d7add75a03 (patch) | |
tree | 64102eeea404a326558d497dd7208328cc22b69f /meta-agl-flutter | |
parent | d9670d5543f8a9444ab01d39ad8a95bc1aee3df3 (diff) |
Flutter 3.13.2 update
-README update
-workspace-automation configs
* _global.json - move to 3.13.2
* _repos.json - remove wonderous, update commits, add depot_tools
* flutter-engine.json - flutter engine local build (optional)
* desktop-auto.json - remove clang from desktop-auto config
-flutter-engine recipe
* remove bbappend patches
-flutter-auto
* update agl-shell PACKAGECONFIG addition
* remove patches
upstream picked up 0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch
dropped 0001-Add-optional-agl_shell-plugin.patch
Bug-AGL: SPEC-4936
Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
Signed-off-by: Scott Murray <scott.murray@konsulko.com>
Change-Id: Iddd7c0f735abb4d114ba89a8bf0e49977b469150
Diffstat (limited to 'meta-agl-flutter')
16 files changed, 133 insertions, 561 deletions
diff --git a/meta-agl-flutter/README.md b/meta-agl-flutter/README.md index ba017d15..58dcf95b 100644 --- a/meta-agl-flutter/README.md +++ b/meta-agl-flutter/README.md @@ -24,7 +24,7 @@ This builds AGL demo image that includes Flutter runtime={debug,profile,release} source meta-agl/scripts/aglsetup.sh -m qemux86-64 agl-devel agl-flutter bitbake agl-image-flutter ``` - * include Flutter engine runtime={debug,release,profile} + * includes Flutter engine runtime={debug,release,profile} * includes Flutter Engine SDK * includes SSH server * live debugging/profiling with target via host @@ -83,6 +83,11 @@ If qemu_run was sucessfully invoked, then this platform will be an available `cu Append `--device-id=AGL-qemu` to `flutter <cmd>` to select this device. +### Flutter Engine + +To enable local build of Flutter Engine set `tools/configs/flutter-engine.json` load key to true. + +This enables debugging as custom engine development. ## Steps to Test Flutter Images diff --git a/meta-agl-flutter/conf/include/agl-flutter.inc b/meta-agl-flutter/conf/include/agl-flutter.inc index a3e166a8..2bd5ffd3 100644 --- a/meta-agl-flutter/conf/include/agl-flutter.inc +++ b/meta-agl-flutter/conf/include/agl-flutter.inc @@ -1,7 +1,3 @@ AGL_FEATURES += "agl-flutter" -FLUTTER_SDK_TAG = "3.3.7" - -# Override flutter-gallery version to set it to a version that builds -# against 3.3.7. -SRCREV:pn-flutter-gallery = "9eb785cb997ff56c46e933c1c591f0a6f31454f6" +FLUTTER_SDK_TAG = "3.13.2" diff --git a/meta-agl-flutter/recipes-graphics/flutter-engine/files/0001-clang-toolchain.patch b/meta-agl-flutter/recipes-graphics/flutter-engine/files/0001-clang-toolchain.patch deleted file mode 100644 index 8553a3a5..00000000 --- a/meta-agl-flutter/recipes-graphics/flutter-engine/files/0001-clang-toolchain.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2ee90379fbfa4bda0274f691c2c832621c2333df Mon Sep 17 00:00:00 2001 -From: Joel Winarske <joel.winarske@linux.com> -Date: Fri, 19 Feb 2021 22:15:24 +0000 -Subject: [PATCH 1/2] clang toolchain - ---- - build/toolchain/custom/BUILD.gn | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/build/toolchain/custom/BUILD.gn b/build/toolchain/custom/BUILD.gn -index 65b1623..8b3f6f8 100644 ---- a/build/toolchain/custom/BUILD.gn -+++ b/build/toolchain/custom/BUILD.gn -@@ -12,11 +12,11 @@ toolchain("custom") { - # these values in our scope. - cc = "${toolchain_bin}/clang" - cxx = "${toolchain_bin}/clang++" -- ar = "${toolchain_bin}/${custom_target_triple}-ar" -+ ar = "${toolchain_bin}/llvm-ar" - ld = "${toolchain_bin}/clang++" -- readelf = "${toolchain_bin}/${custom_target_triple}-readelf" -- nm = "${toolchain_bin}/${custom_target_triple}-nm" -- strip = "${toolchain_bin}/${custom_target_triple}-strip" -+ readelf = "${toolchain_bin}/llvm-readelf" -+ nm = "${toolchain_bin}/llvm-nm" -+ strip = "${toolchain_bin}/llvm-strip" - - target_triple_flags = "--target=${custom_target_triple}" - sysroot_flags = "--sysroot ${custom_sysroot}" -@@ -84,10 +84,9 @@ toolchain("custom") { - link_command = "$ld $target_triple_flags $sysroot_flags -shared {{ldflags}} -o $unstripped_sofile $custom_lib_flags -Wl,--build-id=sha1 -Wl,-soname=$soname @$rspfile" - toc_command = "{ $readelf -d $unstripped_sofile | grep SONAME ; $nm -gD -f posix $unstripped_sofile | cut -f1-2 -d' '; } > $temporary_tocname" - replace_command = "if ! cmp -s $temporary_tocname $tocfile; then mv $temporary_tocname $tocfile; fi" -- strip_command = "$strip -o $sofile $unstripped_sofile" - - command = -- "$link_command && $toc_command && $replace_command && $strip_command" -+ "$link_command && $toc_command && $replace_command" - rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive {{libs}}" - - description = "SOLINK $sofile" --- -2.29.2 - diff --git a/meta-agl-flutter/recipes-graphics/flutter-engine/files/0002-x64-sysroot-assert.patch b/meta-agl-flutter/recipes-graphics/flutter-engine/files/0002-x64-sysroot-assert.patch deleted file mode 100644 index 6265b2f3..00000000 --- a/meta-agl-flutter/recipes-graphics/flutter-engine/files/0002-x64-sysroot-assert.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 528c1f2f05a5eae710905547140f4a4f465d7d88 Mon Sep 17 00:00:00 2001 -From: Joel Winarske <joel.winarske@linux.com> -Date: Fri, 19 Feb 2021 22:16:00 +0000 -Subject: [PATCH 2/2] x64 sysroot assert - ---- - build/config/sysroot.gni | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni -index 12187df..2eb385c 100644 ---- a/build/config/sysroot.gni -+++ b/build/config/sysroot.gni -@@ -14,7 +14,7 @@ declare_args() { - - # Whether to use the default sysroot when building for Linux, if an explicit - # sysroot isn't set. -- use_default_linux_sysroot = true -+ use_default_linux_sysroot = false - - # The absolute path to the Xcode toolchain. This is used to look for headers - # that usually ship with the toolchain like c++/v1. --- -2.29.2 - diff --git a/meta-agl-flutter/recipes-graphics/flutter-engine/files/0003-remove-x11-dependency.patch b/meta-agl-flutter/recipes-graphics/flutter-engine/files/0003-remove-x11-dependency.patch deleted file mode 100644 index f6ede795..00000000 --- a/meta-agl-flutter/recipes-graphics/flutter-engine/files/0003-remove-x11-dependency.patch +++ /dev/null @@ -1,29 +0,0 @@ - -From dbe21e0e1ceb41da5a99f97937f2f6dd03f7e2e4 Mon Sep 17 00:00:00 2001 -From: Joel Winarske <joel.winarske@gmail.com> -Date: Sun, 29 May 2022 09:38:46 -0700 -Subject: [PATCH] Remove x11 dependency - -Signed-off-by: Joel Winarske <joel.winarske@gmail.com> ---- - flutter/shell/platform/linux/config/BUILD.gn | 4 ---- - 1 file changed, 4 deletions(-) - -diff --git a/flutter/shell/platform/linux/config/BUILD.gn b/flutter/shell/platform/linux/config/BUILD.gn -index da0ac056bc..70c7a0ea16 100644 ---- a/flutter/shell/platform/linux/config/BUILD.gn -+++ b/flutter/shell/platform/linux/config/BUILD.gn -@@ -5,10 +5,6 @@ - import("//build/config/linux/pkg_config.gni") - import("//flutter/shell/platform/glfw/config.gni") - --pkg_config("x11") { -- packages = [ "x11" ] --} -- - pkg_config("gtk") { - packages = [ "gtk+-3.0" ] - } --- -2.34.3 - diff --git a/meta-agl-flutter/recipes-graphics/flutter-engine/files/0004-prevent-redefinition-of-glib_autoptr_clear_AtkObject.patch b/meta-agl-flutter/recipes-graphics/flutter-engine/files/0004-prevent-redefinition-of-glib_autoptr_clear_AtkObject.patch deleted file mode 100644 index 2e1dcbdf..00000000 --- a/meta-agl-flutter/recipes-graphics/flutter-engine/files/0004-prevent-redefinition-of-glib_autoptr_clear_AtkObject.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 1a4f274b071a1486204470392d2427069533f8ca Mon Sep 17 00:00:00 2001 -From: Joel Winarske <joel.winarske@gmail.com> -Date: Thu, 8 Sep 2022 16:15:06 -0700 -Subject: [PATCH] prevent redefinition of glib_autoptr_clear_AtkObject - -Signed-off-by: Joel Winarske <joel.winarske@gmail.com> ---- - flutter/shell/platform/linux/fl_accessible_node.h | 7 ++----- - 1 file changed, 2 insertions(+), 5 deletions(-) - -diff --git a/flutter/shell/platform/linux/fl_accessible_node.h b/flutter/shell/platform/linux/fl_accessible_node.h -index ff38ad49c6..190cb982a1 100644 ---- a/flutter/shell/platform/linux/fl_accessible_node.h -+++ b/flutter/shell/platform/linux/fl_accessible_node.h -@@ -5,17 +5,14 @@ - #ifndef FLUTTER_SHELL_PLATFORM_LINUX_FL_ACCESSIBLE_NODE_H_ - #define FLUTTER_SHELL_PLATFORM_LINUX_FL_ACCESSIBLE_NODE_H_ - --#include <gtk/gtk.h> -+#include <gio/gio.h> -+#include <atk/atk.h> - - #include "flutter/shell/platform/embedder/embedder.h" - #include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h" - - G_BEGIN_DECLS - --// ATK doesn't have the g_autoptr macros, so add them manually. --// https://gitlab.gnome.org/GNOME/atk/-/issues/10 --G_DEFINE_AUTOPTR_CLEANUP_FUNC(AtkObject, g_object_unref) -- - #define FL_TYPE_ACCESSIBLE_NODE fl_accessible_node_get_type() - G_DECLARE_DERIVABLE_TYPE(FlAccessibleNode, - fl_accessible_node, --- -2.34.3 diff --git a/meta-agl-flutter/recipes-graphics/flutter-engine/flutter-engine_%.bbappend b/meta-agl-flutter/recipes-graphics/flutter-engine/flutter-engine_%.bbappend deleted file mode 100644 index 56660ab6..00000000 --- a/meta-agl-flutter/recipes-graphics/flutter-engine/flutter-engine_%.bbappend +++ /dev/null @@ -1 +0,0 @@ -require ${@bb.utils.contains('AGL_FEATURES', 'agl-flutter', 'flutter-engine_aglflutter.inc', '', d)} diff --git a/meta-agl-flutter/recipes-graphics/flutter-engine/flutter-engine_aglflutter.inc b/meta-agl-flutter/recipes-graphics/flutter-engine/flutter-engine_aglflutter.inc deleted file mode 100644 index 3c66fb2e..00000000 --- a/meta-agl-flutter/recipes-graphics/flutter-engine/flutter-engine_aglflutter.inc +++ /dev/null @@ -1,11 +0,0 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -# -# Patch set for 3.3.7 Engine -# -FLUTTER_ENGINE_PATCHES = "\ - file://0001-clang-toolchain.patch \ - file://0002-x64-sysroot-assert.patch \ - file://0003-remove-x11-dependency.patch \ - file://0004-prevent-redefinition-of-glib_autoptr_clear_AtkObject.patch \ - " diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0001-Add-optional-agl_shell-plugin.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0001-Add-optional-agl_shell-plugin.patch deleted file mode 100644 index 402a54d9..00000000 --- a/meta-agl-flutter/recipes-graphics/toyota/files/0001-Add-optional-agl_shell-plugin.patch +++ /dev/null @@ -1,279 +0,0 @@ -From 413898c43c8f66a7d49fe8bb74a85ce67733bc86 Mon Sep 17 00:00:00 2001 -From: Scott Murray <scott.murray@konsulko.com> -Date: Thu, 1 Jun 2023 14:34:03 -0400 -Subject: [PATCH] Add optional agl_shell plugin - -Add an optional agl_shell static plugin to expose the activate_app -call from the agl-shell Wayland protocol that is used when running -against the AGL compositor. This provides a way for a homescreen -application to activate other application surfaces to switch between -multiple applications as is needed for the AGL demo. - -Upstream-Status: Pending - -Signed-off-by: Scott Murray <scott.murray@konsulko.com> -[Updated to work with upstream OSS 0223 release] -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> - ---- - cmake/plugins.cmake | 5 ++ - shell/engine.cc | 6 ++ - shell/engine.h | 10 +++ - shell/platform_channel.cc | 6 ++ - shell/static_plugins/agl_shell/agl_shell.cc | 77 +++++++++++++++++++++ - shell/static_plugins/agl_shell/agl_shell.h | 31 +++++++++ - shell/wayland/display.cc | 7 ++ - shell/wayland/display.h | 8 +++ - shell/wayland/window.h | 2 + - 9 files changed, 152 insertions(+) - create mode 100644 shell/static_plugins/agl_shell/agl_shell.cc - create mode 100644 shell/static_plugins/agl_shell/agl_shell.h - -diff --git a/cmake/plugins.cmake b/cmake/plugins.cmake -index b720dca..20a55d7 100644 ---- a/cmake/plugins.cmake -+++ b/cmake/plugins.cmake -@@ -123,4 +123,9 @@ if (BUILD_PLUGIN_SECURE_STORAGE) - endif () - - -+option(BUILD_PLUGIN_AGL_SHELL "Includes AGL Shell Wayland Protocol Plugin" OFF) -+if (BUILD_PLUGIN_AGL_SHELL) -+ ENABLE_PLUGIN(agl_shell) -+endif () -+ - message(STATUS "Plugin Config .......... ${PLUGINS}") -diff --git a/shell/engine.cc b/shell/engine.cc -index d20b6ba..a0e38e9 100644 ---- a/shell/engine.cc -+++ b/shell/engine.cc -@@ -614,3 +614,9 @@ MAYBE_UNUSED TextInput* Engine::GetTextInput() const { - return m_key_event; - } - #endif -+ -+#if ENABLE_PLUGIN_AGL_SHELL -+std::shared_ptr<Display> Engine::GetDisplay() const { -+ return m_egl_window->GetDisplay(); -+} -+#endif -diff --git a/shell/engine.h b/shell/engine.h -index 94808dc..3a06f51 100644 ---- a/shell/engine.h -+++ b/shell/engine.h -@@ -60,6 +60,12 @@ class KeyEvent; - - #endif - -+#if ENABLE_PLUGIN_AGL_SHELL -+ -+class Display; -+ -+#endif -+ - class Engine { - public: - /** -@@ -445,6 +451,10 @@ class Engine { - MAYBE_UNUSED NODISCARD KeyEvent* GetKeyEvent() const; - #endif - -+#if ENABLE_PLUGIN_AGL_SHELL -+ std::shared_ptr<Display> GetDisplay() const; -+#endif -+ - /** - * @brief Get backend of view - * @return Backend* -diff --git a/shell/platform_channel.cc b/shell/platform_channel.cc -index b72156a..81d7cb5 100644 ---- a/shell/platform_channel.cc -+++ b/shell/platform_channel.cc -@@ -62,6 +62,9 @@ - #ifdef ENABLE_PLUGIN_SECURE_STORAGE - #include "static_plugins/secure_storage/secure_storage.h" - #endif -+#ifdef ENABLE_PLUGIN_AGL_SHELL -+#include "static_plugins/agl_shell/agl_shell.h" -+#endif - - PlatformChannel* PlatformChannel::singleton = nullptr; - -@@ -122,4 +125,7 @@ PlatformChannel::PlatformChannel() { - RegisterCallback(SecureStorage::kChannelName, - &SecureStorage::OnPlatformMessage); - #endif -+#ifdef ENABLE_PLUGIN_AGL_SHELL -+ RegisterCallback(AglShell::kChannelName, &AglShell::OnPlatformMessage); -+#endif - } -diff --git a/shell/static_plugins/agl_shell/agl_shell.cc b/shell/static_plugins/agl_shell/agl_shell.cc -new file mode 100644 -index 0000000..e6160a5 ---- /dev/null -+++ b/shell/static_plugins/agl_shell/agl_shell.cc -@@ -0,0 +1,77 @@ -+// Copyright 2020 Toyota Connected North America -+// Copyright 2022 Konsulko Group -+// -+// 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. -+ -+#include "agl_shell.h" -+ -+#include <flutter/fml/logging.h> -+#include <flutter/standard_method_codec.h> -+ -+#include "engine.h" -+#include "wayland/display.h" -+ -+#include <iostream> -+ -+void AglShell::OnPlatformMessage(const FlutterPlatformMessage* message, -+ void* userdata) { -+ std::unique_ptr<std::vector<uint8_t>> result; -+ auto engine = reinterpret_cast<Engine*>(userdata); -+ auto& codec = flutter::StandardMethodCodec::GetInstance(); -+ auto obj = codec.DecodeMethodCall(message->message, message->message_size); -+ -+ auto method = obj->method_name(); -+ if (method == kMethodActivateApp) { -+ if (obj->arguments()->IsNull()) { -+ result = codec.EncodeErrorEnvelope("argument_error", "Invalid Arguments"); -+ goto done; -+ } -+ -+ auto args = std::get_if<flutter::EncodableMap>(obj->arguments()); -+ if (!args) { -+ result = codec.EncodeErrorEnvelope("argument_error", "Invalid Arguments"); -+ goto done; -+ } -+ -+ std::string app_id; -+ auto it = args->find(flutter::EncodableValue("app_id")); -+ if (it != args->end()) { -+ app_id = std::get<std::string>(it->second); -+ } -+ -+ int32_t index = 0; -+ it = args->find(flutter::EncodableValue("index")); -+ if (it != args->end()) { -+ index = std::get<int32_t>(it->second); -+ } -+ -+ if (app_id.empty() || index < 0) { -+ result = codec.EncodeErrorEnvelope("argument_error", "Invalid Arguments"); -+ goto done; -+ } -+ -+ auto display = engine->GetDisplay(); -+ if (display) { -+ display->AglShellDoActivate(app_id, index); -+ } -+ auto val = flutter::EncodableValue(true); -+ result = codec.EncodeSuccessEnvelope(&val); -+ } else { -+ FML_DLOG(INFO) << "AglShell: " << method << " is unhandled"; -+ result = codec.EncodeErrorEnvelope("unhandled_method", "Unhandled Method"); -+ } -+ -+done: -+ engine->SendPlatformMessageResponse(message->response_handle, result->data(), -+ result->size()); -+} -diff --git a/shell/static_plugins/agl_shell/agl_shell.h b/shell/static_plugins/agl_shell/agl_shell.h -new file mode 100644 -index 0000000..698e44c ---- /dev/null -+++ b/shell/static_plugins/agl_shell/agl_shell.h -@@ -0,0 +1,31 @@ -+/* -+ * Copyright 2020 Toyota Connected North America -+ * Copyright 2022 Konsulko Group -+ * -+ * 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. -+ */ -+ -+#pragma once -+ -+#include <shell/platform/embedder/embedder.h> -+ -+class AglShell { -+ public: -+ static constexpr char kChannelName[] = "flutter/agl_shell"; -+ -+ static void OnPlatformMessage(const FlutterPlatformMessage* message, -+ void* userdata); -+ -+ private: -+ static constexpr char kMethodActivateApp[] = "activate_app"; -+}; -diff --git a/shell/wayland/display.cc b/shell/wayland/display.cc -index 434dd05..99aa5ff 100644 ---- a/shell/wayland/display.cc -+++ b/shell/wayland/display.cc -@@ -869,6 +869,13 @@ void Display::AglShellDoSetupActivationArea(uint32_t x, - width, height); - } - -+void Display::AglShellDoActivate(const std::string& app_id, size_t index) { -+ if (m_agl.shell) { -+ agl_shell_activate_app(m_agl.shell, app_id.c_str(), -+ m_all_outputs[index]->output); -+ } -+} -+ - void Display::SetEngine(wl_surface* surface, Engine* engine) { - m_active_engine = engine; - m_active_surface = surface; -diff --git a/shell/wayland/display.h b/shell/wayland/display.h -index 06b0f8b..ef6ea3f 100644 ---- a/shell/wayland/display.h -+++ b/shell/wayland/display.h -@@ -150,6 +150,14 @@ class Display { - */ - void AglShellDoReady() const; - -+ /** -+ * @brief AglShellDoActivate: -+ * @return void -+ * @relation -+ * wayland, agl-shell -+ */ -+ void AglShellDoActivate(const std::string& app_id, size_t index); -+ - /** - * @brief AglShell: Set up an activation area where to display the client's - * window -diff --git a/shell/wayland/window.h b/shell/wayland/window.h -index d5e3c77..677dbdc 100644 ---- a/shell/wayland/window.h -+++ b/shell/wayland/window.h -@@ -129,6 +129,8 @@ class WaylandWindow { - return std::pair<int32_t, int32_t>{m_geometry.width, m_geometry.height}; - } - -+ std::shared_ptr<Display> GetDisplay() { return m_display; } -+ - private: - size_t m_index; - std::shared_ptr<Display> m_display; diff --git a/meta-agl-flutter/recipes-graphics/toyota/files/0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch b/meta-agl-flutter/recipes-graphics/toyota/files/0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch deleted file mode 100644 index 6970388c..00000000 --- a/meta-agl-flutter/recipes-graphics/toyota/files/0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 357634ceae6d730131b26bc3e72b4cf0b3e902ad Mon Sep 17 00:00:00 2001 -From: Marius Vlad <marius.vlad@collabora.com> -Date: Mon, 19 Jun 2023 10:34:44 +0300 -Subject: [PATCH] shell/wayland/display: Handle flags as bitfield entries - -We can have preferred and current mode or'ed in the same time, so we -can't really check just for current mode. Make sure we do get a valid -width/height for the outputs to avoid going further. - -Bug-AGL: SPEC-4841 -Signed-off-by: Marius Vlad <marius.vlad@collabora.com> ---- - shell/wayland/display.cc | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/shell/wayland/display.cc b/shell/wayland/display.cc -index 434dd05..5ace67c 100644 ---- a/shell/wayland/display.cc -+++ b/shell/wayland/display.cc -@@ -258,12 +258,14 @@ void Display::display_handle_mode(void* data, - (void)flags; - auto* oi = static_cast<output_info_t*>(data); - -- if (flags == WL_OUTPUT_MODE_CURRENT) { -+ if ((flags & WL_OUTPUT_MODE_CURRENT) == WL_OUTPUT_MODE_CURRENT) { - oi->height = static_cast<unsigned int>(height); - oi->width = static_cast<unsigned int>(width); - oi->refresh_rate = refresh; - } - -+ assert(oi->height && oi->width); -+ - FML_DLOG(INFO) << "Video mode: " << width << " x " << height << " @ " - << (refresh > 1000 ? refresh / 1000.0 : (double)refresh) - << " Hz"; --- -2.35.1 - diff --git a/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc b/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc index 02cd0679..f54e9683 100644 --- a/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc +++ b/meta-agl-flutter/recipes-graphics/toyota/flutter-auto_aglflutter.inc @@ -1,14 +1,2 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -SRC_URI += "file://0001-Add-optional-agl_shell-plugin.patch \ - file://0001-shell-wayland-display-Handle-flags-as-bitfield-entri.patch" - -# For now disable gstreamer to avoid needing to enable "commercial" -# licenses for the stated ffmpeg dependency. -PACKAGECONFIG:remove = "gstreamer" - -# Enable agl-shell wayland protocol plugin -PACKAGECONFIG[agl-shell] = "-DBUILD_PLUGIN_AGL_SHELL=ON, -DBUILD_PLUGIN_AGL_SHELL=OFF" # NOTE: Cannot use += here due to ??= use in the recipe -PACKAGECONFIG:append = " agl-shell" - +PACKAGECONFIG:append = " client-agl" diff --git a/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb b/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb index 8263c0ae..697bca3e 100644 --- a/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb +++ b/meta-agl-flutter/recipes-platform/images/agl-image-flutter.bb @@ -8,12 +8,11 @@ CLANGSDK = "1" IMAGE_INSTALL += "\ weston-ini-conf-landscape \ \ - flutter-auto-with-logging \ + flutter-auto-verbose-logs \ \ flutter-engine-sdk-dev \ \ flutter-gallery \ - flutter-test-animated-background \ flutter-test-texture-egl \ \ " diff --git a/meta-agl-flutter/tools/configs/_globals.json b/meta-agl-flutter/tools/configs/_globals.json index 1800c6bf..35838b67 100644 --- a/meta-agl-flutter/tools/configs/_globals.json +++ b/meta-agl-flutter/tools/configs/_globals.json @@ -1,5 +1,5 @@ { - "flutter-version": "3.3.7", + "flutter-version": "3.13.2", "github_token": "", "cookie_file": "" }
\ No newline at end of file diff --git a/meta-agl-flutter/tools/configs/_repos.json b/meta-agl-flutter/tools/configs/_repos.json index d1d42d42..e15bd123 100644 --- a/meta-agl-flutter/tools/configs/_repos.json +++ b/meta-agl-flutter/tools/configs/_repos.json @@ -1,6 +1,7 @@ [ { "uri": "https://github.com/toyota-connected/ivi-homescreen.git", + "rev": "f42c61c5349ed4981767239f6ba052c315d89c3a", "branch": "agl" }, { @@ -8,24 +9,15 @@ "branch": "main" }, { - "uri": "https://github.com/gskinnerTeam/flutter-wonderous-app.git", - "branch": "main", - "pubspec_path": "flutter-wonderous-app" - }, - { - "uri": "https://github.com/flutter/pinball.git", - "branch": "main", - "pubspec_path": "pinball" - }, - { "uri": "https://github.com/flutter/gallery.git", "branch": "master", - "rev": "9eb785cb997ff56c46e933c1c591f0a6f31454f6", + "rev": "22a07bf664a2128684ec245032c05b1c8f10048e", "pubspec_path": "gallery" }, { "uri": "https://github.com/mogol/flutter_secure_storage.git", "branch": "develop", + "rev": "3bb93366161a787b07c45d8ce98c7405b40fbf1f", "pubspec_path": "flutter_secure_storage/flutter_secure_storage/example" }, { @@ -35,14 +27,12 @@ "pubspec_path": "flutter_animated_background/example" }, { - "uri": "https://github.com/felipeerias/flutter_homescreen.git", - "branch": "main", - "rev": "08bf271f7f1f14153a41005718a2090fa8e783f0", - "pubspec_path": "flutter_homescreen" - }, - { "uri": "https://github.com/bernardpumped/ped.git", "branch": "agl", "pubspec_path": "ped" + }, + { + "uri": "https://chromium.googlesource.com/chromium/tools/depot_tools.git", + "branch": "main" } ] diff --git a/meta-agl-flutter/tools/configs/desktop-auto.json b/meta-agl-flutter/tools/configs/desktop-auto.json index 66cec712..cb3b9e68 100644 --- a/meta-agl-flutter/tools/configs/desktop-auto.json +++ b/meta-agl-flutter/tools/configs/desktop-auto.json @@ -11,13 +11,10 @@ "flutter_runtime": "debug", "type": "host", "env": { - "FLUTTER_AUTO_SRC_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen", - "FLUTTER_AUTO_BUILD_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen/build", - "FLUTTER_AUTO_CMAKE_ARGS": "-DCMAKE_BUILD_TYPE=Debug -DBUILD_PLUGIN_SECURE_STORAGE=ON", - "COMP_SURF_PBR_SRC_DIR": "${FLUTTER_WORKSPACE}/app/comp_surf_pbr", - "COMP_SURF_PBR_BUILD_DIR": "${FLUTTER_WORKSPACE}/app/comp_surf_pbr/build", - "COMP_SURF_PBR_CMAKE_ARGS": "-DCMAKE_BUILD_TYPE=Debug", - "FLUTTER_AUTO_EXE": "LD_LIBRARY_PATH=${COMP_SURF_PBR_BUILD_DIR} ${FLUTTER_AUTO_BUILD_DIR}/shell/flutter-auto --j=${PLATFORM_ID_DIR_RELATIVE}/default_config.json --b=${PLATFORM_ID_DIR_RELATIVE}", + "HOMESCREEN_SRC_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen", + "HOMESCREEN_BUILD_DIR": "${FLUTTER_WORKSPACE}/app/ivi-homescreen/build", + "HOMESCREEN_CMAKE_ARGS": "-DCMAKE_BUILD_TYPE=Debug -DENABLE_DLT=OFF", + "HOMESCREEN_EXE": "${HOMESCREEN_BUILD_DIR}/shell/homescreen --j=${PLATFORM_ID_DIR_RELATIVE}/default_config.json --b=${PLATFORM_ID_DIR_RELATIVE}", "PING_CMD": "loginctl show-session $(awk '/tty/ {print $1}' <(loginctl)) -p Type", "CREATE_BUNDLE_FOLDER": "mkdir -p ${PLATFORM_ID_DIR_RELATIVE}/data", "COPY_PLATFORM_ID_TO_BUNDLE_FOLDER": "cp -r ${PLATFORM_ID_DIR}/default_config.json ${PLATFORM_ID_DIR_RELATIVE}/", @@ -29,9 +26,9 @@ "config": { "view": [ { - "width": 1920, - "height": 1080, - "cursor_theme": "DMZ-White", + "width": 1920, + "height": 1080, + "cursor_theme": "DMZ-White", "fullscreen": false } ] @@ -45,73 +42,32 @@ "sudo apt update -y", "sudo apt install lsb-release wget software-properties-common gnupg apt-file", "sudo apt-file update", - "wget https://apt.llvm.org/llvm.sh", - "chmod +x ./llvm.sh", - "sed -i 's|add-apt-repository \"${REPO_NAME}\"|add-apt-repository -y \"${REPO_NAME}\"|g' ./llvm.sh", - "sudo ./llvm.sh 14", - "rm ./llvm.sh", - "sudo apt install -y clang-14 lldb-14 lld-14 clangd-14 clang-tidy-14 clang-format-14 clang-tools-14 llvm-14-dev lld-14 lldb-14 llvm-14-tools libomp-14-dev libc++-14-dev libc++abi-14-dev libclang-common-14-dev libclang-14-dev libclang-cpp14-dev libunwind-14-dev", "sudo apt install -y libwayland-dev wayland-protocols mesa-common-dev libegl1-mesa-dev libgles2-mesa-dev mesa-utils libxkbcommon-dev ninja-build", "sudo apt install -y build-essential libvulkan-dev vulkan-tools vulkan-validationlayers vulkan-utils libtool", "sudo apt autoremove -y", "sudo apt clean -y", "cmake --version", - "clang++ --version", - "apt-file search cmake", - "apt-file search clang++" + "apt-file search cmake" ] }, "fedora": { "cmds": [ "sudo dnf -y update", "sudo dnf -y upgrade", - "sudo dnf -y install wayland-devel wayland-protocols-devel libxkbcommon-devel cmake ninja-build mesa-dri-drivers mesa-filesystem mesa-libEGL-devel mesa-libGL-devel mesa-libGLU-devel mesa-libgbm-devel mesa-libglapi mesa-libxatracker mesa-vulkan-drivers vulkan-tools libunwind-devel clang clang-analyzer clang-devel clang-libs clang-resource-filesystem llvm-devel clang-tools-extra lld lld-libs lldb libcxx libcxx-devel libcxx-static libcxxabi libcxxabi-devel libcxxabi-static gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras gstreamer1-plugins-base-tools gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly-free libtool", + "sudo dnf -y install wayland-devel wayland-protocols-devel libxkbcommon-devel cmake ninja-build mesa-dri-drivers mesa-filesystem mesa-libEGL-devel mesa-libGL-devel mesa-libGLU-devel mesa-libgbm-devel mesa-libglapi mesa-libxatracker mesa-vulkan-drivers vulkan-tools libunwind-devel gstreamer1-devel gstreamer1-plugins-base-devel gstreamer1-plugins-bad-free-devel gstreamer1-plugins-bad-free-extras gstreamer1-plugins-base-tools gstreamer1-plugins-good gstreamer1-plugins-good-extras gstreamer1-plugins-ugly-free libtool", "sudo dnf -y autoremove", "cmake --version", - "clang++ --version", - "dnf provides cmake", - "dnf provides clang++" + "dnf provides cmake" ] } } }, "post_cmds": [ { - "ubuntu": { - "env": { - "CC": "/usr/bin/clang", - "CXX": "/usr/bin/clang++" - } - }, - "fedora": { - "env": { - "CC": "/usr/lib64/ccache/clang", - "CXX": "/usr/lib64/ccache/clang++" - } - }, - "cwd": "${FLUTTER_AUTO_BUILD_DIR}", - "cmds": [ - "cmake ${FLUTTER_AUTO_SRC_DIR} ${FLUTTER_AUTO_CMAKE_ARGS}", - "make flutter-auto -j" - ] - }, - { - "ubuntu": { - "env": { - "CC": "/usr/bin/clang", - "CXX": "/usr/bin/clang++" - } - }, - "fedora": { - "env": { - "CC": "/usr/lib64/ccache/clang", - "CXX": "/usr/lib64/ccache/clang++" - } - }, - "cwd": "${COMP_SURF_PBR_BUILD_DIR}", + "cwd": "${HOMESCREEN_BUILD_DIR}", "cmds": [ - "cmake ${COMP_SURF_PBR_SRC_DIR} ${COMP_SURF_PBR_CMAKE_ARGS}", - "make comp_surf_pbr -j" + "cmake ${HOMESCREEN_SRC_DIR} ${HOMESCREEN_CMAKE_ARGS}", + "make homescreen -j" ] } ] @@ -119,7 +75,7 @@ "overwrite-existing": true, "custom-device": { "id": "desktop-auto", - "label": "Toyota flutter-auto", + "label": "Toyota Homescreen for AGL", "sdkNameAndVersion": "flutter-auto x86_64", "platform": "linux-x64", "enabled": true, @@ -128,7 +84,7 @@ "postBuild": "bash -c \"rm -rf ${PLATFORM_ID_DIR_RELATIVE}\"", "install": "bash -c \"${STAGE_BUNDLE_FOLDER}\"", "uninstall": "bash -c \"rm -rf ${PLATFORM_ID_DIR_RELATIVE}\"", - "runDebug": "bash -c \"${FLUTTER_AUTO_EXE}\"", + "runDebug": "bash -c \"${HOMESCREEN_EXE}\"", "forwardPort": null, "forwardPortSuccessRegex": null, "screenshot": null diff --git a/meta-agl-flutter/tools/configs/flutter-engine.json b/meta-agl-flutter/tools/configs/flutter-engine.json new file mode 100644 index 00000000..cf0a6a16 --- /dev/null +++ b/meta-agl-flutter/tools/configs/flutter-engine.json @@ -0,0 +1,101 @@ +{ + "id": "flutter-engine", + "load": false, + "supported_archs": [ + "x86_64", + "arm64" + ], + "supported_host_types": [ + "ubuntu", + "fedora" + ], + "type": "generic", + "flutter_runtime": "debug", + "env": { + "DEPOT_TOOLS": "${FLUTTER_WORKSPACE}/app/depot_tools", + "ENGINE_ROOT": "${PLATFORM_ID_DIR}/engine", + "ENGINE_SRC_DIR_RELATIVE": "src", + "ENGINE_SRC_DIR": "${ENGINE_ROOT}/${ENGINE_SRC_DIR_RELATIVE}", + "ENGINE_BUILD_FLAGS": "--runtime-mode=debug --embedder-for-target --enable-fontconfig --disable-desktop-embeddings --no-build-embedder-examples --enable-impeller-3d --enable-impeller-opengles --no-lto --no-goma", + "ENGINE_BUILD_DIR": "${ENGINE_SRC_DIR}/out/host_debug", + "GN_ARGS_FILE": "${ENGINE_BUILD_DIR}/args.gn", + "GN_ARGS_APPEND": "" + }, + "runtime": { + "gclient_config": { + "path": "${ENGINE_ROOT}", + "managed": false, + "name": "src/flutter", + "url": "https://github.com/flutter/engine.git", + "custom_vars": { + "download_android_deps": false, + "download_windows_deps": false, + "download_linux_deps": true, + "download_emsdk": false + }, + "custom_deps": { + "src/third_party/dart/third_party/pkg/tools": "https://dart.googlesource.com/tools.git@545d7e1c73ce21b8c91f638021f9d487d324a501" + }, + "deps_file": "DEPS", + "safesync_url": "" + }, + "pre-requisites": { + "arm64": { + "ubuntu": { + "cmds": [ + "sudo apt install pkg-config libfreetype-dev git" + ] + }, + "fedora": { + "cmds": [ + "sudo dnf install pkg-config freetype-devel git" + ] + } + }, + "x86_64": { + "ubuntu": { + "cmds": [ + "sudo apt install pkg-config libfreetype-dev git" + ] + }, + "fedora": { + "cmds": [ + "sudo dnf install pkg-config freetype-devel git" + ] + } + } + }, + "post_cmds": [ + { + "env": { + "PATH": "${DEPOT_TOOLS}:$PATH" + }, + "cwd": "${ENGINE_ROOT}", + "cmds": [ + "gclient sync -D -R --revision ${FLUTTER_ENGINE_VERSION} -v" + ] + }, + { + "env": { + "PATH": "${DEPOT_TOOLS}:$PATH" + }, + "cwd": "${ENGINE_SRC_DIR}", + "cmds": [ + "./flutter/tools/gn ${ENGINE_BUILD_FLAGS}", + "echo ${GN_ARGS_APPEND} >> ${GN_ARGS_FILE}", + "ninja -C ${ENGINE_BUILD_DIR}" + ] + }, + { + "cwd": "${ENGINE_BUILD_DIR}", + "cmds": [ + "bash -c \"rm -rf ${PLATFORM_ID_DIR}/bundle | true\"", + "mkdir -p ${PLATFORM_ID_DIR}/bundle/data/", + "mkdir -p ${PLATFORM_ID_DIR}/bundle/lib/", + "cp ${ENGINE_BUILD_DIR}/icudtl.dat ${PLATFORM_ID_DIR}/bundle/data/", + "cp ${ENGINE_BUILD_DIR}/libflutter_engine.so ${PLATFORM_ID_DIR}/bundle/lib/" + ] + } + ] + } +}
\ No newline at end of file |