Open main menu

DAVE Developer's Wiki β

Changes

Created page with "{{InfoBoxTop}} {{AppliesTo ORCA TN}} {{AppliesTo ORCA SBC TN}} {{InfoBoxBottom}} {{ImportantMessage|text=This application note has been validated using the '''kit version'''..."
{{InfoBoxTop}}
{{AppliesTo ORCA TN}}
{{AppliesTo ORCA SBC TN}}
{{InfoBoxBottom}}

{{ImportantMessage|text=This application note has been validated using the '''kit version''' in the History table.}}
==History==

{| class="wikitable" border="1"
!Version
!Date
!Development Kit version
|-
| 4.1.0
| May 2024
|[[DESK-MX8M-L/General/Release_Notes#DESK-MX8M-L_4.1.0|DESK-MX8M-L 4.1.0]]
|-
|}

==Introduction==

[https://flutter.dev/ 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.

[https://en.wikipedia.org/wiki/Flutter_(software) 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| ORCA SBC]] a Flutter environment for running the Flutter demo applications.

Flutter [https://github.com/flutter github repository] is the entry point for the source codes, while the Flutter documentation is available [https://docs.flutter.dev/ here].

== Build steps ==
The starting point is the <code>dave-image-devel</code> target from the <code>desk-mx8m-l-4.1.0</code> Yocto BSP tag (on <code>desk-mx8m-l-4.x.x</code> branch).

For [[ORCA SBC| ORCA SBC]] the <code>meta-desk-mx</code> Yocto layer sets then the following configuration:
<pre>
MACHINE ??= "desk-mx8mp"
DISTRO ??= "fsl-imx-wayland"
</pre>

* enter the sources directory and clone the <code>meta-flutter</code> repository
<pre>
cd sources && git clone https://github.com/meta-flutter/meta-flutter.git -b kirkstone
</pre>

* properly modify the <code>bblayers.conf</code> file
<pre>
${TOPDIR}/../sources/meta-flutter \
${TOPDIR}/../sources/meta-flutter/meta-flutter-apps \
</pre>
* modify the <code>local.conf</code> appending the flutter packages:

<pre>
IMAGE_INSTALL:append = " flutter-samples-material-3-demo flutter-wayland-client packagegroup-flutter-gallery"
</pre>

then it is possible to build the [[DESK-MX8M-L/Development/Building_the_Yocto_BSP | dave-image-devel]] image

=== Pre-built image ===
A pre-built image is available - for demo purposes - on our ''mirror'' server at the [https://mirror.dave.eu/desk-mx-l/desk-mx8m-l-4.1.0/flutter/dave-image-devel-desk-mx8mp.wic.bz2 following link].

== Running Flutter in the target ==
Once the library PATH has been properly set:
<pre class="workstation-terminal">
root@desk-mx8mp:~# export LD_LIBRARY_PATH=/usr/share/flutter/flutter-gallery/3.19.3/release/lib
</pre>

it is possible to start a flutter demo example invoking the <code>flutter-client</code>:

<pre class="workstation-terminal">
root@desk-mx8mp:~# flutter-client -f -b /usr/share/flutter/flutter-gallery/3.19.3/release/
</pre>


[[File:Flutter-gallery-demo.png | 800px | thumb | center | flutter-gallery demo on SBC ORCA]]
8,226
edits