* [Buildroot] [PATCH v9 2/7] package/depot-tools: new package
2023-09-19 20:42 [Buildroot] [PATCH v9 1/7] package/python-httplib2: add host variant Adam Duskett
@ 2023-09-19 20:42 ` Adam Duskett
2023-09-19 20:42 ` [Buildroot] [PATCH v9 3/7] package/flutter-sdk-bin: " Adam Duskett
` (4 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Adam Duskett @ 2023-09-19 20:42 UTC (permalink / raw)
To: buildroot
Cc: Adam Duskett, Asaf Kahlon, Thomas Petazzoni, Michael Trimarchi,
Angelo Compagnucci
Chromium and Chromium OS use a package of scripts called
depot_tools to manage checkouts and code reviews. This package
also includes the gclient utility.
gclient is a Python script to manage a workspace of modular dependencies that
are each checked out independently from different subversion or git
repositories. Features include:
- Dependencies can be specified on a per-OS basis.
- Dependencies can be specified relative to their parent dependency.
- Variables can be used to abstract concepts.
- Hooks can be specified to be run after a checkout.
- .gclient and DEPS are Python scripts. You can hack in easily or add
additional configuration data.
.gclient file: It's the primary file. It is, in fact, a Python script. It
specifies the following variables:
- solutions: an array of dictionaries specifying the projects that will be
fetched.
- hooks: additional hooks to be run when this meta checkout is synced.
- target_os: an optional array of (target) operating systems to fetch
OS-specific dependencies for.
- cache_dir: Primarily for bots, multiple working sets use a single git
cache.
gclient is necessary for checking out the flutter-engine source code, as the
release tarballs provided on the flutter-engine github are in no state to
compile. Google expects the use of gclient to download a source directory
structure suitable to build the Flutter engine.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
DEVELOPERS | 3 +++
package/Config.in.host | 1 +
package/depot-tools/Config.in.host | 10 ++++++++++
package/depot-tools/depot-tools.hash | 3 +++
package/depot-tools/depot-tools.mk | 25 +++++++++++++++++++++++++
5 files changed, 42 insertions(+)
create mode 100644 package/depot-tools/Config.in.host
create mode 100644 package/depot-tools/depot-tools.hash
create mode 100644 package/depot-tools/depot-tools.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index e8b78a8d46..057e740fb8 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -31,6 +31,9 @@ F: package/firewalld/
F: package/vulkan-loader/
F: package/vulkan-tools/
+N: Adam Duskett <adam.duskett@amarulasolutions.com>
+F: package/depot-tools/
+
N: Adam Heinrich <adam@adamh.cz>
F: package/jack1/
diff --git a/package/Config.in.host b/package/Config.in.host
index 22e0dc64d4..377dbed7d3 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -19,6 +19,7 @@ menu "Host utilities"
source "package/cryptsetup/Config.in.host"
source "package/dbus-python/Config.in.host"
source "package/delve/Config.in.host"
+ source "package/depot-tools/Config.in.host"
source "package/dfu-util/Config.in.host"
source "package/dos2unix/Config.in.host"
source "package/dosfstools/Config.in.host"
diff --git a/package/depot-tools/Config.in.host b/package/depot-tools/Config.in.host
new file mode 100644
index 0000000000..935331dedb
--- /dev/null
+++ b/package/depot-tools/Config.in.host
@@ -0,0 +1,10 @@
+config BR2_PACKAGE_HOST_DEPOT_TOOLS
+ bool "host depot-tools"
+ select BR2_PACKAGE_HOST_PYTHON3
+ select BR2_PACKAGE_HOST_PYTHON3_SSL
+ select BR2_PACKAGE_HOST_PYTHON_SIX
+ help
+ Chromium and Chromium OS use a package of scripts called
+ depot_tools to manage checkouts and code reviews.
+
+ https://www.chromium.org/developers/how-tos/install-depot-tools/
diff --git a/package/depot-tools/depot-tools.hash b/package/depot-tools/depot-tools.hash
new file mode 100644
index 0000000000..2109096901
--- /dev/null
+++ b/package/depot-tools/depot-tools.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 8e0bccdd6b1231f58d5453dc14a5e1d195295ac8d466dec34961e951e946b50b depot-tools-4e87f5bfe244e903f712408ea68dc3c3a6fe2d00-br1.tar.gz
+sha256 984523ee987f4e8b72d61df37d8f1189a7077cd4b77e41a397e35593b297a29d LICENSE
diff --git a/package/depot-tools/depot-tools.mk b/package/depot-tools/depot-tools.mk
new file mode 100644
index 0000000000..e3b840f29a
--- /dev/null
+++ b/package/depot-tools/depot-tools.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# depot-tools
+#
+################################################################################
+
+DEPOT_TOOLS_VERSION = 4e87f5bfe244e903f712408ea68dc3c3a6fe2d00
+DEPOT_TOOLS_SITE = https://chromium.googlesource.com/chromium/tools/depot_tools
+DEPOT_TOOLS_SITE_METHOD = git
+DEPOT_TOOLS_LICENSE = BSD-3-Clause
+DEPOT_TOOLS_LICENSE_FILES = LICENSE
+DEPOT_TOOLS_CPE_ID_VENDOR = google
+
+HOST_DEPOT_TOOLS_DEPENDENCIES = \
+ host-python3 \
+ host-python-httplib2 \
+ host-python-pyparsing \
+ host-python-six
+
+define HOST_DEPOT_TOOLS_INSTALL_CMDS
+ mkdir -p $(HOST_DIR)/share/depot_tools
+ cp -dprf $(@D)/* $(HOST_DIR)/share/depot_tools/
+endef
+
+$(eval $(host-generic-package))
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread* [Buildroot] [PATCH v9 3/7] package/flutter-sdk-bin: new package
2023-09-19 20:42 [Buildroot] [PATCH v9 1/7] package/python-httplib2: add host variant Adam Duskett
2023-09-19 20:42 ` [Buildroot] [PATCH v9 2/7] package/depot-tools: new package Adam Duskett
@ 2023-09-19 20:42 ` Adam Duskett
2023-09-19 20:42 ` [Buildroot] [PATCH v9 4/7] package/flutter-engine: " Adam Duskett
` (3 subsequent siblings)
5 siblings, 0 replies; 13+ messages in thread
From: Adam Duskett @ 2023-09-19 20:42 UTC (permalink / raw)
To: buildroot
Cc: Adam Duskett, Asaf Kahlon, Thomas Petazzoni, Michael Trimarchi,
Angelo Compagnucci
flutter-sdk-bin is a collection of host tools and plugins used to compile
flutter applications.
- As this is a collection of pre-compiled tools, append -bin to the end of the
package name.
- We must set the HOME directory variable to the sdk directory or else the
flutter dart binaries place .dart, .dart-sdk, and .flutter in ~/.
- set --clear-features, --no-analytics and --disable-telemetry first to disable
google tracking as soon as possible.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
DEVELOPERS | 1 +
package/Config.in.host | 1 +
package/flutter-sdk-bin/Config.in.host | 16 ++++
package/flutter-sdk-bin/flutter-sdk-bin.hash | 3 +
package/flutter-sdk-bin/flutter-sdk-bin.mk | 95 ++++++++++++++++++++
5 files changed, 116 insertions(+)
create mode 100644 package/flutter-sdk-bin/Config.in.host
create mode 100644 package/flutter-sdk-bin/flutter-sdk-bin.hash
create mode 100644 package/flutter-sdk-bin/flutter-sdk-bin.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 057e740fb8..5235498d5f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -33,6 +33,7 @@ F: package/vulkan-tools/
N: Adam Duskett <adam.duskett@amarulasolutions.com>
F: package/depot-tools/
+F: package/flutter-sdk-bin/
N: Adam Heinrich <adam@adamh.cz>
F: package/jack1/
diff --git a/package/Config.in.host b/package/Config.in.host
index 377dbed7d3..387a28cff2 100644
--- a/package/Config.in.host
+++ b/package/Config.in.host
@@ -36,6 +36,7 @@ menu "Host utilities"
source "package/faketime/Config.in.host"
source "package/fatcat/Config.in.host"
source "package/firmware-utils/Config.in.host"
+ source "package/flutter-sdk-bin/Config.in.host"
source "package/fwup/Config.in.host"
source "package/genext2fs/Config.in.host"
source "package/genimage/Config.in.host"
diff --git a/package/flutter-sdk-bin/Config.in.host b/package/flutter-sdk-bin/Config.in.host
new file mode 100644
index 0000000000..a48714ea7f
--- /dev/null
+++ b/package/flutter-sdk-bin/Config.in.host
@@ -0,0 +1,16 @@
+# All host rust packages should depend on this option
+config BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
+ bool
+ default y if BR2_HOSTARCH = "x86_64"
+
+config BR2_PACKAGE_HOST_FLUTTER_SDK_BIN
+ bool "host flutter-sdk-bin"
+ depends on BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
+ help
+ Flutter is Google's SDK for crafting beautiful, fast user
+ experiences for mobile, web, and desktop from a single
+ codebase. Flutter works with existing code, is used by
+ developers and organizations around the world, and is
+ free and open source.
+
+ https://flutter.dev/
diff --git a/package/flutter-sdk-bin/flutter-sdk-bin.hash b/package/flutter-sdk-bin/flutter-sdk-bin.hash
new file mode 100644
index 0000000000..9daf6c58be
--- /dev/null
+++ b/package/flutter-sdk-bin/flutter-sdk-bin.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 d9bbfbfb6fe3c72a29c1040235126edd0cd461e4e18556335fd1cf217c2e1473 flutter_linux_3.13.4-stable.tar.xz
+sha256 a598db94b6290ffbe10b5ecf911057b6a943351c727fdda9e5f2891d68700a20 LICENSE
diff --git a/package/flutter-sdk-bin/flutter-sdk-bin.mk b/package/flutter-sdk-bin/flutter-sdk-bin.mk
new file mode 100644
index 0000000000..b1abf9e318
--- /dev/null
+++ b/package/flutter-sdk-bin/flutter-sdk-bin.mk
@@ -0,0 +1,95 @@
+################################################################################
+#
+# host-flutter-sdk-bin
+#
+################################################################################
+
+FLUTTER_SDK_BIN_VERSION = 3.13.4
+FLUTTER_SDK_BIN_SITE = https://storage.googleapis.com/flutter_infra_release/releases/stable/linux
+FLUTTER_SDK_BIN_SOURCE = flutter_linux_$(FLUTTER_SDK_BIN_VERSION)-stable.tar.xz
+FLUTTER_SDK_BIN_LICENSE = BSD-3-Clause
+FLUTTER_SDK_BIN_LICENSE_FILES = LICENSE
+
+HOST_FLUTTER_SDK_BIN_SDK = $(HOST_DIR)/share/flutter/sdk
+HOST_FLUTTER_SDK_BIN_DART_SDK = $(HOST_FLUTTER_SDK_BIN_SDK)/bin/cache/dart-sdk
+HOST_FLUTTER_SDK_BIN_SDK_ENGINE = $(HOST_FLUTTER_SDK_BIN_SDK)/bin/cache/artifacts/engine
+
+# We must set the home directory to the sdk directory or else flutter will
+# place .dart, .dart-sdk, and .flutter in ~/.
+HOST_FLUTTER_SDK_BIN_ENV = \
+ HOME=$(HOST_FLUTTER_SDK_BIN_SDK) \
+ PATH=$(BR_PATH):$(HOST_FLUTTER_SDK_BIN_SDK):$(HOST_FLUTTER_SDK_BIN_SDK)/bin \
+ PUB_CACHE=$(HOST_FLUTTER_SDK_BIN_SDK)/.pub-cache
+
+# The following config options must be ran one at a time.
+HOST_FLUTTER_SDK_BIN_CONF_OPTS = \
+ --clear-features \
+ --no-analytics \
+ --disable-telemetry \
+ --enable-custom-devices \
+ --enable-linux-desktop \
+ --no-enable-android \
+ --no-enable-fuchsia \
+ --no-enable-ios \
+ --no-enable-macos-desktop \
+ --no-enable-windows-desktop
+
+define HOST_FLUTTER_SDK_BIN_CONFIGURE_CMDS
+ $(foreach i,$(HOST_FLUTTER_SDK_BIN_CONF_OPTS),
+ $(HOST_FLUTTER_SDK_BIN_ENV) $(@D)/bin/flutter config $(i); \
+ )
+ $(HOST_FLUTTER_SDK_BIN_ENV) $(@D)/bin/dart --disable-analytics
+endef
+
+# Remove the cache, as we will run precache after setting up flutter and dart
+# with the new config options.
+define HOST_FLUTTER_SDK_BIN_BUILD_CMDS
+ mkdir -p $(HOST_FLUTTER_SDK_BIN_SDK)
+ rm -rf $(HOST_FLUTTER_SDK_BIN_SDK)/.pub-cache
+ cd $(@D) && \
+ $(HOST_FLUTTER_SDK_BIN_ENV) $(@D)/bin/flutter precache;
+endef
+
+define HOST_FLUTTER_SDK_BIN_INSTALL_CMDS
+ cp -rpdT $(@D)/. $(HOST_FLUTTER_SDK_BIN_SDK)/
+endef
+
+ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
+HOST_FLUTTER_SDK_BIN_SDK_ROOT = \
+ $(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk
+HOST_FLUTTER_SDK_BIN_SDK_PRODUCT = false
+else
+HOST_FLUTTER_SDK_BIN_SDK_ROOT = \
+ $(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/common/flutter_patched_sdk_product
+HOST_FLUTTER_SDK_BIN_SDK_PRODUCT = true
+endif
+
+# The Order matters.Taken from:
+# https://github.com/meta-flutter/meta-flutter/blob/kirkstone/classes/flutter-app.inc
+HOST_FLUTTER_SDK_BIN_DART_ARGS = \
+ --verbose \
+ --disable-analytics \
+ --disable-dart-dev $(HOST_FLUTTER_SDK_BIN_SDK_ENGINE)/linux-x64/frontend_server.dart.snapshot \
+ --sdk-root $(HOST_FLUTTER_SDK_BIN_SDK_ROOT) \
+ --target=flutter \
+ --no-print-incremental-dependencies \
+ -Ddart.vm.profile=false \
+ -Ddart.vm.product=$(HOST_FLUTTER_SDK_BIN_SDK_PRODUCT) \
+ --aot \
+ --tfa \
+ --packages .dart_tool/package_config.json \
+ --output-dill .dart_tool/flutter_build/*/app.dill \
+ --depfile .dart_tool/flutter_build/*/kernel_snapshot.d
+
+# Helper wrapper to run flutter when building flutter applications.
+HOST_FLUTTER_SDK_BIN_FLUTTER = \
+ $(HOST_FLUTTER_SDK_BIN_ENV) \
+ $(HOST_FLUTTER_SDK_BIN_SDK)/bin/flutter
+
+# Helper wrapper to run dart when building flutter applications.
+HOST_FLUTTER_SDK_BIN_DART_BIN = \
+ $(HOST_FLUTTER_SDK_BIN_ENV) \
+ $(HOST_FLUTTER_SDK_BIN_DART_SDK)/bin/dart \
+ $(HOST_FLUTTER_SDK_BIN_DART_ARGS)
+
+$(eval $(host-generic-package))
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread* [Buildroot] [PATCH v9 4/7] package/flutter-engine: new package
2023-09-19 20:42 [Buildroot] [PATCH v9 1/7] package/python-httplib2: add host variant Adam Duskett
2023-09-19 20:42 ` [Buildroot] [PATCH v9 2/7] package/depot-tools: new package Adam Duskett
2023-09-19 20:42 ` [Buildroot] [PATCH v9 3/7] package/flutter-sdk-bin: " Adam Duskett
@ 2023-09-19 20:42 ` Adam Duskett
2023-09-19 22:08 ` Yann E. MORIN
2023-09-19 20:42 ` [Buildroot] [PATCH v9 5/7] package/flutter-pi: " Adam Duskett
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Adam Duskett @ 2023-09-19 20:42 UTC (permalink / raw)
To: buildroot
Cc: Adam Duskett, Asaf Kahlon, Thomas Petazzoni, Michael Trimarchi,
Angelo Compagnucci
There are many issues with this package:
- The release tarballs from https://github.com/flutter/engine are in no state
to compile. They are only for the use of gclient to download a source
directory structure suitable to build the Flutter engine! If you download,
extract and attempt to run `./tools/gn --no-goma --no-prebuilt-dart-sdk`, you
receive the error message:
`No such file or directory: 'flutter/flutter/third_party/gn/gn.'
But wait! Wasn't the gn binary just called? No, that's a wrapper in the
Flutter source tree that formats arguments to call the real gn binary.
The real gn is not provided in the tarball but is downloaded via gclient
(among many other supporting repositories.)
Even worse, the flutter buildsystem depends on the .git dirs being present.
(https://github.com/meta-flutter/meta-flutter/issues/271) This dependency
means it is not possible to create a reproducible tarball from the downloaded
sources, which is why there is no .hash file provided.
I have asked the flutter project to release full tarballs suitable for
compiling here: https://github.com/flutter/flutter/issues/130734
- Flutter engine includes a patched copy of clang that must be used to compile.
Using a Buildroot-build clang results in linking warning and errors.
As such, we depend on LLVM_ARCH_SUPPORTS but use the included clang for
building. On the plus side, this saves time having to compile clang.
Tested with:
- Debian 11 and 12
- Ubuntu 18.04, 20.04, and 22.04
- Fedora 38
- Per-package directories
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
.../0001-disable-pre-canned-sysroot.patch | 32 +++
.../0002-remove-explicit-x11-dependency.patch | 33 +++
.../0003-fix-toolchain-paths.patch | 40 +++
...onfig.py-do-not-prepend-sysroot-path.patch | 37 +++
package/flutter-engine/Config.in | 55 ++++
package/flutter-engine/dot-gclient | 12 +
package/flutter-engine/flutter-engine.mk | 234 ++++++++++++++++++
package/flutter-engine/gen-tarball | 111 +++++++++
10 files changed, 556 insertions(+)
create mode 100644 package/flutter-engine/0001-disable-pre-canned-sysroot.patch
create mode 100644 package/flutter-engine/0002-remove-explicit-x11-dependency.patch
create mode 100644 package/flutter-engine/0003-fix-toolchain-paths.patch
create mode 100644 package/flutter-engine/0004-pkg-config.py-do-not-prepend-sysroot-path.patch
create mode 100644 package/flutter-engine/Config.in
create mode 100644 package/flutter-engine/dot-gclient
create mode 100644 package/flutter-engine/flutter-engine.mk
create mode 100755 package/flutter-engine/gen-tarball
diff --git a/DEVELOPERS b/DEVELOPERS
index 5235498d5f..258add1400 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -33,6 +33,7 @@ F: package/vulkan-tools/
N: Adam Duskett <adam.duskett@amarulasolutions.com>
F: package/depot-tools/
+F: package/flutter-engine/
F: package/flutter-sdk-bin/
N: Adam Heinrich <adam@adamh.cz>
diff --git a/package/Config.in b/package/Config.in
index e8dbadadf3..066e621ab9 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1585,6 +1585,7 @@ menu "Graphics"
source "package/exempi/Config.in"
source "package/exiv2/Config.in"
source "package/fltk/Config.in"
+ source "package/flutter-engine/Config.in"
source "package/fontconfig/Config.in"
source "package/freetype/Config.in"
source "package/gd/Config.in"
diff --git a/package/flutter-engine/0001-disable-pre-canned-sysroot.patch b/package/flutter-engine/0001-disable-pre-canned-sysroot.patch
new file mode 100644
index 0000000000..953705e33b
--- /dev/null
+++ b/package/flutter-engine/0001-disable-pre-canned-sysroot.patch
@@ -0,0 +1,32 @@
+From 49a14e693124dc34f2cccbfb755d01a1198aa6bf Mon Sep 17 00:00:00 2001
+From: Joel Winarske <joel.winarsk@gmail.com>
+Date: Wed, 19 Jul 2023 15:24:22 -0700
+Subject: [PATCH] disable pre-canned sysroot
+
+Override should be enabled if a custom sysroot using --target-sysroot is
+specified. If --target-sysroot is not set, then it should default to the
+pre-canned sysroot.
+
+Upstream: https://github.com/flutter/flutter/issues/123073
+Signed-off-by: Joel Winarske <joel.winarsk@gmail.com>
+Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
+---
+ 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 7987e519d..1de694263 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
+ }
+
+ if (current_toolchain == default_toolchain && target_sysroot != "") {
+--
+2.41.0
+
diff --git a/package/flutter-engine/0002-remove-explicit-x11-dependency.patch b/package/flutter-engine/0002-remove-explicit-x11-dependency.patch
new file mode 100644
index 0000000000..23d7ec9b06
--- /dev/null
+++ b/package/flutter-engine/0002-remove-explicit-x11-dependency.patch
@@ -0,0 +1,33 @@
+From b1a5db9318ca33a03f2700758d5debad907d21b6 Mon Sep 17 00:00:00 2001
+From: Joel Winarske <joel.winarsk@gmail.com>
+Date: Wed, 19 Jul 2023 15:26:40 -0700
+Subject: [PATCH] remove explicit x11 dependency
+
+This is superfluous and may conflict with the actual rendering system used in
+gtk3 (e.g. wayland.)
+
+Upstream: https://github.com/flutter/flutter/issues/123073
+Signed-off-by: Joel Winarske <joel.winarske@gmail.com>
+Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.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 da0ac056b..70c7a0ea1 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.41.0
+
diff --git a/package/flutter-engine/0003-fix-toolchain-paths.patch b/package/flutter-engine/0003-fix-toolchain-paths.patch
new file mode 100644
index 0000000000..ba5d5f8023
--- /dev/null
+++ b/package/flutter-engine/0003-fix-toolchain-paths.patch
@@ -0,0 +1,40 @@
+From ca175ef5bf7f96db57fb5aa562602dc424fab81c Mon Sep 17 00:00:00 2001
+From: Joel Winarske <joel.winarsk@gmail.com>
+Date: Sun, 5 Mar 2023 10:43:02 -0800
+Subject: [PATCH] fix toolchain paths
+
+Flutter includes a copy of clang which is required to build. However, by
+default, build/toolchain/custom/BUILD.gn attempts to use several gcc utilities
+such as ar, readelf, nm, and strip. Change these to the proper llvm provided
+utility.
+
+Upstream: https://github.com/flutter/flutter/issues/123073
+
+Signed-off-by: Joel Winarske <joel.winarsk@gmail.com>
+Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
+---
+ build/toolchain/custom/BUILD.gn | 4 +++++------
+ 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}"
+--
+2.39.2
diff --git a/package/flutter-engine/0004-pkg-config.py-do-not-prepend-sysroot-path.patch b/package/flutter-engine/0004-pkg-config.py-do-not-prepend-sysroot-path.patch
new file mode 100644
index 0000000000..a31be7d77f
--- /dev/null
+++ b/package/flutter-engine/0004-pkg-config.py-do-not-prepend-sysroot-path.patch
@@ -0,0 +1,37 @@
+From 51e8fed854fd9d373bb9b20d7ed8e7cf6ef12312 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <adam.duskett@amarulasolutions.com>
+Date: Wed, 19 Jul 2023 11:48:59 -0700
+Subject: [PATCH] pkg-config.py: do not prepend sysroot path
+
+Buildroot uses the standard PKG_CONFIG_SYSROOT_DIR variable, so what the
+pkg-config.py script is doing doesn't make sense. There is no need to prepend
+the sysroot, and flutter should let pkg-config use the PKG_CONFIG_SYSROOT_DIR
+variable.
+
+Without this patch, the pkg-config.py script double prepends the sysroot path.
+IE: output/host/.../sysroot/output/host/.../sysroot
+
+Upstream: https://github.com/flutter/flutter/issues/132152
+Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
+---
+ build/config/linux/pkg-config.py | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/build/config/linux/pkg-config.py b/build/config/linux/pkg-config.py
+index b4a6aff17..44ffdcaea 100644
+--- a/build/config/linux/pkg-config.py
++++ b/build/config/linux/pkg-config.py
+@@ -207,9 +207,7 @@ def main():
+ all_flags = flag_string.strip().split(' ')
+
+
+- sysroot = options.sysroot
+- if not sysroot:
+- sysroot = ''
++ sysroot = ''
+
+ includes = []
+ cflags = []
+--
+2.41.0
+
diff --git a/package/flutter-engine/Config.in b/package/flutter-engine/Config.in
new file mode 100644
index 0000000000..2ec5b90ffd
--- /dev/null
+++ b/package/flutter-engine/Config.in
@@ -0,0 +1,55 @@
+# Flutter includes a vender copy of clang which is mandatory to use for
+# compiling. These are the supported architectures.
+config BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
+ bool
+ default y if BR2_aarch64
+ default y if BR2_arm && !BR2_ARM_CPU_ARMV4 && !BR2_ARM_CPU_ARMV5
+ default y if BR2_x86_64
+
+config BR2_PACKAGE_FLUTTER_ENGINE
+ bool "flutter-engine"
+ depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
+ depends on BR2_TOOLCHAIN_USES_GLIBC
+ depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5
+ depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL # pthreads
+ depends on BR2_INSTALL_LIBSTDCPP
+ depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # std::shared_future
+ depends on !BR2_STATIC_LIBS
+ depends on BR2_USE_WCHAR # std::wstring
+ depends on BR2_HOST_GCC_AT_LEAST_5
+ depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES
+ select BR2_PACKAGE_FREETYPE
+ select BR2_PACKAGE_HOST_DEPOT_TOOLS
+ select BR2_PACKAGE_ZLIB
+ help
+ Flutter is Google's SDK for crafting beautiful, fast user
+ experience for mobile, web, and desktop from a single
+ codebase. Flutter works with existing code, is used by
+ developers and organizations around the world, and is
+ free and open source.
+
+ The Flutter Engine is a portable runtime for hosting
+ Flutter applications. It implements Flutter's core
+ libraries, including animation and graphics, file and
+ network I/O, accessibility support, plugin architecture,
+ and a Dart runtime and compile toolchain. Most developers
+ will interact with Flutter via the Flutter Framework,
+ which provides a modern, reactive framework, and a rich
+ set of platform, layout and foundation widgets.
+
+ https://github.com/flutter/engine
+
+comment "flutter-engine needs an OpenGL or OpenGLES backend"
+ depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
+ depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBGLES
+
+comment "flutter-engine needs a glibc toolchain w/ wchar, C++, gcc >= 5, dynamic library, host gcc >= 5, NPTL"
+ depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
+ depends on !BR2_TOOLCHAIN_USES_GLIBC || !BR2_TOOLCHAIN_HAS_THREADS_NPTL \
+ || !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_5 \
+ || BR2_STATIC_LIBS || !BR2_USE_WCHAR \
+ || !BR2_HOST_GCC_AT_LEAST_5
+
+comment "flutter-engine needs a toolchain not affected by GCC bug 64735"
+ depends on BR2_PACKAGE_FLUTTER_ENGINE_ARCH_SUPPORTS
+ depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
diff --git a/package/flutter-engine/dot-gclient b/package/flutter-engine/dot-gclient
new file mode 100644
index 0000000000..4e5787419b
--- /dev/null
+++ b/package/flutter-engine/dot-gclient
@@ -0,0 +1,12 @@
+# This file is taken from the output of meta-flutter/lib/gn.py
+
+solutions = [{
+ "managed": False,
+ "name": "src/flutter",
+ "url": "https://github.com/flutter/engine.git@!FLUTTER_VERSION!",
+ "custom_vars": {
+ "download_android_deps": False,
+ "download_windows_deps": False,
+ "download_linux_deps": False
+ },
+}]
diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk
new file mode 100644
index 0000000000..76c6610fcd
--- /dev/null
+++ b/package/flutter-engine/flutter-engine.mk
@@ -0,0 +1,234 @@
+################################################################################
+#
+# flutter-engine
+#
+################################################################################
+
+# Flutter-engine has a release on the GitHub page. However, that release is
+# only for Google. Its intended purpose is for the gclient tool provided by
+# Google in their depot-tools package. To use the source code, we must use
+# gclient to download the flutter-engine source code along with several other
+# projects. Unfortunately, the Buildroot download system does not have the
+# capability of using gclient, and considering this package is the only
+# package that uses gclient, we side-step the entire download process and
+# perform the following steps if a tarball does not exist already:
+#
+# - Copy the pre-made gclient config file to a temporary scratch directory.
+# - Run gclient sync to generate a source directory with the proper
+# flutter-engine source code in the correct places.
+# - Create a source tarball.
+# - Copy the source tarball to the $(FLUTTER_ENGINE_DL_DIR) directory.
+#
+# There is no hash provided, as the gn binary (used for configuration) relies
+# on the .git directories. As such, a reproducible tarball is not possible.
+FLUTTER_ENGINE_VERSION = 3.13.4
+
+# There is nothing for Buildroot to download. This is handled by gclient.
+FLUTTER_ENGINE_SITE =
+FLUTTER_ENGINE_SOURCE =
+FLUTTER_ENGINE_LICENSE = BSD-3-Clause
+FLUTTER_ENGINE_LICENSE_FILES = LICENSE
+FLUTTER_ENGINE_TARBALL_PATH = $(FLUTTER_ENGINE_DL_DIR)/flutter-$(FLUTTER_ENGINE_VERSION).tar.gz
+FLUTTER_ENGINE_INSTALL_STAGING = YES
+FLUTTER_ENGINE_DOWNLOAD_DEPENDENCIES = host-depot-tools
+FLUTTER_ENGINE_DEPENDENCIES = \
+ host-ninja \
+ host-pkgconf \
+ freetype \
+ zlib
+
+# Dispatch all architectures of flutter
+# FLUTTER_ENGINE_TARGET_TRIPPLE must match the directory name found in
+# buildtools/linux-x64/clang/lib/clang/*/lib
+ifeq ($(BR2_aarch64),y)
+FLUTTER_ENGINE_TARGET_ARCH = arm64
+FLUTTER_ENGINE_TARGET_TRIPPLE = aarch64-unknown-linux-gnu
+else ifeq ($(BR2_arm)$(BR2_armeb),y)
+FLUTTER_ENGINE_TARGET_ARCH = arm
+FLUTTER_ENGINE_TARGET_TRIPPLE = armv7-unknown-linux-gnueabihf
+else ifeq ($(BR2_x86_64),y)
+FLUTTER_ENGINE_TARGET_ARCH = x64
+FLUTTER_ENGINE_TARGET_TRIPPLE = x86_64-unknown-linux-gnu
+endif
+
+ifeq ($(BR2_ENABLE_RUNTIME_DEBUG),y)
+FLUTTER_ENGINE_RUNTIME_MODE=debug
+else
+FLUTTER_ENGINE_RUNTIME_MODE=release
+endif
+
+FLUTTER_ENGINE_BUILD_DIR = \
+ $(@D)/out/linux_$(FLUTTER_ENGINE_RUNTIME_MODE)_$(FLUTTER_ENGINE_TARGET_ARCH)
+
+FLUTTER_ENGINE_INSTALL_FILES = libflutter_engine.so
+
+# Flutter engine includes a bundled patched clang that must be used for
+# compiling or else there are linking errors.
+FLUTTER_ENGINE_CLANG_PATH = $(@D)/buildtools/linux-x64/clang
+
+FLUTTER_ENGINE_CONF_OPTS = \
+ --clang \
+ --embedder-for-target \
+ --linux-cpu $(FLUTTER_ENGINE_TARGET_ARCH) \
+ --no-build-embedder-examples \
+ --no-clang-static-analyzer \
+ --no-enable-unittests \
+ --no-goma \
+ --no-prebuilt-dart-sdk \
+ --no-stripped \
+ --runtime-mode $(FLUTTER_ENGINE_RUNTIME_MODE) \
+ --target-os linux \
+ --target-sysroot $(STAGING_DIR) \
+ --target-toolchain $(FLUTTER_ENGINE_CLANG_PATH) \
+ --target-triple $(FLUTTER_ENGINE_TARGET_TRIPPLE)
+
+ifeq ($(BR2_arm)$(BR2_armeb),y)
+FLUTTER_ENGINE_CONF_OPTS += \
+ --arm-float-abi $(call qstrip,$(BR2_GCC_TARGET_FLOAT_ABI))
+endif
+
+# We must specify a full path to ccache and a full path to the flutter-engine
+# provided clang in order to use ccache, or else flutter-engine will error out
+# attempting to find ccache in the target-toolchain provided path.
+ifeq ($(BR2_CCACHE),y)
+define FLUTTER_ENGINE_COMPILER_PATH_FIXUP
+ $(SED) "s%cc =.*%cc = \"$(HOST_DIR)/bin/ccache $(FLUTTER_ENGINE_CLANG_PATH)/bin/clang\""%g \
+ $(@D)/build/toolchain/custom/BUILD.gn
+
+ $(SED) "s%cxx =.*%cxx = \"$(HOST_DIR)/bin/ccache $(FLUTTER_ENGINE_CLANG_PATH)/bin/clang++\""%g \
+ $(@D)/build/toolchain/custom/BUILD.gn
+endef
+FLUTTER_ENGINE_PRE_CONFIGURE_HOOKS += FLUTTER_ENGINE_COMPILER_PATH_FIXUP
+endif
+
+ifeq ($(BR2_ENABLE_LTO),y)
+FLUTTER_ENGINE_CONF_OPTS += --lto
+else
+FLUTTER_ENGINE_CONF_OPTS += --no-lto
+endif
+
+ifeq ($(BR2_OPTIMIZE_0),y)
+FLUTTER_ENGINE_CONF_OPTS += --unoptimized
+endif
+
+# There is no --disable-fontconfig option.
+ifeq ($(BR2_PACKAGE_FONTCONFIG),y)
+FLUTTER_ENGINE_DEPENDENCIES += fontconfig
+FLUTTER_ENGINE_CONF_OPTS += --enable-fontconfig
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGL),y)
+FLUTTER_ENGINE_DEPENDENCIES += libgl
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
+FLUTTER_ENGINE_DEPENDENCIES += libgles
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGLFW),y)
+FLUTTER_ENGINE_DEPENDENCIES += libglfw
+FLUTTER_ENGINE_CONF_OPTS += --build-glfw-shell
+else
+FLUTTER_ENGINE_CONF_OPTS += --no-build-glfw-shell
+endif
+
+ifeq ($(BR2_PACKAGE_LIBGTK3),y)
+FLUTTER_ENGINE_DEPENDENCIES += libgtk3
+FLUTTER_ENGINE_INSTALL_FILES += libflutter_linux_gtk.so
+else
+FLUTTER_ENGINE_CONF_OPTS += --disable-desktop-embeddings
+endif
+
+# There is no --disable-vulkan option
+ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),y)
+FLUTTER_ENGINE_CONF_OPTS += --enable-vulkan
+endif
+
+ifeq ($(BR2_PACKAGE_XORG7)$(BR2_PACKAGE_LIBXCB),yy)
+FLUTTER_ENGINE_DEPENDENCIES += libxcb
+else
+define FLUTTER_ENGINE_VULKAN_X11_SUPPORT_FIXUP
+ $(SED) "s%vulkan_use_x11.*%vulkan_use_x11 = false%g" -i \
+ $(@D)/build_overrides/vulkan_headers.gni
+endef
+FLUTTER_ENGINE_PRE_CONFIGURE_HOOKS += FLUTTER_ENGINE_VULKAN_X11_SUPPORT_FIXUP
+endif
+
+ifeq ($(BR2_PACKAGE_WAYLAND),y)
+FLUTTER_ENGINE_DEPENDENCIES += wayland
+else
+define FLUTTER_ENGINE_VULKAN_WAYLAND_SUPPORT_FIXUP
+ $(SED) "s%vulkan_use_wayland.*%vulkan_use_wayland = false%g" \
+ $(@D)/build_overrides/vulkan_headers.gni
+endef
+FLUTTER_ENGINE_PRE_CONFIGURE_HOOKS += FLUTTER_ENGINE_VULKAN_WAYLAND_SUPPORT_FIXUP
+endif
+
+# Generate a tarball if one does not already exist.
+define FLUTTER_ENGINE_GENERATE_TARBALL
+ PATH=$(BR_PATH):$(HOST_DIR)/share/depot_tools \
+ PYTHONPATH=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR) \
+ $(FLUTTER_ENGINE_PKGDIR)/gen-tarball \
+ --dot-gclient $(FLUTTER_ENGINE_PKGDIR)/dot-gclient \
+ --jobs $(PARALLEL_JOBS) \
+ --scratch-dir $(@D)/dl-tmp \
+ --tarball-dl-path $(FLUTTER_ENGINE_TARBALL_PATH) \
+ --version $(FLUTTER_ENGINE_VERSION)
+endef
+FLUTTER_ENGINE_POST_DOWNLOAD_HOOKS += FLUTTER_ENGINE_GENERATE_TARBALL
+
+define FLUTTER_ENGINE_EXTRACT_CMDS
+ gzip -d -c $(FLUTTER_ENGINE_TARBALL_PATH) | tar --strip-components 1 -C $(@D) -xf -
+endef
+
+define FLUTTER_ENGINE_CONFIGURE_CMDS
+ cd $(@D) && \
+ rm -rf $(FLUTTER_ENGINE_BUILD_DIR) && \
+ PATH=$(BR_PATH):$(HOST_DIR)/share/depot_tools \
+ ./flutter/tools/gn \
+ $(FLUTTER_ENGINE_CONF_OPTS)
+endef
+
+define FLUTTER_ENGINE_BUILD_CMDS
+ cd $(@D) && \
+ PATH=$(BR_PATH):$(HOST_DIR)/share/depot_tools/ \
+ $(HOST_DIR)/bin/ninja \
+ -j $(PARALLEL_JOBS) \
+ -C $(FLUTTER_ENGINE_BUILD_DIR)
+endef
+
+# Flutter-engine builds several host applications use for flutter development.
+# One of those applications is gen_snapshot, which turns applications into
+# usable .so files for the target architecture. Compiling a host version of
+# flutter-engine would result in binaries producing host-architecture
+# flutter applications .so files. As such, copy gen_snapshot to the host
+# directory here and name it flutter_gen_snapshot for clarity.
+FLUTTER_ENGINE_GEN_SNAPSHOT = $(HOST_DIR)/bin/flutter_gen_snapshot
+define FLUTTER_ENGINE_INSTALL_GEN_SNAPSHOT
+ $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/clang_x64/gen_snapshot \
+ $(HOST_DIR)/bin/flutter_gen_snapshot
+endef
+FLUTTER_ENGINE_POST_INSTALL_STAGING_HOOKS += FLUTTER_ENGINE_INSTALL_GEN_SNAPSHOT
+
+define FLUTTER_ENGINE_INSTALL_STAGING_CMDS
+ $(foreach i,$(FLUTTER_ENGINE_INSTALL_FILES),
+ $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/so.unstripped/$(i) \
+ $(STAGING_DIR)/usr/lib/$(i); \
+ )
+ $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/flutter_embedder.h \
+ $(STAGING_DIR)/usr/include/flutter_embedder.h
+
+ $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/icudtl.dat \
+ $(STAGING_DIR)/usr/share/flutter/$(FLUTTER_ENGINE_RUNTIME_MODE)/data/icudtl.dat
+endef
+
+define FLUTTER_ENGINE_INSTALL_TARGET_CMDS
+ $(foreach i,$(FLUTTER_ENGINE_INSTALL_FILES),
+ $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/so.unstripped/$(i) \
+ $(TARGET_DIR)/usr/lib/$(i); \
+ )
+ $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/icudtl.dat \
+ $(TARGET_DIR)/usr/share/flutter/$(FLUTTER_ENGINE_RUNTIME_MODE)/data/icudtl.dat
+endef
+
+$(eval $(generic-package))
diff --git a/package/flutter-engine/gen-tarball b/package/flutter-engine/gen-tarball
new file mode 100755
index 0000000000..e040beac75
--- /dev/null
+++ b/package/flutter-engine/gen-tarball
@@ -0,0 +1,111 @@
+#!/usr/bin/env bash
+# Call gclient and generate a flutter-engine source tarball if one does not
+# already exist.
+set -eu
+
+DL_DIR=
+DOT_GCLIENT=
+JOBS=
+SCRATCH_DIR=
+TARBALL_DL_PATH=
+VERSION=
+TARBALL_NAME=
+
+# Print status messages in the same style Buildroot prints.
+message() {
+ term_bold="$(tput smso 2>/dev/null)"
+ term_reset="$(tput rmso 2>/dev/null)"
+ echo "${term_bold}>>> flutter-engine ${VERSION} ${1}${term_reset}"
+}
+
+parse_opts() {
+ local o O opts
+
+ o='d:j:s:t:v:'
+ O='dot-gclient:,jobs:,scratch-dir:,tarball-dl-path:,version:'
+ opts="$(getopt -o "${o}" -l "${O}" -- "${@}")"
+ eval set -- "${opts}"
+
+ while [ ${#} -gt 0 ]; do
+ case "${1}" in
+ (-d|--dot-gclient)
+ DOT_GCLIENT="${2}"
+ shift 2
+ ;;
+ (-j|--jobs)
+ JOBS="${2}"
+ shift 2
+ ;;
+ (-s|--scratch-dir)
+ SCRATCH_DIR="${2}"
+ shift 2
+ ;;
+ (-t|--tarball-dl-path)
+ DL_DIR=$(dirname "${2}")
+ TARBALL_DL_PATH="${2}"
+ shift 2
+ ;;
+ (-v|--version)
+ VERSION="${2}"
+ TARBALL_NAME=flutter-"${VERSION}".tar.gz
+ shift 2
+ ;;
+ (--)
+ shift
+ break
+ ;;
+ esac
+ done
+}
+
+copy_dot_gclient() {
+ rm -rf "${SCRATCH_DIR}"
+ mkdir -p "${SCRATCH_DIR}"
+ install -D -m 0755 "${DOT_GCLIENT}" "${SCRATCH_DIR}"/.gclient
+ sed "s%!FLUTTER_VERSION!%${VERSION}%g" -i "${SCRATCH_DIR}"/.gclient
+ cd "${SCRATCH_DIR}"
+}
+
+run_gclient() {
+ local gclient="${HOST_DIR}"/share/depot_tools/gclient.py
+ if [[ ! -e "${gclient}" ]]; then
+ message "${gclient} does not exist. Is host-depot-tools built and installed?"
+ exit 1
+ fi
+ message "Downloading"
+ "${gclient}" \
+ sync \
+ --delete_unversioned_trees \
+ --no-history \
+ --reset \
+ --shallow \
+ -j"${JOBS}"
+}
+
+gen_tarball() {
+ message "Generating tarball"
+ mkdir -p "${DL_DIR}"
+ # We would use the mk_tar_gz helper method from the support/download/helpers
+ # script here. However, due to unknown reasons other than what I can
+ # articulate as "Google," this is not possible. Even though creating a
+ # tarball using the mk_tar_gz command results in a tarball that extracts and
+ # builds flutter-engine without warnings or errors, the gen_snapshot host
+ # utility, which turns dart applications into usable .so files for the
+ # flutter engine, results in the error:
+ # "Can't load kernel binary: Invalid SDK hash." As we are not interested in
+ # creating a reproducible tarball, we need to use tar -C instead.
+ tar -C "${SCRATCH_DIR}"/src -czf "${TARBALL_NAME}" .
+ mv "${TARBALL_NAME}" "${TARBALL_DL_PATH}"
+ rm -rf "${SCRATCH_DIR}"
+}
+
+main() {
+ parse_opts "${@}"
+ if [[ ! -e "${TARBALL_DL_PATH}" ]]; then
+ copy_dot_gclient
+ run_gclient
+ gen_tarball
+ fi
+}
+
+main "${@}"
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH v9 4/7] package/flutter-engine: new package
2023-09-19 20:42 ` [Buildroot] [PATCH v9 4/7] package/flutter-engine: " Adam Duskett
@ 2023-09-19 22:08 ` Yann E. MORIN
2023-09-19 22:33 ` Adam Duskett
0 siblings, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2023-09-19 22:08 UTC (permalink / raw)
To: Adam Duskett
Cc: Angelo Compagnucci, Michael Trimarchi, Thomas Petazzoni,
Asaf Kahlon, buildroot
Adam, All,
This is really a good job you did on such a tough package!
We're entering the realm of the details, so it is a good sign that we're
close to a merge!
On 2023-09-19 14:42 -0600, Adam Duskett spake thusly:
[--SNIP--]
> diff --git a/package/flutter-engine/dot-gclient b/package/flutter-engine/dot-gclient
> new file mode 100644
> index 0000000000..4e5787419b
> --- /dev/null
> +++ b/package/flutter-engine/dot-gclient
> @@ -0,0 +1,12 @@
> +# This file is taken from the output of meta-flutter/lib/gn.py
This comment is a bit misleading: it hints that this file is generated
(it is!) from some metadata. So my question was goign to be: why can't
we carry that metadata, the script, and generate the file ourselves?
But in fact, there is no interesting metadata needed to generate that
file; the only thing that is not hard-coded in the generating script
(besides the name, version and URI) is the set of download dependencies,
all set to False in the bitbake recipe.
So indeed it is not interesting to generate that file. And thus the
comment is indeed a bit misleading. I'll try to tweak it when
applying...
> +solutions = [{
> + "managed": False,
> + "name": "src/flutter",
> + "url": "https://github.com/flutter/engine.git@!FLUTTER_VERSION!",
> + "custom_vars": {
> + "download_android_deps": False,
> + "download_windows_deps": False,
> + "download_linux_deps": False
> + },
> +}]
> diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk
> new file mode 100644
> index 0000000000..76c6610fcd
> --- /dev/null
> +++ b/package/flutter-engine/flutter-engine.mk
> @@ -0,0 +1,234 @@
> +################################################################################
> +#
> +# flutter-engine
> +#
> +################################################################################
[--SNIP--]
> +# Generate a tarball if one does not already exist.
> +define FLUTTER_ENGINE_GENERATE_TARBALL
> + PATH=$(BR_PATH):$(HOST_DIR)/share/depot_tools \
So here, two things:
- you put $(HOST_DIR)/share/depot_tools in the PATH but .. -> [0]
- you should probably set it in the front:
PATH="$(HOST_DIR)/share/depot_tools:$(BR_PATH)"
> + PYTHONPATH=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR) \
> + $(FLUTTER_ENGINE_PKGDIR)/gen-tarball \
> + --dot-gclient $(FLUTTER_ENGINE_PKGDIR)/dot-gclient \
> + --jobs $(PARALLEL_JOBS) \
> + --scratch-dir $(@D)/dl-tmp \
> + --tarball-dl-path $(FLUTTER_ENGINE_TARBALL_PATH) \
> + --version $(FLUTTER_ENGINE_VERSION)
> +endef
> +FLUTTER_ENGINE_POST_DOWNLOAD_HOOKS += FLUTTER_ENGINE_GENERATE_TARBALL
> +
> +define FLUTTER_ENGINE_EXTRACT_CMDS
> + gzip -d -c $(FLUTTER_ENGINE_TARBALL_PATH) | tar --strip-components 1 -C $(@D) -xf -
We usually use suitable-extractor to decompress, and use $(TAR) and
$(TAR_OPTIONS) to extract:
$(call suitable-extractor,$(not dir $(FLUTTER_ENGINE_TARBALL_PATH))) $(FLUTTER_ENGINE_TARBALL_PATH) \
|$(TAR) --strip-components 1 -C $(@D) $(TAR_OPTIONS) -
[--SNIP--]
> diff --git a/package/flutter-engine/gen-tarball b/package/flutter-engine/gen-tarball
> new file mode 100755
> index 0000000000..e040beac75
> --- /dev/null
> +++ b/package/flutter-engine/gen-tarball
> @@ -0,0 +1,111 @@
[--SNIP--]
> +run_gclient() {
> + local gclient="${HOST_DIR}"/share/depot_tools/gclient.py
[0] here you don't use PATH to locate gclient.py.
> + if [[ ! -e "${gclient}" ]]; then
> + message "${gclient} does not exist. Is host-depot-tools built and installed?"
That should not happen because host-depot-tools is a dependency of
flutter-engine.
> + exit 1
> + fi
> + message "Downloading"
> + "${gclient}" \
Assuming $(HOST_DIR)/share/depot_tools first int he PATH, can we just
run:
gclient.py \
sync \
[...]
> + sync \
> + --delete_unversioned_trees \
> + --no-history \
> + --reset \
> + --shallow \
> + -j"${JOBS}"
> +}
> +
> +gen_tarball() {
> + message "Generating tarball"
> + mkdir -p "${DL_DIR}"
> + # We would use the mk_tar_gz helper method from the support/download/helpers
> + # script here. However, due to unknown reasons other than what I can
> + # articulate as "Google," this is not possible. Even though creating a
> + # tarball using the mk_tar_gz command results in a tarball that extracts and
> + # builds flutter-engine without warnings or errors, the gen_snapshot host
> + # utility, which turns dart applications into usable .so files for the
> + # flutter engine, results in the error:
> + # "Can't load kernel binary: Invalid SDK hash." As we are not interested in
> + # creating a reproducible tarball, we need to use tar -C instead.
As discussed on IRC, I think the real reason was that mk_tar_gz only
archives non-directories, i.e. files, symlinks, etc... so empty
directories are missing, and the flutter-engine buildsystem requires
them.
So, based on your replies, I may be able to ammend the commit when
applying and save you a respin. So, be careful in your replies! ;-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH v9 4/7] package/flutter-engine: new package
2023-09-19 22:08 ` Yann E. MORIN
@ 2023-09-19 22:33 ` Adam Duskett
0 siblings, 0 replies; 13+ messages in thread
From: Adam Duskett @ 2023-09-19 22:33 UTC (permalink / raw)
To: Yann E. MORIN
Cc: Angelo Compagnucci, Thomas Petazzoni, Asaf Kahlon, buildroot
[-- Attachment #1.1: Type: text/plain, Size: 7561 bytes --]
Hello Yann;
Adam Duskett
Senior Embedded Systems Developer
M. +1208-515-8102
adam.duskett@amarulasolutions.com
__________________________________
Amarula Solutions BV
Joop Geesinkweg 125, 1114 AB, Amsterdam, NL
T. +31 (0)85 111 9170
info@amarulasolutions.com
www.amarulasolutions.com
On Tue, Sep 19, 2023 at 4:08 PM Yann E. MORIN <yann.morin.1998@free.fr>
wrote:
> Adam, All,
>
> This is really a good job you did on such a tough package!
>
> We're entering the realm of the details, so it is a good sign that we're
> close to a merge!
>
> On 2023-09-19 14:42 -0600, Adam Duskett spake thusly:
> [--SNIP--]
> > diff --git a/package/flutter-engine/dot-gclient
> b/package/flutter-engine/dot-gclient
> > new file mode 100644
> > index 0000000000..4e5787419b
> > --- /dev/null
> > +++ b/package/flutter-engine/dot-gclient
> > @@ -0,0 +1,12 @@
> > +# This file is taken from the output of meta-flutter/lib/gn.py
>
> This comment is a bit misleading: it hints that this file is generated
> (it is!) from some metadata. So my question was goign to be: why can't
> we carry that metadata, the script, and generate the file ourselves?
>
> But in fact, there is no interesting metadata needed to generate that
> file; the only thing that is not hard-coded in the generating script
> (besides the name, version and URI) is the set of download dependencies,
> all set to False in the bitbake recipe.
>
> So indeed it is not interesting to generate that file. And thus the
> comment is indeed a bit misleading. I'll try to tweak it when
> applying...
>
> Yeah, Originally there was a custom_deps line that was required for
3.10.x, but is no longer needed for
3.13.x. So it's a vestige comment that can be removed.
> +solutions = [{
> > + "managed": False,
> > + "name": "src/flutter",
> > + "url": "https://github.com/flutter/engine.git@!FLUTTER_VERSION!",
> > + "custom_vars": {
> > + "download_android_deps": False,
> > + "download_windows_deps": False,
> > + "download_linux_deps": False
> > + },
> > +}]
> > diff --git a/package/flutter-engine/flutter-engine.mk
> b/package/flutter-engine/flutter-engine.mk
> > new file mode 100644
> > index 0000000000..76c6610fcd
> > --- /dev/null
> > +++ b/package/flutter-engine/flutter-engine.mk
> > @@ -0,0 +1,234 @@
> >
> +################################################################################
> > +#
> > +# flutter-engine
> > +#
> >
> +################################################################################
> [--SNIP--]
> > +# Generate a tarball if one does not already exist.
> > +define FLUTTER_ENGINE_GENERATE_TARBALL
> > + PATH=$(BR_PATH):$(HOST_DIR)/share/depot_tools \
>
> So here, two things:
> - you put $(HOST_DIR)/share/depot_tools in the PATH but .. -> [0]
> - you should probably set it in the front:
> PATH="$(HOST_DIR)/share/depot_tools:$(BR_PATH)"
>
> Good call. Doing this for all three lines (169, 188, and 195) works
perfectly fine.
> + PYTHONPATH=$(HOST_DIR)/lib/python$(PYTHON3_VERSION_MAJOR) \
> > + $(FLUTTER_ENGINE_PKGDIR)/gen-tarball \
> > + --dot-gclient $(FLUTTER_ENGINE_PKGDIR)/dot-gclient \
> > + --jobs $(PARALLEL_JOBS) \
> > + --scratch-dir $(@D)/dl-tmp \
> > + --tarball-dl-path $(FLUTTER_ENGINE_TARBALL_PATH) \
> > + --version $(FLUTTER_ENGINE_VERSION)
> > +endef
> > +FLUTTER_ENGINE_POST_DOWNLOAD_HOOKS += FLUTTER_ENGINE_GENERATE_TARBALL
> > +
> > +define FLUTTER_ENGINE_EXTRACT_CMDS
> > + gzip -d -c $(FLUTTER_ENGINE_TARBALL_PATH) | tar --strip-components
> 1 -C $(@D) -xf -
>
> We usually use suitable-extractor to decompress, and use $(TAR) and
> $(TAR_OPTIONS) to extract:
>
> $(call suitable-extractor,$(not dir $(FLUTTER_ENGINE_TARBALL_PATH)))
> $(FLUTTER_ENGINE_TARBALL_PATH) \
> |$(TAR) --strip-components 1 -C $(@D) $(TAR_OPTIONS) -
>
> Sounds good. Also tested and working properly.
> [--SNIP--]
> > diff --git a/package/flutter-engine/gen-tarball
> b/package/flutter-engine/gen-tarball
> > new file mode 100755
> > index 0000000000..e040beac75
> > --- /dev/null
> > +++ b/package/flutter-engine/gen-tarball
> > @@ -0,0 +1,111 @@
> [--SNIP--]
> > +run_gclient() {
> > + local gclient="${HOST_DIR}"/share/depot_tools/gclient.py
>
> [0] here you don't use PATH to locate gclient.py.
>
> > + if [[ ! -e "${gclient}" ]]; then
> > + message "${gclient} does not exist. Is host-depot-tools built and
> installed?"
>
> That should not happen because host-depot-tools is a dependency of
> flutter-engine.
>
> Fair enough. Easy to remove the check.
> > + exit 1
> > + fi
> > + message "Downloading"
> > + "${gclient}" \
>
> Assuming $(HOST_DIR)/share/depot_tools first int he PATH, can we just
> run:
>
> gclient.py \
> sync \
> [...]
>
> Tested and working properly.
> > + sync \
> > + --delete_unversioned_trees \
> > + --no-history \
> > + --reset \
> > + --shallow \
> > + -j"${JOBS}"
> > +}
> > +
> > +gen_tarball() {
> > + message "Generating tarball"
> > + mkdir -p "${DL_DIR}"
> > + # We would use the mk_tar_gz helper method from the
> support/download/helpers
> > + # script here. However, due to unknown reasons other than what I can
> > + # articulate as "Google," this is not possible. Even though creating a
> > + # tarball using the mk_tar_gz command results in a tarball that
> extracts and
> > + # builds flutter-engine without warnings or errors, the gen_snapshot
> host
> > + # utility, which turns dart applications into usable .so files for the
> > + # flutter engine, results in the error:
> > + # "Can't load kernel binary: Invalid SDK hash." As we are not
> interested in
> > + # creating a reproducible tarball, we need to use tar -C instead.
>
> As discussed on IRC, I think the real reason was that mk_tar_gz only
> archives non-directories, i.e. files, symlinks, etc... so empty
> directories are missing, and the flutter-engine buildsystem requires
> them.
>
> Something like the following will work:
# We would use the mk_tar_gz helper method from the
support/download/helpers
# script here. However, mk_tar_gz does not archive empty directories,
which
# flutter-engine needs.
# Even though creating a tarball using the mk_tar_gz command results
# in a tarball that extracts and builds flutter-engine without warnings or
# errors, the gen_snapshot host utility, which turns dart applications
into
# usable .so files for the flutter engine, results in the error:
# "Can't load kernel binary: Invalid SDK hash." As we are not interested
in
# creating a reproducible tarball, we need to use tar -C instead.
> So, based on your replies, I may be able to ammend the commit when
> applying and save you a respin. So, be careful in your replies! ;-)
>
> Regards,
> Yann E. MORIN.
>
> --
>
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics'
> conspiracy: |
> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___
> |
> | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is
> no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v
> conspiracy. |
>
> '------------------------------^-------^------------------^--------------------'
>
[-- Attachment #1.2: Type: text/html, Size: 13275 bytes --]
[-- Attachment #2: Type: text/plain, Size: 150 bytes --]
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH v9 5/7] package/flutter-pi: new package
2023-09-19 20:42 [Buildroot] [PATCH v9 1/7] package/python-httplib2: add host variant Adam Duskett
` (2 preceding siblings ...)
2023-09-19 20:42 ` [Buildroot] [PATCH v9 4/7] package/flutter-engine: " Adam Duskett
@ 2023-09-19 20:42 ` Adam Duskett
2023-09-19 20:42 ` [Buildroot] [PATCH v9 6/7] package/flutter-gallery: " Adam Duskett
2023-09-19 20:42 ` [Buildroot] [PATCH v9 7/7] support/testing/tests/package/test_flutter.py: new runtime test Adam Duskett
5 siblings, 0 replies; 13+ messages in thread
From: Adam Duskett @ 2023-09-19 20:42 UTC (permalink / raw)
To: buildroot
Cc: Adam Duskett, Asaf Kahlon, Thomas Petazzoni, Michael Trimarchi,
Angelo Compagnucci
flutter-pi is one of many flutter-embedders. However, flutter-pi is unique
because it doesn't require X or Wayland to run. So long as there is support for
KMS and DRI flutter-pi should run on any platform that flutter-engine supports.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/flutter-pi/Config.in | 84 +++++++++++++++++++++++++++++
package/flutter-pi/flutter-pi.hash | 3 ++
package/flutter-pi/flutter-pi.mk | 85 ++++++++++++++++++++++++++++++
5 files changed, 174 insertions(+)
create mode 100644 package/flutter-pi/Config.in
create mode 100644 package/flutter-pi/flutter-pi.hash
create mode 100644 package/flutter-pi/flutter-pi.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 258add1400..c9b972e8ab 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -34,6 +34,7 @@ F: package/vulkan-tools/
N: Adam Duskett <adam.duskett@amarulasolutions.com>
F: package/depot-tools/
F: package/flutter-engine/
+F: package/flutter-pi/
F: package/flutter-sdk-bin/
N: Adam Heinrich <adam@adamh.cz>
diff --git a/package/Config.in b/package/Config.in
index 066e621ab9..b73bb33bf6 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -343,6 +343,7 @@ comment "Graphic libraries"
source "package/fbset/Config.in"
source "package/fbterm/Config.in"
source "package/fbv/Config.in"
+ source "package/flutter-pi/Config.in"
source "package/freerdp/Config.in"
source "package/graphicsmagick/Config.in"
source "package/imagemagick/Config.in"
diff --git a/package/flutter-pi/Config.in b/package/flutter-pi/Config.in
new file mode 100644
index 0000000000..a869faf053
--- /dev/null
+++ b/package/flutter-pi/Config.in
@@ -0,0 +1,84 @@
+menuconfig BR2_PACKAGE_FLUTTER_PI
+ bool "flutter-pi"
+ depends on BR2_PACKAGE_FLUTTER_ENGINE
+ depends on BR2_PACKAGE_HAS_LIBGBM
+ depends on BR2_PACKAGE_SYSTEMD # Event loop and dbus support
+ depends on BR2_PACKAGE_HAS_UDEV # libinput
+ select BR2_PACKAGE_LIBDRM
+ select BR2_PACKAGE_LIBINPUT
+ select BR2_PACKAGE_LIBXKBCOMMON
+ help
+ A light-weight Flutter Engine Embedder. Flutter-pi also
+ runs without X11, so you don't need to boot into a
+ Desktop & have X11 or Wayland load up; just boot into the
+ command-line.
+
+ Although flutter-pi is only tested on a Rasberry Pi 4
+ 2GB, it should work fine on other linux platforms supported
+ by Flutter so long as there is support for KMS and DRI.
+
+ https://github.com/ardera/flutter-pi
+
+if BR2_PACKAGE_FLUTTER_PI
+
+comment "plugins"
+
+config BR2_PACKAGE_FLUTTER_PI_GSTREAMER_AUDIO_PLAYER_PLUGIN
+ bool "gstreamer audio player"
+ depends on BR2_PACKAGE_HAS_LIBGLES
+ select BR2_PACKAGE_GSTREAMER1
+ select BR2_PACKAGE_GST1_PLUGINS_BASE
+ select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA
+ select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOCONVERT
+ select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORESAMPLE
+ select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VOLUME
+ help
+ Include the gstreamer based video plugins in the finished
+ binary. Allows for more stable, hardware accelerated
+ video playback in flutter using gstreamer.
+
+config BR2_PACKAGE_FLUTTER_PI_GSTREAMER_VIDEO_PLAYER_PLUGIN
+ bool "gstreamer video player"
+ depends on BR2_PACKAGE_HAS_LIBGLES
+ select BR2_PACKAGE_GSTREAMER1
+ select BR2_PACKAGE_GST1_PLUGINS_BASE
+ select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL
+ select BR2_PACKAGE_GST1_PLUGINS_BASE_LIB_OPENGL_GLES2
+ select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERTSCALE
+ help
+ Include the gstreamer based video plugins in the finished
+ binary. Allows for more stable, hardware accelerated
+ video playback in flutter using gstreamer.
+
+comment "gstreamer video player plugin needs an OpenGL ES backend"
+ depends on !BR2_PACKAGE_HAS_LIBGLES
+
+config BR2_PACKAGE_FLUTTER_PI_RAW_KEYBOARD_PLUGIN
+ bool "raw keyboard"
+ help
+ Include the raw keyboard plugin in the finished binary.
+ Enables raw keycode listening in flutter via the flutter
+ RawKeyboard interface.
+
+config BR2_PACKAGE_FLUTTER_PI_TEST_PLUGIN
+ bool "Test plugin"
+ help
+ Include the test plugin in the finished binary.
+ Allows testing platform channel communication.
+
+config BR2_PACKAGE_FLUTTER_PI_TEXT_INPUT_PLUGIN
+ bool "text input"
+ help
+ Include the text input plugin in the finished binary.
+ Enables text input (to flutter text fields, for example)
+ via attached keyboards.
+
+endif
+
+comment "flutter-pi needs flutter-engine"
+ depends on !BR2_PACKAGE_FLUTTER_ENGINE
+
+comment "flutter-pi needs GBM, systemd, and udev"
+ depends on !BR2_PACKAGE_HAS_LIBGBM || \
+ !BR2_PACKAGE_SYSTEMD || \
+ !BR2_PACKAGE_HAS_UDEV
diff --git a/package/flutter-pi/flutter-pi.hash b/package/flutter-pi/flutter-pi.hash
new file mode 100644
index 0000000000..f7148963a4
--- /dev/null
+++ b/package/flutter-pi/flutter-pi.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 e4af79c8f53c15913f52a83a221f099a2a750d023a0bc4560d0db6f15def79a2 flutter-pi-d62e84350d2869b3ec1dfb1af21bfe234c4b817f-br1.tar.gz
+sha256 b34df9d3e1b4e5d1ba70b1740ec74b69f1189b44efd0c96b898b074ef8db1c70 LICENSE
diff --git a/package/flutter-pi/flutter-pi.mk b/package/flutter-pi/flutter-pi.mk
new file mode 100644
index 0000000000..27f140c177
--- /dev/null
+++ b/package/flutter-pi/flutter-pi.mk
@@ -0,0 +1,85 @@
+################################################################################
+#
+# flutter-pi
+#
+################################################################################
+
+FLUTTER_PI_VERSION = d62e84350d2869b3ec1dfb1af21bfe234c4b817f
+FLUTTER_PI_SITE = https://github.com/ardera/flutter-pi.git
+FLUTTER_PI_SITE_METHOD = git
+FLUTTER_PI_LICENSE = MIT
+FLUTTER_PI_LICENSE_FILES = LICENSE
+FLUTTER_PI_DEPENDENCIES = \
+ flutter-engine \
+ libinput \
+ libxkbcommon \
+ systemd
+
+FLUTTER_PI_CONF_OPTS = \
+ -DDEBUG_DRM_PLANE_ALLOCATIONS=OFF \
+ -DDUMP_ENGINE_LAYERS=OFF \
+ -DENABLE_ASAN=OFF \
+ -DENABLE_MTRACE=OFF \
+ -DENABLE_SOFTWARE=OFF \
+ -DENABLE_TESTS=OFF \
+ -DENABLE_TSAN=OFF \
+ -DENABLE_UBSAN=OFF \
+ -DENABLE_VULKAN=OFF \
+ -DFILESYSTEM_LAYOUT=meta-flutter \
+ -DLINT_EGL_HEADERS=OFF \
+ -DTRY_BUILD_GSTREAMER_AUDIO_PLAYER_PLUGIN=OFF \
+ -DTRY_BUILD_GSTREAMER_VIDEO_PLAYER_PLUGIN=OFF \
+ -DTRY_ENABLE_OPENGL=OFF \
+ -DTRY_ENABLE_SESSION_SWITCHING=OFF \
+ -DTRY_ENABLE_VULKAN=OFF \
+ -DVULKAN_DEBUG="OFF" \
+ -DUSE_LEGACY_KMS=OFF \
+ -DWARN_MISSING_FIELD_INITIALIZERS=OFF
+
+ifeq ($(BR2_ENABLE_LTO),y)
+FLUTTER_PI_CONF_OPTS += -DLTO=ON
+else
+FLUTTER_PI_CONF_OPTS += -DLTO=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_FLUTTER_PI_GSTREAMER_AUDIO_PLAYER_PLUGIN),y)
+FLUTTER_PI_DEPENDENCIES += gstreamer1 gst1-plugins-base
+FLUTTER_PI_CONF_OPTS += -DBUILD_GSTREAMER_AUDIO_PLAYER_PLUGIN=ON
+else
+FLUTTER_PI_CONF_OPTS += -DBUILD_GSTREAMER_AUDIO_PLAYER_PLUGIN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_FLUTTER_PI_GSTREAMER_VIDEO_PLAYER_PLUGIN),y)
+FLUTTER_PI_DEPENDENCIES += gstreamer1 gst1-plugins-base
+FLUTTER_PI_CONF_OPTS += -DBUILD_GSTREAMER_VIDEO_PLAYER_PLUGIN=ON
+else
+FLUTTER_PI_CONF_OPTS += -DBUILD_GSTREAMER_VIDEO_PLAYER_PLUGIN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_FLUTTER_PI_RAW_KEYBOARD_PLUGIN),y)
+FLUTTER_PI_CONF_OPTS += -DBUILD_RAW_KEYBOARD_PLUGIN=ON
+else
+FLUTTER_PI_CONF_OPTS += -DBUILD_RAW_KEYBOARD_PLUGIN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_FLUTTER_PI_TEXT_INPUT_PLUGIN),y)
+FLUTTER_PI_DEPENDENCIES += libinput libxkbcommon
+FLUTTER_PI_CONF_OPTS += -DBUILD_TEXT_INPUT_PLUGIN=ON
+else
+FLUTTER_PI_CONF_OPTS += -DBUILD_TEXT_INPUT_PLUGIN=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y)
+FLUTTER_PI_CONF_OPTS += -DENABLE_OPENGL=ON
+else
+FLUTTER_PI_CONF_OPTS += -DENABLE_OPENGL=OFF
+endif
+
+ifeq ($(BR2_PACKAGE_SEATD),y)
+FLUTTER_PI_DEPENDENCIES += seatd
+FLUTTER_PI_CONF_OPTS += -DENABLE_SESSION_SWITCHING=ON
+else
+FLUTTER_PI_CONF_OPTS += -DENABLE_SESSION_SWITCHING=OFF
+endif
+
+$(eval $(cmake-package))
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread* [Buildroot] [PATCH v9 6/7] package/flutter-gallery: new package
2023-09-19 20:42 [Buildroot] [PATCH v9 1/7] package/python-httplib2: add host variant Adam Duskett
` (3 preceding siblings ...)
2023-09-19 20:42 ` [Buildroot] [PATCH v9 5/7] package/flutter-pi: " Adam Duskett
@ 2023-09-19 20:42 ` Adam Duskett
2023-09-19 20:42 ` [Buildroot] [PATCH v9 7/7] support/testing/tests/package/test_flutter.py: new runtime test Adam Duskett
5 siblings, 0 replies; 13+ messages in thread
From: Adam Duskett @ 2023-09-19 20:42 UTC (permalink / raw)
To: buildroot
Cc: Adam Duskett, Asaf Kahlon, Thomas Petazzoni, Michael Trimarchi,
Angelo Compagnucci
Flutter Gallery is a resource to help developers evaluate and use Flutter.
It is a collection of Material Design & Cupertino widgets, behaviors, and
vignettes implemented with Flutter.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
DEVELOPERS | 1 +
package/Config.in | 1 +
.../0001-remove-GetStorage.patch | 84 +++++++++++++++++++
package/flutter-gallery/Config.in | 16 ++++
package/flutter-gallery/flutter-gallery.hash | 3 +
package/flutter-gallery/flutter-gallery.mk | 44 ++++++++++
6 files changed, 149 insertions(+)
create mode 100644 package/flutter-gallery/0001-remove-GetStorage.patch
create mode 100644 package/flutter-gallery/Config.in
create mode 100644 package/flutter-gallery/flutter-gallery.hash
create mode 100644 package/flutter-gallery/flutter-gallery.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index c9b972e8ab..48a4ec776a 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -34,6 +34,7 @@ F: package/vulkan-tools/
N: Adam Duskett <adam.duskett@amarulasolutions.com>
F: package/depot-tools/
F: package/flutter-engine/
+F: package/flutter-gallery/
F: package/flutter-pi/
F: package/flutter-sdk-bin/
diff --git a/package/Config.in b/package/Config.in
index b73bb33bf6..109c2921a2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -343,6 +343,7 @@ comment "Graphic libraries"
source "package/fbset/Config.in"
source "package/fbterm/Config.in"
source "package/fbv/Config.in"
+ source "package/flutter-gallery/Config.in"
source "package/flutter-pi/Config.in"
source "package/freerdp/Config.in"
source "package/graphicsmagick/Config.in"
diff --git a/package/flutter-gallery/0001-remove-GetStorage.patch b/package/flutter-gallery/0001-remove-GetStorage.patch
new file mode 100644
index 0000000000..142cf853da
--- /dev/null
+++ b/package/flutter-gallery/0001-remove-GetStorage.patch
@@ -0,0 +1,84 @@
+From a1d38d78163d84d3506c188e195cd5fa363f4be6 Mon Sep 17 00:00:00 2001
+From: Adam Duskett <adam.duskett@amarulasolutions.com>
+Date: Thu, 17 Aug 2023 13:00:07 -0600
+Subject: [PATCH] remove GetStorage
+
+Commit 287b20a8bfc71196cd733625e622b98b2f84bef1 introduced the get_storage
+plugin which breaks with the following error when the application is ran:
+
+Unhandled Exception: MissingPluginException(No implementation found for method
+getApplicataionDocumentsDirectory on channel plugins.flutter.io/path_provider)
+
+Revert the change.
+
+Upstream: https://github.com/flutter/gallery/issues/994
+Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
+---
+ lib/feature_discovery/feature_discovery.dart | 10 ----------
+ lib/main.dart | 2 --
+ pubspec.yaml | 1 -
+ 3 files changed, 13 deletions(-)
+
+diff --git a/lib/feature_discovery/feature_discovery.dart b/lib/feature_discovery/feature_discovery.dart
+index 288c78b..965d83c 100644
+--- a/lib/feature_discovery/feature_discovery.dart
++++ b/lib/feature_discovery/feature_discovery.dart
+@@ -6,7 +6,6 @@ import 'package:flutter/material.dart';
+ import 'package:flutter/scheduler.dart';
+ import 'package:gallery/feature_discovery/animation.dart';
+ import 'package:gallery/feature_discovery/overlay.dart';
+-import 'package:get_storage/get_storage.dart';
+
+ const _featureHighlightShownKey = 'feature_highlight_shown';
+
+@@ -271,15 +270,6 @@ class _FeatureDiscoveryState extends State<FeatureDiscovery>
+
+ initAnimationControllers();
+ initAnimations();
+-
+- final localStorage = GetStorage();
+- final featureHiglightShown =
+- localStorage.read<bool>(_featureHighlightShownKey) ?? false;
+- localStorage.write(_featureHighlightShownKey, true);
+- showOverlay = widget.showOverlay && !featureHiglightShown;
+- if (showOverlay) {
+- localStorage.write(_featureHighlightShownKey, true);
+- }
+ }
+
+ void initAnimationControllers() {
+diff --git a/lib/main.dart b/lib/main.dart
+index e9f4ff9..8c7a4e3 100644
+--- a/lib/main.dart
++++ b/lib/main.dart
+@@ -16,7 +16,6 @@ import 'package:gallery/pages/backdrop.dart';
+ import 'package:gallery/pages/splash.dart';
+ import 'package:gallery/routes.dart';
+ import 'package:gallery/themes/gallery_theme_data.dart';
+-import 'package:get_storage/get_storage.dart';
+ import 'package:google_fonts/google_fonts.dart';
+
+ import 'firebase_options.dart';
+@@ -26,7 +25,6 @@ export 'package:gallery/data/demos.dart' show pumpDeferredLibraries;
+
+ void main() async {
+ GoogleFonts.config.allowRuntimeFetching = false;
+- await GetStorage.init();
+
+ if (defaultTargetPlatform != TargetPlatform.linux &&
+ defaultTargetPlatform != TargetPlatform.windows &&
+diff --git a/pubspec.yaml b/pubspec.yaml
+index 964edad..4b00e40 100644
+--- a/pubspec.yaml
++++ b/pubspec.yaml
+@@ -24,7 +24,6 @@ dependencies:
+ firebase_core: ^2.7.0
+ firebase_crashlytics: ^3.1.1
+ firebase_performance: ^0.9.0+14
+- get_storage: ^2.1.1
+ google_fonts: ^5.0.0
+ intl: any # An exact version pin will be provided by the Flutter SDK
+ meta: ^1.7.0
+--
+2.41.0
+
diff --git a/package/flutter-gallery/Config.in b/package/flutter-gallery/Config.in
new file mode 100644
index 0000000000..224457ea6f
--- /dev/null
+++ b/package/flutter-gallery/Config.in
@@ -0,0 +1,16 @@
+config BR2_PACKAGE_FLUTTER_GALLERY
+ bool "flutter-gallery"
+ depends on BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
+ depends on BR2_PACKAGE_FLUTTER_ENGINE
+ select BR2_PACKAGE_HOST_FLUTTER_SDK_BIN
+ help
+ Flutter Gallery is a resource to help developers evaluate
+ and use Flutter. It is a collection of Material Design &
+ Cupertino widgets, behaviors, and vignettes implemented
+ with Flutter.
+
+ https://github.com/flutter/gallery
+
+comment "flutter-gallery needs flutter-engine"
+ depends on BR2_PACKAGE_HOST_FLUTTER_SDK_BIN_ARCH_SUPPORTS
+ depends on !BR2_PACKAGE_FLUTTER_ENGINE
diff --git a/package/flutter-gallery/flutter-gallery.hash b/package/flutter-gallery/flutter-gallery.hash
new file mode 100644
index 0000000000..aea1ed39be
--- /dev/null
+++ b/package/flutter-gallery/flutter-gallery.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256 14272aba90b7d26db33bac7b4692f0e3ed1a008286a08eaf2ea79abd478f23e9 flutter-gallery-2.10.2.tar.gz
+sha256 c731cf5a33db0e12647e0680ef0bc7839f99749404ac1ba4626cf7192065b3b0 LICENSE
diff --git a/package/flutter-gallery/flutter-gallery.mk b/package/flutter-gallery/flutter-gallery.mk
new file mode 100644
index 0000000000..e89fbb009d
--- /dev/null
+++ b/package/flutter-gallery/flutter-gallery.mk
@@ -0,0 +1,44 @@
+################################################################################
+#
+# flutter-gallery
+#
+################################################################################
+
+FLUTTER_GALLERY_VERSION = 2.10.2
+FLUTTER_GALLERY_SITE = $(call github,flutter,gallery,v$(FLUTTER_GALLERY_VERSION))
+FLUTTER_GALLERY_LICENSE = BSD-3-Clause
+FLUTTER_GALLERY_LICENSE_FILES = LICENSE
+FLUTTER_GALLERY_DEPENDENCIES = \
+ host-flutter-sdk-bin \
+ flutter-engine
+
+FLUTTER_GALLERY_INSTALL_DIR = $(TARGET_DIR)/usr/share/flutter/gallery/$(FLUTTER_ENGINE_RUNTIME_MODE)
+
+define FLUTTER_GALLERY_BUILD_CMDS
+ cd $(@D) && \
+ FLUTTER_RUNTIME_MODES=$(FLUTTER_ENGINE_RUNTIME_MODE) \
+ $(HOST_FLUTTER_SDK_BIN_FLUTTER) clean && \
+ $(HOST_FLUTTER_SDK_BIN_FLUTTER) packages get && \
+ $(HOST_FLUTTER_SDK_BIN_FLUTTER) build bundle && \
+ $(HOST_FLUTTER_SDK_BIN_DART_BIN) package:gallery/main.dart && \
+ $(HOST_FLUTTER_SDK_BIN_ENV) $(FLUTTER_ENGINE_GEN_SNAPSHOT) \
+ --deterministic \
+ --snapshot_kind=app-aot-elf \
+ --elf=libapp.so \
+ .dart_tool/flutter_build/*/app.dill
+endef
+
+define FLUTTER_GALLERY_INSTALL_TARGET_CMDS
+ mkdir -p $(FLUTTER_GALLERY_INSTALL_DIR)/{data,lib}
+ cp -dprf $(@D)/build/flutter_assets $(FLUTTER_GALLERY_INSTALL_DIR)/data/
+
+ $(INSTALL) -D -m 0755 $(@D)/libapp.so \
+ $(FLUTTER_GALLERY_INSTALL_DIR)/lib/libapp.so
+
+ ln -sf ../../../$(FLUTTER_ENGINE_RUNTIME_MODE)/data/icudtl.dat \
+ $(FLUTTER_GALLERY_INSTALL_DIR)/data/
+
+ ln -sf ../../../../../lib/libflutter_engine.so $(FLUTTER_GALLERY_INSTALL_DIR)/lib/
+endef
+
+$(eval $(generic-package))
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread* [Buildroot] [PATCH v9 7/7] support/testing/tests/package/test_flutter.py: new runtime test
2023-09-19 20:42 [Buildroot] [PATCH v9 1/7] package/python-httplib2: add host variant Adam Duskett
` (4 preceding siblings ...)
2023-09-19 20:42 ` [Buildroot] [PATCH v9 6/7] package/flutter-gallery: " Adam Duskett
@ 2023-09-19 20:42 ` Adam Duskett
2023-09-23 8:35 ` Yann E. MORIN
5 siblings, 1 reply; 13+ messages in thread
From: Adam Duskett @ 2023-09-19 20:42 UTC (permalink / raw)
To: buildroot
Cc: Adam Duskett, Asaf Kahlon, Thomas Petazzoni, Michael Trimarchi,
Angelo Compagnucci
This is a simple test that builds and runs the futter-gallery application and
checks if the service is active.
Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
---
v8 -> v9:
- Changed to aarch64 to avoid problems with older versions of qemu.
- Added BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
DEVELOPERS | 1 +
support/testing/tests/package/test_flutter.py | 56 +++++++++++++++++++
.../package/test_flutter/linux-vkms.fragment | 2 +
.../flutter-gallery.service | 1 +
.../systemd/system/flutter-gallery.service | 11 ++++
5 files changed, 71 insertions(+)
create mode 100644 support/testing/tests/package/test_flutter.py
create mode 100644 support/testing/tests/package/test_flutter/linux-vkms.fragment
create mode 120000 support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
create mode 100644 support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
diff --git a/DEVELOPERS b/DEVELOPERS
index 48a4ec776a..f46d83679a 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -37,6 +37,7 @@ F: package/flutter-engine/
F: package/flutter-gallery/
F: package/flutter-pi/
F: package/flutter-sdk-bin/
+F: support/testing/tests/package/test_flutter.py
N: Adam Heinrich <adam@adamh.cz>
F: package/jack1/
diff --git a/support/testing/tests/package/test_flutter.py b/support/testing/tests/package/test_flutter.py
new file mode 100644
index 0000000000..e17ed9f659
--- /dev/null
+++ b/support/testing/tests/package/test_flutter.py
@@ -0,0 +1,56 @@
+import os
+import time
+import infra.basetest
+
+
+class TestFlutter(infra.basetest.BRTest):
+ config = f"""
+ BR2_aarch64=y
+ BR2_TOOLCHAIN_EXTERNAL=y
+ BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
+ BR2_ROOTFS_OVERLAY="{infra.filepath("tests/package/test_flutter/overlay")}"
+ BR2_PER_PACKAGE_DIRECTORIES=y
+ BR2_INIT_SYSTEMD=y
+ BR2_LINUX_KERNEL=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+ BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.54"
+ BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+ BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
+ BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
+ BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{infra.filepath("tests/package/test_flutter/linux-vkms.fragment")}"
+ BR2_PACKAGE_LIBDRM=y
+ BR2_PACKAGE_MESA3D=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
+ BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
+ BR2_PACKAGE_MESA3D_OPENGL_ES=y
+ BR2_PACKAGE_FLUTTER_PI=y
+ BR2_PACKAGE_FLUTTER_PI_RAW_KEYBOARD_PLUGIN=y
+ BR2_PACKAGE_FLUTTER_PI_TEXT_INPUT_PLUGIN=y
+ BR2_PACKAGE_FLUTTER_GALLERY=y
+ BR2_PACKAGE_FLUTTER_ENGINE=y
+ BR2_TARGET_ROOTFS_EXT2=y
+ BR2_TARGET_ROOTFS_EXT2_4=y
+ BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
+
+ def test_run(self):
+ timeout = 35 * self.emulator.timeout_multiplier
+ img = os.path.join(self.builddir, "images", "rootfs.ext2")
+ kern = os.path.join(self.builddir, "images", "Image")
+ self.emulator.boot(
+ arch="aarch64",
+ kernel=kern,
+ kernel_cmdline=["root=/dev/vda console=ttyAMA0"],
+ options=["-M", "virt",
+ "-cpu", "cortex-a57",
+ "-m", "512M",
+ "-smp", "4",
+ "-vga", "std",
+ "-vnc", "none",
+ "-drive", f"file={img},if=virtio,format=raw"])
+ self.emulator.login()
+ cmd = "systemctl is-active flutter-gallery"
+ output, exit_code = self.emulator.run(cmd, 10)
+ self.assertEqual(exit_code, 0)
+ self.assertEqual(output[0], "active")
diff --git a/support/testing/tests/package/test_flutter/linux-vkms.fragment b/support/testing/tests/package/test_flutter/linux-vkms.fragment
new file mode 100644
index 0000000000..3fc7a5dded
--- /dev/null
+++ b/support/testing/tests/package/test_flutter/linux-vkms.fragment
@@ -0,0 +1,2 @@
+CONFIG_DEBUG_FS=y
+CONFIG_DRM_VKMS=y
diff --git a/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service b/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
new file mode 120000
index 0000000000..40993fb16c
--- /dev/null
+++ b/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
@@ -0,0 +1 @@
+../../../../usr/lib/systemd/system/flutter-gallery.service
\ No newline at end of file
diff --git a/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service b/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
new file mode 100644
index 0000000000..88a2bcbf0b
--- /dev/null
+++ b/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=flutter-gallery daemon
+After=dbus.service systemd-udevd.service
+
+[Service]
+ExecStart=/usr/bin/flutter-pi --release /usr/share/flutter/gallery/release/
+Restart=always
+KillMode=process
+
+[Install]
+WantedBy=multi-user.target
--
2.39.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH v9 7/7] support/testing/tests/package/test_flutter.py: new runtime test
2023-09-19 20:42 ` [Buildroot] [PATCH v9 7/7] support/testing/tests/package/test_flutter.py: new runtime test Adam Duskett
@ 2023-09-23 8:35 ` Yann E. MORIN
2023-09-23 8:47 ` Yann E. MORIN
2023-09-26 19:23 ` Yann E. MORIN
0 siblings, 2 replies; 13+ messages in thread
From: Yann E. MORIN @ 2023-09-23 8:35 UTC (permalink / raw)
To: Adam Duskett
Cc: Asaf Kahlon, Julien Olivain, Thomas Petazzoni, buildroot,
Michael Trimarchi, Angelo Compagnucci
Adam, All,
+Julien for his expertise in graphics in runtime tests
On 2023-09-19 14:42 -0600, Adam Duskett spake thusly:
> This is a simple test that builds and runs the futter-gallery application and
> checks if the service is active.
This runtime test does not demonstrate a worlking flutter stack, because
the application in fact does not work:
$ journalctl -u flutter-gallery
[...]
journalctl -u flutter-gallery --boot |cat
Sep 23 08:18:24 buildroot systemd[1]: Started flutter-gallery daemon.
Sep 23 08:18:24 buildroot flutter-pi[129]: [locales] Warning: The system has no configured locale. The default "C" locale may or may not be supported by the app.
Sep 23 08:18:24 buildroot flutter-pi[129]: MESA-LOADER: failed to open vkms: /usr/lib/dri/vkms_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
Sep 23 08:18:24 buildroot flutter-pi[129]: MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
Sep 23 08:18:28 buildroot flutter-pi[129]: xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Sep 23 08:18:28 buildroot flutter-pi[129]: keyboard.c: Could not create XKB context.
Sep 23 08:18:28 buildroot flutter-pi[129]: user_input.c: Could not initialize keyboard configuration. Flutter-pi will run without text/raw keyboard input.
Sep 23 08:18:28 buildroot flutter-pi[129]: egl_gbm_render_surface.c: Couldn't create GBM surface for rendering. gbm_surface_create_with_modifiers: Invalid argument
Sep 23 08:18:28 buildroot flutter-pi[129]: window.c: Couldn't create EGL GBM rendering surface.
Sep 23 08:18:28 buildroot systemd[1]: flutter-gallery.service: Main process exited, code=dumped, status=11/SEGV
Sep 23 08:18:28 buildroot systemd[1]: flutter-gallery.service: Failed with result 'core-dump'.
Sep 23 08:18:28 buildroot systemd[1]: flutter-gallery.service: Consumed 4.144s CPU time.
Sep 23 08:18:29 buildroot systemd[1]: flutter-gallery.service: Scheduled restart job, restart counter is at 1.
Sep 23 08:18:29 buildroot systemd[1]: Started flutter-gallery daemon.
Sep 23 08:18:29 buildroot flutter-pi[148]: [locales] Warning: The system has no configured locale. The default "C" locale may or may not be supported by the app.
Sep 23 08:18:29 buildroot flutter-pi[148]: MESA-LOADER: failed to open vkms: /usr/lib/dri/vkms_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
Sep 23 08:18:29 buildroot flutter-pi[148]: MESA-LOADER: failed to open zink: /usr/lib/dri/zink_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/dri, suffix _dri)
Sep 23 08:18:31 buildroot flutter-pi[148]: xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkb
Sep 23 08:18:31 buildroot flutter-pi[148]: keyboard.c: Could not create XKB context.
Sep 23 08:18:31 buildroot flutter-pi[148]: user_input.c: Could not initialize keyboard configuration. Flutter-pi will run without text/raw keyboard input.
Sep 23 08:18:31 buildroot flutter-pi[148]: egl_gbm_render_surface.c: Couldn't create GBM surface for rendering. gbm_surface_create_with_modifiers: Invalid argument
Sep 23 08:18:31 buildroot flutter-pi[148]: window.c: Couldn't create EGL GBM rendering surface.
Sep 23 08:18:31 buildroot systemd[1]: flutter-gallery.service: Main process exited, code=dumped, status=11/SEGV
Sep 23 08:18:31 buildroot systemd[1]: flutter-gallery.service: Failed with result 'core-dump'.
Sep 23 08:18:31 buildroot systemd[1]: flutter-gallery.service: Consumed 2.401s CPU time.
Sep 23 08:18:31 buildroot systemd[1]: flutter-gallery.service: Scheduled restart job, restart counter is at 2.
[...ad nauseam......]
So, a few things about this:
- "-vga std -vnc none" are not needed; whether specified or not has
no impact on the test. And indeed, this is now n aarch64 machine,
so not sure there's vga on that;
- the locales issues is not major, we don't care much for a test; the
keybioard issue should not be major either ("Flutter-pi will run
without text/raw keyboard input");
- the real issues I'm most afraid of, are the one about mesa failing
to load the proper drivers, and/or that it can't create an EGL GBM
surface; I think this is the real problem;
- in the console, I notice "vkms_vblank_simulate: vblank timer
overrun" bwing displayed quite a few times;
- you're pointing the gallery app to /usr/share/flutter/gallery/release/
but therat does not exist (what should it contain, btw?).
Can you look at that test, please?
Regards,
Yann E. MORIN.
> Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> ---
> v8 -> v9:
> - Changed to aarch64 to avoid problems with older versions of qemu.
> - Added BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
>
> DEVELOPERS | 1 +
> support/testing/tests/package/test_flutter.py | 56 +++++++++++++++++++
> .../package/test_flutter/linux-vkms.fragment | 2 +
> .../flutter-gallery.service | 1 +
> .../systemd/system/flutter-gallery.service | 11 ++++
> 5 files changed, 71 insertions(+)
> create mode 100644 support/testing/tests/package/test_flutter.py
> create mode 100644 support/testing/tests/package/test_flutter/linux-vkms.fragment
> create mode 120000 support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
> create mode 100644 support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 48a4ec776a..f46d83679a 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -37,6 +37,7 @@ F: package/flutter-engine/
> F: package/flutter-gallery/
> F: package/flutter-pi/
> F: package/flutter-sdk-bin/
> +F: support/testing/tests/package/test_flutter.py
>
> N: Adam Heinrich <adam@adamh.cz>
> F: package/jack1/
> diff --git a/support/testing/tests/package/test_flutter.py b/support/testing/tests/package/test_flutter.py
> new file mode 100644
> index 0000000000..e17ed9f659
> --- /dev/null
> +++ b/support/testing/tests/package/test_flutter.py
> @@ -0,0 +1,56 @@
> +import os
> +import time
> +import infra.basetest
> +
> +
> +class TestFlutter(infra.basetest.BRTest):
> + config = f"""
> + BR2_aarch64=y
> + BR2_TOOLCHAIN_EXTERNAL=y
> + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> + BR2_ROOTFS_OVERLAY="{infra.filepath("tests/package/test_flutter/overlay")}"
> + BR2_PER_PACKAGE_DIRECTORIES=y
> + BR2_INIT_SYSTEMD=y
> + BR2_LINUX_KERNEL=y
> + BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.54"
> + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> + BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
> + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
> + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{infra.filepath("tests/package/test_flutter/linux-vkms.fragment")}"
> + BR2_PACKAGE_LIBDRM=y
> + BR2_PACKAGE_MESA3D=y
> + BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
> + BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
> + BR2_PACKAGE_MESA3D_OPENGL_ES=y
> + BR2_PACKAGE_FLUTTER_PI=y
> + BR2_PACKAGE_FLUTTER_PI_RAW_KEYBOARD_PLUGIN=y
> + BR2_PACKAGE_FLUTTER_PI_TEXT_INPUT_PLUGIN=y
> + BR2_PACKAGE_FLUTTER_GALLERY=y
> + BR2_PACKAGE_FLUTTER_ENGINE=y
> + BR2_TARGET_ROOTFS_EXT2=y
> + BR2_TARGET_ROOTFS_EXT2_4=y
> + BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
> + # BR2_TARGET_ROOTFS_TAR is not set
> + """
> +
> + def test_run(self):
> + timeout = 35 * self.emulator.timeout_multiplier
> + img = os.path.join(self.builddir, "images", "rootfs.ext2")
> + kern = os.path.join(self.builddir, "images", "Image")
> + self.emulator.boot(
> + arch="aarch64",
> + kernel=kern,
> + kernel_cmdline=["root=/dev/vda console=ttyAMA0"],
> + options=["-M", "virt",
> + "-cpu", "cortex-a57",
> + "-m", "512M",
> + "-smp", "4",
> + "-vga", "std",
> + "-vnc", "none",
> + "-drive", f"file={img},if=virtio,format=raw"])
> + self.emulator.login()
> + cmd = "systemctl is-active flutter-gallery"
> + output, exit_code = self.emulator.run(cmd, 10)
> + self.assertEqual(exit_code, 0)
> + self.assertEqual(output[0], "active")
> diff --git a/support/testing/tests/package/test_flutter/linux-vkms.fragment b/support/testing/tests/package/test_flutter/linux-vkms.fragment
> new file mode 100644
> index 0000000000..3fc7a5dded
> --- /dev/null
> +++ b/support/testing/tests/package/test_flutter/linux-vkms.fragment
> @@ -0,0 +1,2 @@
> +CONFIG_DEBUG_FS=y
> +CONFIG_DRM_VKMS=y
> diff --git a/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service b/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
> new file mode 120000
> index 0000000000..40993fb16c
> --- /dev/null
> +++ b/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
> @@ -0,0 +1 @@
> +../../../../usr/lib/systemd/system/flutter-gallery.service
> \ No newline at end of file
> diff --git a/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service b/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
> new file mode 100644
> index 0000000000..88a2bcbf0b
> --- /dev/null
> +++ b/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
> @@ -0,0 +1,11 @@
> +[Unit]
> +Description=flutter-gallery daemon
> +After=dbus.service systemd-udevd.service
> +
> +[Service]
> +ExecStart=/usr/bin/flutter-pi --release /usr/share/flutter/gallery/release/
> +Restart=always
> +KillMode=process
> +
> +[Install]
> +WantedBy=multi-user.target
> --
> 2.39.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH v9 7/7] support/testing/tests/package/test_flutter.py: new runtime test
2023-09-23 8:35 ` Yann E. MORIN
@ 2023-09-23 8:47 ` Yann E. MORIN
2023-09-26 19:23 ` Yann E. MORIN
1 sibling, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2023-09-23 8:47 UTC (permalink / raw)
To: Adam Duskett
Cc: Asaf Kahlon, Julien Olivain, Thomas Petazzoni, buildroot,
Michael Trimarchi, Angelo Compagnucci
Adam, All,
On 2023-09-23 10:35 +0200, Yann E. MORIN spake thusly:
> On 2023-09-19 14:42 -0600, Adam Duskett spake thusly:
> > This is a simple test that builds and runs the futter-gallery application and
> > checks if the service is active.
> This runtime test does not demonstrate a worlking flutter stack, because
> the application in fact does not work:
[--SNIP--]
> Can you look at that test, please?
As discussed on IRC, I did quite a few substantial changes in the other
patches of the series, so I've pushed them to a branch so you can grab
them and rebase on those:
https://gitlab.com/ymorin/buildroot/-/commits/yem/flutter/
Please grab those. Once the runtime test works, I can apply the whole
series.
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH v9 7/7] support/testing/tests/package/test_flutter.py: new runtime test
2023-09-23 8:35 ` Yann E. MORIN
2023-09-23 8:47 ` Yann E. MORIN
@ 2023-09-26 19:23 ` Yann E. MORIN
2023-09-29 22:22 ` Yann E. MORIN
1 sibling, 1 reply; 13+ messages in thread
From: Yann E. MORIN @ 2023-09-26 19:23 UTC (permalink / raw)
To: Adam Duskett
Cc: Asaf Kahlon, Julien Olivain, Thomas Petazzoni, buildroot,
Michael Trimarchi, Angelo Compagnucci
Adam, All,
On 2023-09-23 10:35 +0200, Yann E. MORIN spake thusly:
> On 2023-09-19 14:42 -0600, Adam Duskett spake thusly:
> > This is a simple test that builds and runs the futter-gallery application and
> > checks if the service is active.
> This runtime test does not demonstrate a worlking flutter stack, because
> the application in fact does not work:
Note: as discussed on IRC: the above was a bit rough, sorry.
I understand that you did manage to get a flutter stack working, and
this *is* impressive!
What I meant is that this runtime test does not demonstrate that,
unfortunately.
The CI/CD pipelines are running in containers that do not have access to
a GPU. Hence a runtime test that uses GPU passthrough as you initially
provided is not going to work. That is why I have been insistent on
doing a headless runtime test.
We do already have working runtime tests for graphical packages, like
the weston test. What those tests do, is run the graphical application
to test, and check that the framebuffer changes (by comparing the CRC
provided by the kernel, as we don't care about what is rendered, just
that "something" is rendered). This is what I would have expected for
the flutter test too.
[--SNIP--]
> So, a few things about this:
> - the real issues I'm most afraid of, are the one about mesa failing
> to load the proper drivers,
So I had a deeper look, and ran the weston test by hand (I had to fix it
while at it [0]), and noticed that weston whines about the exact same
drivers, yet works. So the issue about missing zynq and vkms is benign.
> [snip] and/or that it can't create an EGL GBM
> surface; I think this is the real problem;
So, the remaining issue is that flutter-pi can't t create a GBM surface.
This is very very similar to an old upstream issue, which got fixed a
year ago:
https://github.com/ardera/flutter-pi/issues/269
https://github.com/ardera/flutter-pi/pull/270
However, upstream did a big overhaul of the code recently, and the fix
got lost in the rewrite. Here's what I now came up with (patch against
flutter-pi):
From 856f9849763535d62ed01b538ba23905875c93f4 Mon Sep 17 00:00:00 2001
From: "Yann E. MORIN" <yann.morin.1998@free.fr>
Date: Tue, 26 Sep 2023 20:31:17 +0200
Subject: [PATCH] src/egl_gbm_render_surface: properly fallback to surface with
no modifier
In 869fa7fcfbeb, we added a fallback to be able to create an EGL sruface
when the driver do not support modifiers, like the llvmpipe software
renderer (or like some proprietary drivers, like the MALI ones), as
reported in #269 [0].
However, in c6537673c9b6, there was a big overhaul of renderer
infrastructure. That commit lost the with-modifiers code path and only
kept the without-modifiers fallback one (i.e. it only kept the call to
gbm_surface_create(), not to gbm_surface_create_with_modifiers()).
Then in b0d09f5032a4, the with-modifiers code path was re-instated, but
in a way that made it exclusive with the without-modifiers one. That is,
the without-modifiers code path was not a fallback to when the other
failed.
Re-instate the fallback mechanism as initially implemented.
[0] https://github.com/ardera/flutter-pi/issues/269
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
---
src/egl_gbm_render_surface.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/egl_gbm_render_surface.c b/src/egl_gbm_render_surface.c
index ce9e5e7..8a58667 100644
--- a/src/egl_gbm_render_surface.c
+++ b/src/egl_gbm_render_surface.c
@@ -146,6 +146,7 @@ static int egl_gbm_render_surface_init(
}
#endif
+ gbm_surface = NULL;
if (allowed_modifiers != NULL) {
gbm_surface = gbm_surface_create_with_modifiers(
gbm_device,
@@ -158,9 +159,10 @@ static int egl_gbm_render_surface_init(
if (gbm_surface == NULL) {
ok = errno;
LOG_ERROR("Couldn't create GBM surface for rendering. gbm_surface_create_with_modifiers: %s\n", strerror(ok));
- return ok;
+ LOG_ERROR("Will retry without modifiers\n");
}
- } else {
+ }
+ if (gbm_surface == NULL) {
gbm_surface = gbm_surface_create(
gbm_device,
size.x,
--
2.25.1
With this patch, the application no longer coredumps, and keeps running.
As for the CRC of the framebuffer: without flutter-pi running, the value
is 0x4c4126bf. Starting the flutter application (and waiting quite a
bit), it suddenly changes to an arbitrary value! Stopping flutter-pi,
the CRC reverts to 0x4c4126bf. Starting again, new value! Note that it
can be like 10s or more before the CRC changes at application start.
So, to me, that means the application is now running! I have no idea what
is supposed to be displayed, but something is being rendered, and that's
all that matters!
Care to integrate that patch in your series, test in your actual setup,
see if it's possible to send it upstream, update the runtime test to
check on the CRC (instead of checkign the systemd unit status), and
respin the series, please?
(I'm on the move the next few days, but I'll be able to dedicate time
during the WE).
> - you're pointing the gallery app to /usr/share/flutter/gallery/release/
> but therat does not exist (what should it contain, btw?).
(blark typoes of mine). I must have messed things with another test,
because /usr/share/flutter/gallery/release/ *is* populated as expected.
[0] https://patchwork.ozlabs.org/project/buildroot/patch/20230926154703.160448-1-yann.morin.1998@free.fr/
Regards,
Yann E. MORIN.
> Can you look at that test, please?
>
> Regards,
> Yann E. MORIN.
>
> > Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
> > ---
> > v8 -> v9:
> > - Changed to aarch64 to avoid problems with older versions of qemu.
> > - Added BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF
> >
> > DEVELOPERS | 1 +
> > support/testing/tests/package/test_flutter.py | 56 +++++++++++++++++++
> > .../package/test_flutter/linux-vkms.fragment | 2 +
> > .../flutter-gallery.service | 1 +
> > .../systemd/system/flutter-gallery.service | 11 ++++
> > 5 files changed, 71 insertions(+)
> > create mode 100644 support/testing/tests/package/test_flutter.py
> > create mode 100644 support/testing/tests/package/test_flutter/linux-vkms.fragment
> > create mode 120000 support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
> > create mode 100644 support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
> >
> > diff --git a/DEVELOPERS b/DEVELOPERS
> > index 48a4ec776a..f46d83679a 100644
> > --- a/DEVELOPERS
> > +++ b/DEVELOPERS
> > @@ -37,6 +37,7 @@ F: package/flutter-engine/
> > F: package/flutter-gallery/
> > F: package/flutter-pi/
> > F: package/flutter-sdk-bin/
> > +F: support/testing/tests/package/test_flutter.py
> >
> > N: Adam Heinrich <adam@adamh.cz>
> > F: package/jack1/
> > diff --git a/support/testing/tests/package/test_flutter.py b/support/testing/tests/package/test_flutter.py
> > new file mode 100644
> > index 0000000000..e17ed9f659
> > --- /dev/null
> > +++ b/support/testing/tests/package/test_flutter.py
> > @@ -0,0 +1,56 @@
> > +import os
> > +import time
> > +import infra.basetest
> > +
> > +
> > +class TestFlutter(infra.basetest.BRTest):
> > + config = f"""
> > + BR2_aarch64=y
> > + BR2_TOOLCHAIN_EXTERNAL=y
> > + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y
> > + BR2_ROOTFS_OVERLAY="{infra.filepath("tests/package/test_flutter/overlay")}"
> > + BR2_PER_PACKAGE_DIRECTORIES=y
> > + BR2_INIT_SYSTEMD=y
> > + BR2_LINUX_KERNEL=y
> > + BR2_LINUX_KERNEL_CUSTOM_VERSION=y
> > + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.54"
> > + BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
> > + BR2_LINUX_KERNEL_NEEDS_HOST_LIBELF=y
> > + BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/aarch64-virt/linux.config"
> > + BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="{infra.filepath("tests/package/test_flutter/linux-vkms.fragment")}"
> > + BR2_PACKAGE_LIBDRM=y
> > + BR2_PACKAGE_MESA3D=y
> > + BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y
> > + BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_VIRGL=y
> > + BR2_PACKAGE_MESA3D_OPENGL_ES=y
> > + BR2_PACKAGE_FLUTTER_PI=y
> > + BR2_PACKAGE_FLUTTER_PI_RAW_KEYBOARD_PLUGIN=y
> > + BR2_PACKAGE_FLUTTER_PI_TEXT_INPUT_PLUGIN=y
> > + BR2_PACKAGE_FLUTTER_GALLERY=y
> > + BR2_PACKAGE_FLUTTER_ENGINE=y
> > + BR2_TARGET_ROOTFS_EXT2=y
> > + BR2_TARGET_ROOTFS_EXT2_4=y
> > + BR2_TARGET_ROOTFS_EXT2_SIZE="512M"
> > + # BR2_TARGET_ROOTFS_TAR is not set
> > + """
> > +
> > + def test_run(self):
> > + timeout = 35 * self.emulator.timeout_multiplier
> > + img = os.path.join(self.builddir, "images", "rootfs.ext2")
> > + kern = os.path.join(self.builddir, "images", "Image")
> > + self.emulator.boot(
> > + arch="aarch64",
> > + kernel=kern,
> > + kernel_cmdline=["root=/dev/vda console=ttyAMA0"],
> > + options=["-M", "virt",
> > + "-cpu", "cortex-a57",
> > + "-m", "512M",
> > + "-smp", "4",
> > + "-vga", "std",
> > + "-vnc", "none",
> > + "-drive", f"file={img},if=virtio,format=raw"])
> > + self.emulator.login()
> > + cmd = "systemctl is-active flutter-gallery"
> > + output, exit_code = self.emulator.run(cmd, 10)
> > + self.assertEqual(exit_code, 0)
> > + self.assertEqual(output[0], "active")
> > diff --git a/support/testing/tests/package/test_flutter/linux-vkms.fragment b/support/testing/tests/package/test_flutter/linux-vkms.fragment
> > new file mode 100644
> > index 0000000000..3fc7a5dded
> > --- /dev/null
> > +++ b/support/testing/tests/package/test_flutter/linux-vkms.fragment
> > @@ -0,0 +1,2 @@
> > +CONFIG_DEBUG_FS=y
> > +CONFIG_DRM_VKMS=y
> > diff --git a/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service b/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
> > new file mode 120000
> > index 0000000000..40993fb16c
> > --- /dev/null
> > +++ b/support/testing/tests/package/test_flutter/overlay/etc/systemd/system/multi-user.target.wants/flutter-gallery.service
> > @@ -0,0 +1 @@
> > +../../../../usr/lib/systemd/system/flutter-gallery.service
> > \ No newline at end of file
> > diff --git a/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service b/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
> > new file mode 100644
> > index 0000000000..88a2bcbf0b
> > --- /dev/null
> > +++ b/support/testing/tests/package/test_flutter/overlay/usr/lib/systemd/system/flutter-gallery.service
> > @@ -0,0 +1,11 @@
> > +[Unit]
> > +Description=flutter-gallery daemon
> > +After=dbus.service systemd-udevd.service
> > +
> > +[Service]
> > +ExecStart=/usr/bin/flutter-pi --release /usr/share/flutter/gallery/release/
> > +Restart=always
> > +KillMode=process
> > +
> > +[Install]
> > +WantedBy=multi-user.target
> > --
> > 2.39.2
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot@buildroot.org
> > https://lists.buildroot.org/mailman/listinfo/buildroot
>
> --
> .-----------------.--------------------.------------------.--------------------.
> | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
> | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
> | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
> | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
> '------------------------------^-------^------------------^--------------------'
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread* Re: [Buildroot] [PATCH v9 7/7] support/testing/tests/package/test_flutter.py: new runtime test
2023-09-26 19:23 ` Yann E. MORIN
@ 2023-09-29 22:22 ` Yann E. MORIN
0 siblings, 0 replies; 13+ messages in thread
From: Yann E. MORIN @ 2023-09-29 22:22 UTC (permalink / raw)
To: Adam Duskett
Cc: Asaf Kahlon, Julien Olivain, Thomas Petazzoni, buildroot,
Michael Trimarchi, Angelo Compagnucci
Adam, All
On 2023-09-26 21:23 +0200, Yann E. MORIN spake thusly:
> On 2023-09-23 10:35 +0200, Yann E. MORIN spake thusly:
> > On 2023-09-19 14:42 -0600, Adam Duskett spake thusly:
> > > This is a simple test that builds and runs the futter-gallery application and
> > > checks if the service is active.
So, we've discussed this tonight, and we decided to just apply the
series as I had reworked it, including the flutter-pi patch, that I've
submitted upstream:
https://github.com/ardera/flutter-pi/pull/367
It would still be nice if you could follow-up on that and check that it
does not break in your use-case (or whether you have a better solution).
Thank you a lot for working on this, we just now need more flutter-based
applications! :-)
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 13+ messages in thread