Open main menu

DAVE Developer's Wiki β

Changes

Created page with "{{InfoBoxTop}} {{AppliesToAXEL Lite AN}} {{InfoBoxBottom}} {{ImportantMessage|text=This application note has been validated using the '''kit version''' in the History table.}..."
{{InfoBoxTop}}
{{AppliesToAXEL Lite AN}}
{{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.0
| May 2021
|[[DESK-MX6-L/General/Release_Notes#DESK-MX6-L_1.0.0|DESK 1.0.0]]
|-
|}

==Introduction==

[https://www.cranksoftware.com/ Crank Storyboard] is a cross-platform embedded GUI development framework, which will help the Customer to create aspirational GUI experiences. Crank Software has become the trusted embedded GUI framework across the wearables, industrial, healthcare, smart home, and appliances industries.

DAVE AXEL Lite SOM is able to run Crank Storyboard engine in its bundled root file system: the following Application Note shows how to integrate the <code>sbengine</code> runtime and then executing the Storyboard application in the targte platform.

==Installing Crank Storyboard==
First of all, watch and follow the [https://www.cranksoftware.com/learn/video-library/getting-started-with-storyboard Getting started with Storyboard] page for learning how to install and learn the Crank Software Storyboard.

==Installing sbengine in the root file system==
For installing the right [[DESK-MX6-L/General | DESK-MX6-L]] BSP version, create a proper [[AXEL_Lite_SOM/DESK-MX6-L/Development/How_to_create_a_bootable_microSD_card | SD card]] or download the already built version present into our [https://mirror.dave.eu/desk-mx-l/desk-mx6-l-1.0.0/ mirror cloud] services.

=== SD card===
The proper SD card image should be selected, i.e.: <code>desk-image-qt5-desk-mx6.sdcard.gz</code> and then create the SD card using - for example - Linux or Windows [https://www.balena.io/etcher/ balenaEtcher] tool.

=== runtime installation ===
From the Storyboard Engine directory of your Storyboard installation extract and copy the runtime directory

linux-imx6yocto-armle-opengles_2.0-obj

in the target root file system.

For example, if the runtime has been copied in the SD card first partition, copy it in the <code>/usr/share/crank/runtimes</code> directory

<pre class="board-terminal">
root@desk-mx6:~# mkdir /usr/share/crank
root@desk-mx6:~# mkdir /usr/share/crank/runtimes
root@desk-mx6:~# cp -aR /run/media/mmcblk0p1/linux-imx6yocto-armle-opengles_2.0-obj/ /usr/share/crank/runtimes
root@desk-mx6:~#
</pre>

Then, copy a Storyboard exmaple in another directory, for example:

<pre class="board-terminal">
root@desk-mx6:~# mkdir /usr/share/crank/apps
root@desk-mx6:~# cp -aR /run/media/mmcblk0p1/Launcher2016_FullScreen /usr/share/crank/apps
root@desk-mx6:~#
</pre>

== Script for automatic application startup==
A simple shell script can be used for starting the <code>sbengine</code> runtime and the selected application

* <code>storyboard_launcher.sh</code>

<pre class="board-terminal">
set -e

echo "Starting Storyboard Application..."
echo -e '\033[9;0]' >> /dev/tty1
echo 0 >> /sys/class/graphics/fb0/blank

export FB_MULTI_BUFFER=3

export SB_APP=/usr/share/crank/apps/Launcher2016_FullScreen/Launcher2016_FullScreen_NoCircles.gapp

export ENGINE=/usr/share/crank/runtimes/linux-imx6yocto-armle-opengles_2.0-obj
export SB_PLUGINS=$ENGINE/plugins
export LD_LIBRARY_PATH=$ENGINE/lib

$ENGINE/bin/gstreamer-backend &
$ENGINE/bin/sbengine -omtdev,device=/dev/input/event0,points=1 -orender_mgr,multisample=0,scale=aspect $SB_APP
</pre>

=== systemd service ===
A '''systemd''' service has to be created for starting the script, for example:

/etc/systemd/system/storyboard.service

and the service contains the initialization parameters:

<pre>
[Unit]
Description=Storyboard service
After=network.target
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=0
RestartSec=1
User=root
ExecStart=/etc/init.d/storyboard_launcher.sh

[Install]
WantedBy=multi-user.target
</pre>

and then start/enable the service:

systemctl enable storyboard.service

At the next reboot, the ''service'' will start <code>sbengine</code> with the selected application:

<pre class="board-terminal">
...
...
[ OK ] Started Terminate Psplash Boot Screen.
[ OK ] Started Storyboard Service.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttymxc2.
[ OK ] Reached target Sound Card.
[ OK ] Started Hostname Service.

NXP i.MX Release Distro 4.14-sumo desk-mx6 ttymxc2

desk-mx6 login:
</pre>
8,228
edits