Flutter on imx8mmini yocto

Dear Team
I am working with Verdin imx8mini HW, would like to us yocto image and test Flutter
Please suggest hot to proceed.

Hello @nagendra ,

The link shared with you is for Dunfell. You could use it there.

BR, Janani

Hello @nagendra ,

Yes, you are right. You would need to add the meta-flutter layer to the bblayer.conf.

BR, Janani

Hello Janani,
also could you help me which is the latest yocto distubution for imx8m-mini which supports flutter as well.
our hw is Verdin 1,0b and imx8m mini V1.0b

Yes, trying to use Dunfell branch onl, and default bblayer.conf does not contain meta-flutter, so would like to know what are the Recipes to be added to test flutter on imx8mm, or can I directly add meta-flutter ? any suggestion ?

Thank you Janani,

Hello Janani,
I have added flutter-wayland support to yocto and below is the output , now not sure how to test it , while trying to run sample app, I end up with below error , let me know if you have any idea what went wrong?

root@verdin-imx8mm:~# flutter_wayland

Flutter Wayland Embedder

Usage: flutter_wayland <asset_path> <flutter_flags>

This utility runs an instance of a Flutter application and renders using
Wayland core protocols.

The Flutter tools can be obtained at https://flutter.io/

app_path: This either points to asset bundle path, or
an Ahead Of Time (AOT) shared library (.so).

asset_path: The Flutter application code needs to be snapshotted using
the Flutter tools and the assets packaged in the appropriate
location. This can be done for any Flutter application by
running flutter build bundle while in the directory of a
valid Flutter project. This should package all the code and
assets in the “build/flutter_assets” directory. Specify this
directory as the first argument to this utility.

flutter_flags: Typically empty. These extra flags are passed directly to the
Flutter engine. To see all supported flags, run
flutter_tester --help using the test binary included in the
Flutter tools.

root@verdin-imx8mm:~# flutter_wayland /tmp/flutter_assets
LOG: /usr/src/debug/flutter-wayland/git-r0/git/src/main.cc:65: Arg: /tmp/flutter_assets
Pointer Present
Keyboard Present
assets_path: /tmp/flutter_assets
load_aot: 0
[ERROR:flutter/runtime/dart_vm_data.cc(18)] VM snapshot invalid and could not be inferred from settings.
[ERROR:flutter/runtime/dart_vm.cc(257)] Could not set up VM data to bootstrap the VM from.
[ERROR:flutter/runtime/dart_vm_lifecycle.cc(84)] Could not create Dart VM instance.
[FATAL:flutter/shell/common/shell.cc(143)] Check failed: vm. Must be able to initialize the VM.


Hi @nagendra

Could you share some information about creating the image and the corresponding SDK?
What changes have you done to local.conf and bblayer.conf? Please share also other changes?

Best regards,

Hi @jaski.tx
try below
clone meta-flutter ( git clone https://github.com/jwinarske/meta-flutter.git)
add meta-flutter to build/conf/bblayers.conf
add flutter-wayland to tdx-reference-multimedia-image.bb

Hello @nagendra ,

There is a layer meta-flutter, https://layers.openembedded.org/layerindex/branch/dunfell/recipes/?q=flutter that you can integrate while you build your image using Yocto or OE. Is this what you are looking for?

Best Regards,

Hello @nagendra,

We don’t have much experience in Toradex with Flutter, but I see that this is not an uncommon issue. Could you maybe try the things suggested here:


As this also mainly seems like a Flutter issue, could you maybe try to use these tool here:
flutter doctor -v
flutter analyze

I hope this helps!

Best Regards,

Hello @saijanani.tx
After some R&D I am able to run flutter basic test apps on Imx8mmini target,

(TDX Wayland with XWayland 5.1.0-devel-20210713095314+build.0 (dunfell) \n \l

but I understand that the flutter has more support in mobile platform than embedded-linux platform

Hello @nagendra ,

I am happy to hear that it worked! :slight_smile:
Yes, the support is not yet the best in embedded area…

BR, Janani