Open main menu

DAVE Developer's Wiki β

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

Revision as of 13:48, 7 May 2024 by U0007 (talk | contribs) (Build steps)

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Info Box


200px-Emblem-important.svg.png

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

Contents

HistoryEdit

Version Date Development Kit version
1.0.1 May 2024 DESK-MP1-L 1.0.1

IntroductionEdit

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 stepsEdit

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 imageEdit

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

Running Flutter in the targetEdit

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