DESK-MP1-TN-0001: Running Flutter on SBC ETRA

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
1.0.1 May 2024 DESK-MP1-L 1.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 ETRA SBC 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-qt5-weston target from the desk-mp1-l-1.0.1 Yocto BSP tag (on kirkstone branch).

For ETRA SBC the weston distro is used initializing the repo in the following way:

DISTRO=openstlinux-weston MACHINE=desk-mp1 source ./desk-setup-release.sh
  • enter the sources directory and clone the meta-flutter repository
cd sources && git clone https://github.com/meta-flutter/meta-flutter.git -b kirkstone
  • properly modify the bblayers.conf file
    ${OEROOT}/sources/meta-flutter \
    ${OEROOT}/sources/meta-flutter/meta-flutter-apps \
  • modify the 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-qt5-weston image

Pre-built image[edit | edit source]

A pre-built image is available - for demo purposes - on our mirror server at the following link.

Running Flutter in the target[edit | edit source]

Once the library PATH has been properly set:

root@desk-mp1:~# 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-mp1:~# flutter-client -f -b /usr/share/flutter/flutter-gallery/3.19.3/release/


flutter-gallery demo on SBC ETRA