DESK-MX6-L-TN-0001: Running Flutter on AXEL Lite

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box


200px-Emblem-important.svg.png

This application note has been validated using the kit version in the History table.

History[edit | edit source]

Version Date Development Kit version
4.0.1 May 2024 DESK-MX6-L 4.0.1

Introduction[edit | edit source]

Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase. Its main powerful characteristic is to deploy to multiple devices from a single codebase: mobile, web, desktop, and embedded devices.

Flutter consists of both a UI language and a rendering engine. When a Flutter application is compiled, it ships with both the UI code and the rendering engine

This Technical Note (TN) describes how to create a complete SD card that can run on AXEL Lite a Flutter environment for running the Flutter demo applications.

Flutter github repository is the entry point for the source codes, while the Flutter documentation is available here.

Build steps[edit | edit source]

The starting point is the dave-image-devel target from the desk-mx6-l-4.0.1 Yocto BSP tag (on desk-mx6-l-4.0.1 branch).

For SBC AXEL the meta-desk-mx Yocto layer sets then the following configuration:

MACHINE ??= "desk-mx6"
DISTRO ??= "fsl-imx-wayland"
  • enter the sources directory and clone the meta-flutter repository
cd sources && git clone https://github.com/meta-flutter/meta-flutter.git -b kirkstone
  • enter the build directory and properly modify the conf/bblayers.conf file
echo 'BBLAYERS += " ${BSPDIR}/sources/meta-flutter "' >> conf/bblayers.conf
echo 'BBLAYERS += " ${BSPDIR}/sources/meta-flutter/meta-flutter-apps "' >> conf/bblayers.conf
  • modify the conf/local.conf appending the flutter packages:
IMAGE_INSTALL:append = " flutter-samples-material-3-demo flutter-wayland-client packagegroup-flutter-gallery"

then it is possible to build the dave-image-devel image


Running Flutter in the target[edit | edit source]

Once the library PATH has been properly set:

root@desk-mx6:~# export LD_LIBRARY_PATH=/usr/share/flutter/flutter-gallery/3.19.3/release/lib

it is possible to start a flutter demo example invoking the flutter-client:

root@desk-mx6:~# flutter-client -f -b /usr/share/flutter/flutter-gallery/3.19.3/release/


flutter-gallery demo on SBC AXEL