[Buildroot] [PATCH/next vRFCv2 3/3] package/flutter-engine: new package

Thomas Petazzoni thomas.petazzoni at bootlin.com
Wed Aug 9 20:55:50 UTC 2023


Hello,

On Wed, 9 Aug 2023 22:22:04 +0200
"Yann E. MORIN" <yann.morin.1998 at 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



More information about the buildroot mailing list