Open main menu

DAVE Developer's Wiki β

Changes

Created page with "{{InfoBoxTop}} {{AppliesToETRA TN}} {{AppliesTo ETRA SBC TN}} {{InfoBoxBottom}} {{ImportantMessage|text=This application note has been validated using the '''kit version''' i..."
{{InfoBoxTop}}
{{AppliesToETRA TN}}
{{AppliesTo ETRA 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
|-
| 1.0.1
| May 2024
|[[DESK-MP1-L/General/Release_Notes#DESK-MP1-L_1.0.1|DESK-MP1-L 1.0.1]]
|-
|}

==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 [[ETRA SBC| ETRA 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-qt5-weston</code> target from the <code>desk-mp1-l-1.0.1</code> Yocto BSP tag (on <code>desk-mp1-l-1.x.x</code> branch).

For [[ETRA SBC| ETRA SBC]] the <code>weston</code> distro is used initializing the repo in the following way:
<pre>
DISTRO=openstlinux-weston MACHINE=desk-mp1 source ./desk-setup-release.sh
</pre>

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

* properly modify the <code>bblayers.conf</code> file
<pre>
${OEROOT}/sources/meta-flutter \
${OEROOT}/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-MP1-L/Development/Building_the_Yocto_BSP | dave-image-qt5-weston]] image

=== Pre-built image ===
A pre-built image is available - for demo purposes - on our ''mirror'' server at the [https://mirror.dave.eu/desk-mp1-l/desk-mp1-l-1.0.1/flutter/desk-image-qt5-openstlinux-weston-desk-mp1.wic.bz2 following link].

== Running Flutter in the target ==
Once the library PATH has been properly set:
<pre class="workstation-terminal">
root@desk-mp1:~# 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-mp1:~# 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 ETRA]]
8,226
edits