Yocto Layer for Google Flutter related projects.
- Create flutter workspace using ./tools/setup_flutter_workspace.py
- Debug and validate application on host using flutter-auto, AGL QEMU, or Linux GTK.
- Create Yocto Recipe for your Flutter application using
flutter-gallery-*
or one of the many app recipes as the template. Nested projected are supported using FLUTTER_APPLICATION_PATH. Passing Dart defines are done with FLUTTER_EXTRA_BUILD_ARGS. - Add your app, and selected embedder to your release image. The flutter engine will be implicitly added to the image.
- Image device
- meta-clang
Clang generates smaller runtime images, and is used by Google to build the the flutter engine for Android and iOS. Changing toolchains should be avoided, as this would provide a path with little to no test milage.
Target BSP is expected to have a GPU with OpenGLES v2.0+ support.
If you selecting a part go with v3.0+, ideally one with Vulkan support.
-
There are no OSS Linux embedders (that I am aware of that currently support software rendering). The engine does support it.
-
flutter-auto
is theagl
branch of https://github.com/toyota-connected/ivi-homescreen themain
branch has moved to quarterly releases, theagl
branch is directly supporting AGL development work.
-
kirkstone-agl-renesas-m3.yml - Renesas M3 build. Time boxed GPU driver (30 minutes?). AGL canaray build.
-
kirkstone-agl-x86_64.yml - meta-flutter QEMU image used with tools/seup_flutter_workspace.py. Test build for AGL downstream work.
-
kirkstone-imx8mmevk.yml - NXP imx8mmevk baseline Wayland image.
-
kirkstone-linux-dummy.yml - Tests all recipes in the layer without a dummy Linux kernel (save build time).
-
kirkstone-qc-dragonboard.yml - DB410C and DB820C Wayland images.
-
kirkstone-rpi-zero2w-64.yml - RPI Zero2W Wayland image (flutter-auto). Farily full featured with Network Manager, BT, WiFi, etc.
-
kirkstone-stm32mp15.yml - eglfs (flutter-pi) st-core-image+SDK and wayland (flutter-auto) st-core-image+SDK.
Notes: CI job sstate is cleared between builds for all meta-flutter recipes; clean builds.
Targets flutter-engine-* is known to work on
- AGL QEMU images - aarch64/x86_64
- Intel icore7-64
- NVIDIA Nano, Xavier Dev Kits - aarch64
- NXP iMX7 (caveats), iMX8
- Qualcomm DragonBoard DB410c, DB820, SA6155P, SA8xxx - aarch64
- Raspberry Pi 3 / Compute - aarch64 / armv7hf
- Raspberry Pi 4 / Compute - aarch64
- Raspberry Pi ZeroW / Zero2W - aarch64
- Renesas R-Car M3/H3 - aarch64
- STM32MP157x - cortexa7t2hf
- etc
Add to local.conf file:
TOOLCHAIN_HOST_TASK:append = " nativesdk-flutter-sdk"
Then run:
bitbake <image name> -c populate_sdk
Note: when using SDK you may need to add the following after installation:
$ export SDK_ROOT=<install folder>/sysroots/x86_64-nodistrosdk-linux/usr/share/flutter/sdk
$ git config --global --add safe.directory $SDK_ROOT
When building on systems with GCC version > than uninative in Yocto distro add the following to conf/local.conf
INHERIT:remove = "uninative"
Please visit here for how to setup Flutter workspace automatically.