DESK-MX8M-TN-0001: Running Flutter on SBC ORCA

From DAVE Developer's Wiki
Revision as of 12:18, 3 May 2024 by U0007 (talk | contribs) (Created page with "{{InfoBoxTop}} {{AppliesTo ORCA TN}} {{AppliesTo ORCA SBC TN}} {{InfoBoxBottom}} {{ImportantMessage|text=This application note has been validated using the '''kit version'''...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
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.1.0 May 2024 DESK-MX8M-L 4.1.0

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 ORCA 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-devel target from the desk-mx8m-l-4.1.0 Yocto BSP tag (on desk-mx8m-l-4.x.x branch).

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

MACHINE ??= "desk-mx8mp"
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
  • properly modify the bblayers.conf file
    ${TOPDIR}/../sources/meta-flutter \
    ${TOPDIR}/../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-devel 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-mx8mp:~# 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-mx8mp:~# flutter-client -f -b /usr/share/flutter/flutter-gallery/3.19.3/release/


flutter-gallery demo on SBC ORCA