* [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages
@ 2023-08-08 0:35 Adam Duskett
2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 1/3] package/python-httplib2: add host variant Adam Duskett
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Adam Duskett @ 2023-08-08 0:35 UTC (permalink / raw)
To: buildroot
Cc: Adam Duskett, Asaf Kahlon, Thomas Petazzoni, Michael Trimarchi,
Angelo Compagnucci
Preface: Thank you for all the help, thoughts and insight for this initial
RFC of the flutter-engine library. There are many other flutter packages that
need to be ported, but this is the largest hurdle to overcome.
There are many issues with the flutter-engine 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 repository 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 directory enabled and disabled
- x86_64, arm64
Adam Duskett (3):
package/python-httplib2: add host variant
package/depot-tools: new package
package/flutter-engine: new package
DEVELOPERS | 4 +
package/Config.in | 1 +
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 | 30 +++
.../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 | 34 +++
package/flutter-engine/Config.in | 60 +++++
package/flutter-engine/dot-gclient | 16 ++
package/flutter-engine/flutter-engine.mk | 239 ++++++++++++++++++
package/flutter-engine/gen-tarball | 108 ++++++++
package/python-httplib2/python-httplib2.mk | 1 +
15 files changed, 612 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
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
--
Changes v1 -> v2:
- Remove unecessary patch (We aren't using ninjalog)
- Formatting cleanup [Yann]
- Remove uncessary environment variables for gclient [Yann]
- Use the flutter-engine provided clang.
- Remove 0003-disable-undefined-version.patch
- Add 0003-fix-toolchain-paths.patch
- Fix signed-off-by lines in the patches [Yann]
- Remove "Runtime mode" option in favor of checking BR2_ENABLE_RUNTIME_DEBUG [Yann]
- Use positive logic in flutter-engine.mk [Yann]
- Add comments when --disable-${option} doesn't exist. [Yann]
- Remove unecessary subshells in flutter-engine.mk [Yann]
- Rename flutter-engine/gclient to flutter-engine/dot-gclient [Yann]
- Create flutter-engine/gen-tarball to generate the flutter-engine tarball. [Yann]
- Remove finding and copying crtbeginS.o crtendS.o libgcc.a as it's
unecessary when using the flutter-engine provided clang.
- FLUTTER_ENGINE_INSTALL_STAGING_FILES -> FLUTTER_ENGINE_INSTALL_FILES [Yann]
- Reword comments at the top of flutter-engine.mk for clarity.
2.41.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 9+ messages in thread* [Buildroot] [PATCH/next vRFCv2 1/3] package/python-httplib2: add host variant 2023-08-08 0:35 [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages Adam Duskett @ 2023-08-08 0:35 ` Adam Duskett 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 2/3] package/depot-tools: new package Adam Duskett ` (2 subsequent siblings) 3 siblings, 0 replies; 9+ messages in thread From: Adam Duskett @ 2023-08-08 0:35 UTC (permalink / raw) To: buildroot Cc: Adam Duskett, Asaf Kahlon, Thomas Petazzoni, Michael Trimarchi, Angelo Compagnucci This is needed for the host-depot-tools package. Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> --- package/python-httplib2/python-httplib2.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/package/python-httplib2/python-httplib2.mk b/package/python-httplib2/python-httplib2.mk index 1093ecab39..2f4eb98356 100644 --- a/package/python-httplib2/python-httplib2.mk +++ b/package/python-httplib2/python-httplib2.mk @@ -14,3 +14,4 @@ PYTHON_HTTPLIB2_CPE_ID_VENDOR = httplib2_project PYTHON_HTTPLIB2_CPE_ID_PRODUCT = httplib2 $(eval $(python-package)) +$(eval $(host-python-package)) -- 2.41.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next vRFCv2 2/3] package/depot-tools: new package 2023-08-08 0:35 [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages Adam Duskett 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 1/3] package/python-httplib2: add host variant Adam Duskett @ 2023-08-08 0:35 ` Adam Duskett 2023-08-08 17:33 ` Thomas Petazzoni via buildroot 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: " Adam Duskett 2023-08-08 19:37 ` [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages Thomas Petazzoni via buildroot 3 siblings, 1 reply; 9+ messages in thread From: Adam Duskett @ 2023-08-08 0:35 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> --- Changes v1 -> v2" - Remove unecessary patch (We aren't using ninjalog) - Formatting cleanup [Yann] - Remove uncessary environment variables for gclient [Yann] 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 | 30 ++++++++++++++++++++++++++++ 5 files changed, 47 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 9915143a04..2093ad857f 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -26,6 +26,9 @@ # infrastructure, and will be CC'ed on all patches that add or # modify packages that use this infrastructure. +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 aa1f15e3ac..8d91f4a888 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..95b7fb84ac --- /dev/null +++ b/package/depot-tools/depot-tools.mk @@ -0,0 +1,30 @@ +################################################################################ +# +# 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 + +# Helper wrapper to make using gclient easier. +DEPOT_TOOLS_GCLIENT=\ + PATH=$(BR_PATH):$(HOST_DIR)/share/depot_tools \ + DEPOT_TOOLS_UPDATE=0 \ + $(HOST_DIR)/share/depot_tools/gclient.py + +$(eval $(host-generic-package)) -- 2.41.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH/next vRFCv2 2/3] package/depot-tools: new package 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 2/3] package/depot-tools: new package Adam Duskett @ 2023-08-08 17:33 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 9+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-08-08 17:33 UTC (permalink / raw) To: Adam Duskett Cc: Angelo Compagnucci, Michael Trimarchi, Asaf Kahlon, buildroot On Mon, 7 Aug 2023 18:35:26 -0600 Adam Duskett <adam.duskett@amarulasolutions.com> wrote: > +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 I was a bit surprised, because that doesn't match the dependencies in the Config.in.host, but that's normal because not all host packages have Config.in options. > +define HOST_DEPOT_TOOLS_INSTALL_CMDS > + mkdir -p $(HOST_DIR)/share/depot_tools > + cp -dprf $(@D)/* $(HOST_DIR)/share/depot_tools/ I looked at whether there was a nicer way to install that. But in fact, it's just a big mess of random tools, so OK installing to some random folder in $(HOST_DIR)/share is probably the "right" thing. > +# Helper wrapper to make using gclient easier. > +DEPOT_TOOLS_GCLIENT=\ Minor nit: spaces around = sign. > + PATH=$(BR_PATH):$(HOST_DIR)/share/depot_tools \ > + DEPOT_TOOLS_UPDATE=0 \ > + $(HOST_DIR)/share/depot_tools/gclient.py Otherwise, looks good to me. Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
* [Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: new package 2023-08-08 0:35 [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages Adam Duskett 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 1/3] package/python-httplib2: add host variant Adam Duskett 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 2/3] package/depot-tools: new package Adam Duskett @ 2023-08-08 0:35 ` Adam Duskett 2023-08-08 17:56 ` Thomas Petazzoni via buildroot 2023-08-08 19:37 ` [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages Thomas Petazzoni via buildroot 3 siblings, 1 reply; 9+ messages in thread From: Adam Duskett @ 2023-08-08 0:35 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 directory enabled and disabled - x86_64, arm64 Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com> --- Changes v1 -> v2: - Use the flutter-engine provided clang. - Remove 0003-disable-undefined-version.patch - Add 0003-fix-toolchain-paths.patch - Fix signed-off-by lines in the patches [Yann] - Remove "Runtime mode" option in favor of checking BR2_ENABLE_RUNTIME_DEBUG [Yann] - Use positive logic in flutter-engine.mk [Yann] - Add comments when --disable-${option} doesn't exist. [Yann] - Remove unecessary subshells in flutter-engine.mk [Yann] - Rename flutter-engine/gclient to flutter-engine/dot-gclient [Yann] - Create flutter-engine/gen-tarball to generate the flutter-engine tarball. [Yann] - Remove finding and copying crtbeginS.o crtendS.o libgcc.a as it's unecessary when using the flutter-engine provided clang. - FLUTTER_ENGINE_INSTALL_STAGING_FILES -> FLUTTER_ENGINE_INSTALL_FILES [Yann] - Reword comments at the top of flutter-engine.mk for clarity. 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 | 34 +++ package/flutter-engine/Config.in | 60 +++++ package/flutter-engine/dot-gclient | 16 ++ package/flutter-engine/flutter-engine.mk | 239 ++++++++++++++++++ package/flutter-engine/gen-tarball | 108 ++++++++ 10 files changed, 564 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 2093ad857f..126a3e95cc 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -28,6 +28,7 @@ N: Adam Duskett <adam.duskett@amarulasolutions.com> F: package/depot-tools +F: package/flutter-engine N: Adam Heinrich <adam@adamh.cz> F: package/jack1/ diff --git a/package/Config.in b/package/Config.in index e12ee34e9f..12f147a55d 100644 --- a/package/Config.in +++ b/package/Config.in @@ -344,6 +344,7 @@ comment "Graphic libraries" source "package/fbset/Config.in" source "package/fbterm/Config.in" source "package/fbv/Config.in" + source "package/flutter-engine/Config.in" source "package/freerdp/Config.in" source "package/graphicsmagick/Config.in" source "package/imagemagick/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..94da49fdf8 --- /dev/null +++ b/package/flutter-engine/0004-pkg-config.py-do-not-prepend-sysroot-path.patch @@ -0,0 +1,34 @@ +From 51e8fed854fd9d373bb9b20d7ed8e7cf6ef12312 Mon Sep 17 00:00:00 2001 +From: Adam Duskett <aduskett@gmail.com> +Date: Wed, 19 Jul 2023 11:48:59 -0700 +Subject: [PATCH] pkg-config.py: do not prepend sysroot path + +The pkg-config script provided by Buildroot already includes the sysroot +path, causing the pkg-config.py script to double prepend the sysroot path. + +IE: output/host/.../sysroot/output/host/.../sysroot + +Upstream: Buildroot specific +Signed-off-by: Adam Duskett <aduskett@gmail.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..ba59e1c8ac --- /dev/null +++ b/package/flutter-engine/Config.in @@ -0,0 +1,60 @@ +config BR2_PACKAGE_FLUTTER_ENGINE + bool "flutter-engine" + # Flutter includes a patched copy of clang which is mandatory to use for + # compiling. However, we should still depend on LLVM_ARCH_SUPPORTS as it + # gives a complete list of supported clang architectures. + depends on BR2_PACKAGE_LLVM_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_HOST_DEPOT_TOOLS + select BR2_PACKAGE_FREETYPE + 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 + +if BR2_PACKAGE_FLUTTER_ENGINE + +config BR2_PACKAGE_FLUTTER_ENGINE_ARTIFACTS + bool "build the development artifacts" + help + Build the development artifacts used for compiling + flutter applications. This significantly increases the time + to compile. + +endif #if BR2_PACKAGE_FLUTTER_ENGINE + +comment "flutter-engine needs an OpenGL backend" + 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_LLVM_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_LLVM_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..168e9a368d --- /dev/null +++ b/package/flutter-engine/dot-gclient @@ -0,0 +1,16 @@ +# 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 + }, + "custom_deps": { + "src/third_party/dart/third_party/pkg/tools": + "https://dart.googlesource.com/tools.git@unified_analytics-v1.1.0" + } +}] diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk new file mode 100644 index 0000000000..b5b99c4cad --- /dev/null +++ b/package/flutter-engine/flutter-engine.mk @@ -0,0 +1,239 @@ +################################################################################ +# +# 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. +# - Run mk_tar_gz to create a tarball. +# - Copy the tarball to the $(FLUTTER_ENGINE_DL_DIR) directory to create a +# tarball. +# +# 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.10.6 + +# 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 +ifeq ($(BR2_i386),y) +FLUTTER_ENGINE_TARGET_ARCH = x86 +FLUTTER_ENGINE_TARGET_TRIPPLE = x86-linux +else ifeq ($(BR2_x86_64),y) +FLUTTER_ENGINE_TARGET_ARCH = x64 +FLUTTER_ENGINE_TARGET_TRIPPLE = x86_64-linux +else ifeq ($(BR2_arm)$(BR2_armeb),y) +FLUTTER_ENGINE_TARGET_ARCH = arm +FLUTTER_ENGINE_TARGET_TRIPPLE = arm-linux +else ifeq ($(BR2_aarch64),y) +FLUTTER_ENGINE_TARGET_ARCH = arm64 +FLUTTER_ENGINE_TARGET_TRIPPLE = aarch64-linux +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 \ + libflutter_linux_gtk.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 \ + --depot-tools $(HOST_DIR)/share/depot_tools \ + --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 \ + --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 + +ifeq ($(BR2_STRIP_strip),y) +FLUTTER_ENGINE_CONF_OPTS += --stripped +else +FLUTTER_ENGINE_CONF_OPTS += --no-stripped +endif + +ifeq ($(BR2_PACKAGE_FLUTTER_ENGINE_ARTIFACTS),y) +FLUTTER_ENGINE_CONF_OPTS += --build-engine-artifacts +else +FLUTTER_ENGINE_CONF_OPTS += --no-build-engine-artifacts +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 +else +FLUTTER_ENGINE_CONF_OPTS += --disable-desktop-embeddings +endif + +ifeq ($(BR2_PACKAGE_MESA3D),y) +FLUTTER_ENGINE_DEPENDENCIES += mesa3d +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 $(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 + +define FLUTTER_ENGINE_INSTALL_STAGING_CMDS + $(foreach i,$(FLUTTER_ENGINE_INSTALL_FILES), + $(Q)if [ -e $(FLUTTER_ENGINE_BUILD_DIR)/$(i) ]; then \ + $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/$(i) \ + $(STAGING_DIR)/usr/lib/$(i); \ + fi \ + ) + $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/flutter_embedder.h \ + $(STAGING_DIR)/usr/include/flutter_embedder.h +endef + +define FLUTTER_ENGINE_INSTALL_TARGET_CMDS + $(foreach i,$(FLUTTER_ENGINE_INSTALL_FILES), + $(Q)if [ -e $(FLUTTER_ENGINE_BUILD_DIR)/$(i) ]; then \ + $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/$(i) \ + $(TARGET_DIR)/usr/lib/$(i); \ + fi \ + ) +endef + +$(eval $(generic-package)) diff --git a/package/flutter-engine/gen-tarball b/package/flutter-engine/gen-tarball new file mode 100755 index 0000000000..572c055bea --- /dev/null +++ b/package/flutter-engine/gen-tarball @@ -0,0 +1,108 @@ +#!/usr/bin/env bash +# Call gclient and generate a flutter-engine source tarball if one does not +# already exist. +# +# Author: Adam Duskett <adam.duskett@amarulasolutions.com> +set -eu + +DL_DIR= +DOT_GCLIENT= +JOBS= +SCRATCH_DIR= +TARBALL= +VERSION= + +# shellcheck disable=SC1091 +. ./support/download/helpers + +# 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:,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_DIR=$(dirname "${2}") + TARBALL="${2}" + shift 2 + ;; + (-v|--version) + VERSION="${2}" + 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 +} + +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" + cd "${SCRATCH_DIR}" + "${gclient}" \ + sync \ + --delete_unversioned_trees \ + --no-history \ + --reset \ + --shallow \ + -j"${JOBS}" +} + +gen_tarball(){ + message "Generating tarball" + mkdir -p "${DL_DIR}" + mk_tar_gz \ + "${SCRATCH_DIR}"/src \ + flutter-"${VERSION}" \ + "$(git -C "${SCRATCH_DIR}"/src log -1 --pretty=format:%ci)" \ + "${TARBALL}" + rm -rf "${SCRATCH_DIR}" +} + +main() { + parse_opts "${@}" + if [ ! -e "${TARBALL}" ]; then + copy_dot_gclient + run_gclient + gen_tarball + fi +} + +main "${@}" -- 2.41.0 _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: new package 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: " Adam Duskett @ 2023-08-08 17:56 ` Thomas Petazzoni via buildroot 2023-08-09 20:22 ` Yann E. MORIN 0 siblings, 1 reply; 9+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-08-08 17:56 UTC (permalink / raw) To: Adam Duskett Cc: Angelo Compagnucci, Michael Trimarchi, Asaf Kahlon, buildroot Hello Adam, On Mon, 7 Aug 2023 18:35:27 -0600 Adam Duskett <adam.duskett@amarulasolutions.com> wrote: > I have asked the flutter project to release full tarballs suitable for > compiling here: https://github.com/flutter/flutter/issues/130734 Thanks for having started this conversation with upstream, very good. > N: Adam Duskett <adam.duskett@amarulasolutions.com> > F: package/depot-tools > +F: package/flutter-engine Missed that minor nit on the depot-tools patch, but applicable here as well: directory paths in DEVELOPERS end with a final slash, i.e package/depot-tools/. > 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..94da49fdf8 > --- /dev/null > +++ b/package/flutter-engine/0004-pkg-config.py-do-not-prepend-sysroot-path.patch > @@ -0,0 +1,34 @@ > +From 51e8fed854fd9d373bb9b20d7ed8e7cf6ef12312 Mon Sep 17 00:00:00 2001 > +From: Adam Duskett <aduskett@gmail.com> > +Date: Wed, 19 Jul 2023 11:48:59 -0700 > +Subject: [PATCH] pkg-config.py: do not prepend sysroot path > + > +The pkg-config script provided by Buildroot already includes the sysroot > +path, causing the pkg-config.py script to double prepend the sysroot path. > + > +IE: output/host/.../sysroot/output/host/.../sysroot > + > +Upstream: Buildroot specific > +Signed-off-by: Adam Duskett <aduskett@gmail.com> Actually, I don't see how this is Buildroot specific. We simply use the standard PKG_CONFIG_SYSROOT_DIR variable. So it's what their pkg-config.py script is doing that doesn't make sense: they shouldn't prepend the sysroot themselves, but let pkg-config obey to the PKG_CONFIG_SYSROOT_DIR variable. Note: I'm not going to block the merging on this. But perhaps this is something to report upstream. > diff --git a/package/flutter-engine/Config.in b/package/flutter-engine/Config.in > new file mode 100644 > index 0000000000..ba59e1c8ac > --- /dev/null > +++ b/package/flutter-engine/Config.in > @@ -0,0 +1,60 @@ > +config BR2_PACKAGE_FLUTTER_ENGINE > + bool "flutter-engine" > + # Flutter includes a patched copy of clang which is mandatory to use for > + # compiling. However, we should still depend on LLVM_ARCH_SUPPORTS as it > + # gives a complete list of supported clang architectures. > + depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS One thing that bothers me a little bit here is that there is nothing that guarantees us the clang copy in flutter-engine is in sync with the copy in flutter-engine. Therefore, we might update package/llvm-project/llvm to a newer version, which supports a new CPU architecture, update BR2_PACKAGE_LLVM_ARCH_SUPPORTS to include the newer architecture... but the copy in flutter-engine is older and doesn't (yet) include that new CPU architecture. > + 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 We need the whole world! \o/ > + depends on BR2_PACKAGE_HAS_LIBGL || BR2_PACKAGE_HAS_LIBGLES > + select BR2_PACKAGE_HOST_DEPOT_TOOLS > + select BR2_PACKAGE_FREETYPE Minor nit: alphabetic ordering? > +if BR2_PACKAGE_FLUTTER_ENGINE > + > +config BR2_PACKAGE_FLUTTER_ENGINE_ARTIFACTS > + bool "build the development artifacts" > + help > + Build the development artifacts used for compiling > + flutter applications. This significantly increases the time > + to compile. Could you clarify what those artifacts are? I don't really care about "compiling flutter applications" on the target, I want to do that on the host. > +endif #if BR2_PACKAGE_FLUTTER_ENGINE > + > +comment "flutter-engine needs an OpenGL backend" ^^^ an OpenGL or OpenGLES depends on BR2_PACKAGE_LLVM_ARCH_SUPPORTS needed here as well to not show the comment when not relevant. > + depends on !BR2_PACKAGE_HAS_LIBGL && !BR2_PACKAGE_HAS_LIBGLES > diff --git a/package/flutter-engine/flutter-engine.mk b/package/flutter-engine/flutter-engine.mk > new file mode 100644 > index 0000000000..b5b99c4cad > --- /dev/null > +++ b/package/flutter-engine/flutter-engine.mk > @@ -0,0 +1,239 @@ > +################################################################################ > +# > +# 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. > +# - Run mk_tar_gz to create a tarball. > +# - Copy the tarball to the $(FLUTTER_ENGINE_DL_DIR) directory to create a > +# tarball. > +# > +# 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.10.6 > + > +# 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 > +ifeq ($(BR2_i386),y) > +FLUTTER_ENGINE_TARGET_ARCH = x86 > +FLUTTER_ENGINE_TARGET_TRIPPLE = x86-linux > +else ifeq ($(BR2_x86_64),y) > +FLUTTER_ENGINE_TARGET_ARCH = x64 > +FLUTTER_ENGINE_TARGET_TRIPPLE = x86_64-linux > +else ifeq ($(BR2_arm)$(BR2_armeb),y) > +FLUTTER_ENGINE_TARGET_ARCH = arm > +FLUTTER_ENGINE_TARGET_TRIPPLE = arm-linux > +else ifeq ($(BR2_aarch64),y) > +FLUTTER_ENGINE_TARGET_ARCH = arm64 > +FLUTTER_ENGINE_TARGET_TRIPPLE = aarch64-linux > +endif So perhaps this the full list of supported CPU architectures? This is already a subset of the ones in BR2_PACKAGE_LLVM_ARCH_SUPPORTS: BR2_riscv is not handled here. So it does confirm my point above: using BR2_PACKAGE_LLVM_ARCH_SUPPORTS is probably not correct. > +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 \ > + libflutter_linux_gtk.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 \ > + --depot-tools $(HOST_DIR)/share/depot_tools \ > + --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 \ > + --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 > + > +ifeq ($(BR2_STRIP_strip),y) > +FLUTTER_ENGINE_CONF_OPTS += --stripped > +else > +FLUTTER_ENGINE_CONF_OPTS += --no-stripped > +endif Please use --no-stripped unconditionally, and let Buildroot do the stripping. > +ifeq ($(BR2_PACKAGE_MESA3D),y) > +FLUTTER_ENGINE_DEPENDENCIES += mesa3d > +endif Why do you have something specific to mesa3d here? mesa3d is an OpenGL or OpenGLES provider, so: +ifeq ($(BR2_PACKAGE_HAS_LIBGL),y) +FLUTTER_ENGINE_DEPENDENCIES += libgl +endif + +ifeq ($(BR2_PACKAGE_HAS_LIBGLES),y) +FLUTTER_ENGINE_DEPENDENCIES += libgles +endif already deals with it. > +# There is no --disable-vulkan option > +ifeq ($(BR2_PACKAGE_MESA3D_VULKAN_DRIVER),y) > +FLUTTER_ENGINE_CONF_OPTS += --enable-vulkan > +endif At some point we will probably want some kind of virtual package for vulkan, but as it doesn't exist today, good enough for now. > +# 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 $(FLUTTER_ENGINE_TARBALL_PATH) \ > + --version $(FLUTTER_ENGINE_VERSION) > +endef > +FLUTTER_ENGINE_POST_DOWNLOAD_HOOKS += FLUTTER_ENGINE_GENERATE_TARBALL I was going to ask: why is this a post-download hook rather than an override of the entire download step. Turns out we don't have anything like <pkg>_DOWNLOAD_CMDS that we can override. It's a pity, cause it would be the right thing to do here. Here again: I'm not making this a requirement at all for your patch to be merged. > +define FLUTTER_ENGINE_EXTRACT_CMDS > + gzip -d -c $(FLUTTER_ENGINE_TARBALL_PATH) | tar --strip-components 1 -C $(@D) -xf - > +endef If I understand correctly, we cannot let the default <pkg>_EXTRACT_CMDS do its job because <pkg>_SOURCE is empty. And <pkg>_SOURCE is empty to prevent the default download step from downloading stuff. So here again, being able to override the download step would allow us to set <pkg>_SOURCE, and therefore be able to use the default extract commands. > +define FLUTTER_ENGINE_CONFIGURE_CMDS > + cd $(@D)/ && \ Drop slash after cd $(@D)/ > +define FLUTTER_ENGINE_INSTALL_STAGING_CMDS > + $(foreach i,$(FLUTTER_ENGINE_INSTALL_FILES), > + $(Q)if [ -e $(FLUTTER_ENGINE_BUILD_DIR)/$(i) ]; then \ > + $(INSTALL) -D -m 0755 $(FLUTTER_ENGINE_BUILD_DIR)/$(i) \ > + $(STAGING_DIR)/usr/lib/$(i); \ Can FLUTTER_ENGINE_INSTALL_FILES be built in a bit of a smarter way to avoid having the conditional here? +FLUTTER_ENGINE_INSTALL_FILES = \ + libflutter_engine.so \ + libflutter_linux_gtk.so Isn't libflutter_linux_gtk.so produced only when Gtk support is available? > diff --git a/package/flutter-engine/gen-tarball b/package/flutter-engine/gen-tarball > new file mode 100755 > index 0000000000..572c055bea > --- /dev/null > +++ b/package/flutter-engine/gen-tarball > @@ -0,0 +1,108 @@ > +#!/usr/bin/env bash > +# Call gclient and generate a flutter-engine source tarball if one does not > +# already exist. > +# > +# Author: Adam Duskett <adam.duskett@amarulasolutions.com> > +set -eu > + > +DL_DIR= > +DOT_GCLIENT= > +JOBS= > +SCRATCH_DIR= > +TARBALL= > +VERSION= > + > +# shellcheck disable=SC1091 > +. ./support/download/helpers > + > +# 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:,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_DIR=$(dirname "${2}") > + TARBALL="${2}" > + shift 2 > + ;; > + (-v|--version) > + VERSION="${2}" > + 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 > +} > + > +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" > + cd "${SCRATCH_DIR}" > + "${gclient}" \ > + sync \ > + --delete_unversioned_trees \ > + --no-history \ > + --reset \ > + --shallow \ > + -j"${JOBS}" > +} > + > +gen_tarball(){ > + message "Generating tarball" > + mkdir -p "${DL_DIR}" > + mk_tar_gz \ > + "${SCRATCH_DIR}"/src \ > + flutter-"${VERSION}" \ > + "$(git -C "${SCRATCH_DIR}"/src log -1 --pretty=format:%ci)" \ > + "${TARBALL}" > + rm -rf "${SCRATCH_DIR}" > +} > + > +main() { > + parse_opts "${@}" > + if [ ! -e "${TARBALL}" ]; then I'm not sure about this condition. Why is there? If the tarball is already there, I would expect this tool to re-generate it and overwrite it, rather than "do nothing". Thanks for this work. Seriously, it looks quite good, and close to a state where it can be merged. I think it no longer needs to be in the "RFC" state. Thanks! Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: new package 2023-08-08 17:56 ` Thomas Petazzoni via buildroot @ 2023-08-09 20:22 ` Yann E. MORIN 2023-08-09 20:55 ` Thomas Petazzoni via buildroot 0 siblings, 1 reply; 9+ messages in thread From: Yann E. MORIN @ 2023-08-09 20:22 UTC (permalink / raw) To: Thomas Petazzoni Cc: Adam Duskett, Michael Trimarchi, buildroot, Asaf Kahlon, Angelo Compagnucci Thomas, All, On 2023-08-08 19:56 +0200, Thomas Petazzoni via buildroot spake thusly: > On Mon, 7 Aug 2023 18:35:27 -0600 > Adam Duskett <adam.duskett@amarulasolutions.com> wrote: > > index 0000000000..572c055bea > > --- /dev/null > > +++ b/package/flutter-engine/gen-tarball > > @@ -0,0 +1,108 @@ > > +#!/usr/bin/env bash > > +# Call gclient and generate a flutter-engine source tarball if one does not > > +# already exist. > > +# > > +# Author: Adam Duskett <adam.duskett@amarulasolutions.com> Authorship is not needed: it's tracked in git. Also, it is going to be wrong the moment someone else changes that file. Using the authorship from git will always be correct, though. [--SNIP--] > > +main() { > > + parse_opts "${@}" > > + if [ ! -e "${TARBALL}" ]; then > > I'm not sure about this condition. Why is there? If the tarball is > already there, I would expect this tool to re-generate it and overwrite > it, rather than "do nothing". Well, we do not redownload an archive if it is already downloaded. This is what this test does: skip the download if the archive is already present lcally. We have the same test package/pkg-gemneric.mk line 190: if test ! -e $($(PKG)_DL_DIR)/`basename $$p` ; then and in the download wrapper, line 67-onward: 67 # If the output file already exists and: 68 # - there's no .hash file: do not download it again and exit promptly 69 # - matches all its hashes: do not download it again and exit promptly 70 # - fails at least one of its hashes: force a re-download 71 # - there's no hash (but a .hash file): consider it a hard error 72 if [ -e "${output}" ]; then 73 if support/download/check-hash ${quiet} "${hfile}" "${output}" "${output##*/}"; then 74 exit 0 So this test does exactly the same thing. Regards, Yann E. MORIN. > Thanks for this work. Seriously, it looks quite good, and close to a > state where it can be merged. I think it no longer needs to be in the > "RFC" state. Yes, this is a very good work overall, for such a complex stack. We've been discussing this series on IRC, too, and it looks like there are missing pieces. Adam will correct me where I'm wrong, but here's what I understood from our discussion: 1. flutter-engine is a set of libraries that implement the runtime, this is what this package will provide, and flutter apps will have to select it and have it in their _DEPENDENCIES; 2. there is a package, flutter-sdk-bin, that provides a compiler to compiler flutter apps into Dart code; we'll need to have it packaged as host-flutter-sdk-bin; flutter apps will need to have that in their _DEPENDENCIES; 3. there is another package (which one?) that provide 'flutter', an executable that is in charge of starting flutter apps on the target. It looks like flutter-pi is such a package, but there might be others. So, if I understood everything (far from granted!), the sequence is about to look like this: flutter app source code | v flutter-sdk-bin to compile | v Dart code | v Target in /usr/share/flutter/app-name flutter-pi or other | v Target in /usr/bin/flutter Then at runtime on the target: $ /usr/bin/flutter app-name So, there are a lot more details to sort out, but it looks like the full stack is about this shape. More or less... Maybe less than more... Who knows? 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] 9+ messages in thread
* Re: [Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: new package 2023-08-09 20:22 ` Yann E. MORIN @ 2023-08-09 20:55 ` Thomas Petazzoni via buildroot 0 siblings, 0 replies; 9+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-08-09 20:55 UTC (permalink / raw) To: Yann E. MORIN Cc: Adam Duskett, Michael Trimarchi, buildroot, Asaf Kahlon, Angelo Compagnucci Hello, On Wed, 9 Aug 2023 22:22:04 +0200 "Yann E. MORIN" <yann.morin.1998@free.fr> wrote: > Well, we do not redownload an archive if it is already downloaded. This > is what this test does: skip the download if the archive is already > present lcally. > > We have the same test package/pkg-gemneric.mk line 190: > > if test ! -e $($(PKG)_DL_DIR)/`basename $$p` ; then > > and in the download wrapper, line 67-onward: > > 67 # If the output file already exists and: > 68 # - there's no .hash file: do not download it again and exit promptly > 69 # - matches all its hashes: do not download it again and exit promptly > 70 # - fails at least one of its hashes: force a re-download > 71 # - there's no hash (but a .hash file): consider it a hard error > 72 if [ -e "${output}" ]; then > 73 if support/download/check-hash ${quiet} "${hfile}" "${output}" "${output##*/}"; then > 74 exit 0 > > So this test does exactly the same thing. Indeed, makes sense! > Yes, this is a very good work overall, for such a complex stack. > > We've been discussing this series on IRC, too, and it looks like there > are missing pieces. Adam will correct me where I'm wrong, but here's > what I understood from our discussion: > > 1. flutter-engine is a set of libraries that implement the runtime, > this is what this package will provide, and flutter apps will have > to select it and have it in their _DEPENDENCIES; > > 2. there is a package, flutter-sdk-bin, that provides a compiler to > compiler flutter apps into Dart code; we'll need to have it packaged > as host-flutter-sdk-bin; flutter apps will need to have that in > their _DEPENDENCIES; > > 3. there is another package (which one?) that provide 'flutter', an > executable that is in charge of starting flutter apps on the target. > It looks like flutter-pi is such a package, but there might be > others. I think this part (3) is called an "embedder" in the Flutter terminology. flutter-pi is one. Another one is https://github.com/sony/flutter-elinux. See https://medium.com/snapp-x/flutter-on-embedded-devices-7070b5907b91. > So, if I understood everything (far from granted!), the sequence is > about to look like this: > > flutter app source code > | > v > flutter-sdk-bin to compile > | > v > Dart code > | > v > Target in /usr/share/flutter/app-name > > flutter-pi or other > | > v > Target in /usr/bin/flutter > > Then at runtime on the target: > > $ /usr/bin/flutter app-name Thanks for this summary, makes sense to me. Do we want for the whole thing to be submitted to merge anything, or do we want to go ahead and merge flutter-engine first? I'm fine with merging things piece by piece. Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages 2023-08-08 0:35 [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages Adam Duskett ` (2 preceding siblings ...) 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: " Adam Duskett @ 2023-08-08 19:37 ` Thomas Petazzoni via buildroot 3 siblings, 0 replies; 9+ messages in thread From: Thomas Petazzoni via buildroot @ 2023-08-08 19:37 UTC (permalink / raw) To: Adam Duskett Cc: Angelo Compagnucci, Michael Trimarchi, Asaf Kahlon, buildroot On Mon, 7 Aug 2023 18:35:24 -0600 Adam Duskett <adam.duskett@amarulasolutions.com> wrote: > Adam Duskett (3): > package/python-httplib2: add host variant > package/depot-tools: new package > package/flutter-engine: new package FYI, I did a test build of: BR2_aarch64=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_AARCH64_GLIBC_STABLE=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y # BR2_PACKAGE_BUSYBOX is not set BR2_PACKAGE_FLUTTER_ENGINE=y BR2_PACKAGE_SUNXI_MALI_UTGARD=y # BR2_TARGET_ROOTFS_TAR is not set and it did build successfully, in 18 minutes total. Thomas -- Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-08-09 20:56 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2023-08-08 0:35 [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages Adam Duskett 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 1/3] package/python-httplib2: add host variant Adam Duskett 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 2/3] package/depot-tools: new package Adam Duskett 2023-08-08 17:33 ` Thomas Petazzoni via buildroot 2023-08-08 0:35 ` [Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: " Adam Duskett 2023-08-08 17:56 ` Thomas Petazzoni via buildroot 2023-08-09 20:22 ` Yann E. MORIN 2023-08-09 20:55 ` Thomas Petazzoni via buildroot 2023-08-08 19:37 ` [Buildroot] [PATCH/next vRFCv2 0/3] Initial flutter packages Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox