Difference between revisions of "DESK-MX6-L-AN-0001: Crank Storyboard engine and application"

From DAVE Developer's Wiki
Jump to: navigation, search
(History)
(Introduction)
(14 intermediate revisions by 2 users not shown)
Line 21: Line 21:
 
[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.
 
[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.
+
DAVE [[AXEL Lite SOM]] is ready 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 target platform.
 +
 
 +
 
 +
[[File:Crank-and-Ametek.jpg | 500px | thumb| center| link=https://www.cranksoftware.com/| Crank Software Embedded graphical user interface framework]]
  
 
==Installing Crank Storyboard==
 
==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.
+
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 about Crank Software Storyboard.
  
 
==Installing sbengine in the root file system==
 
==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.
+
For installing the right [[DESK-MX6-L| 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.
 +
 
 +
More information on how to install <code>sbengine</code> in the target can be found in the [http://resources.cranksoftware.com/cranksoftware/v6.1.0/docs/webhelp/index.html#ch40.html resources Crank Software] web site. A simple but detailed description on how to install it is depicted for the [http://resources.cranksoftware.com/cranksoftware/v6.1.0/docs/webhelp/index.html#ch40s02.html Raspberry Pi] target.
  
 
=== SD card===
 
=== 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.
 
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.
 +
 +
This image contains the OpenGL ES 2.0 driver required for running ''sbengine'' at the best performance on the framebuffer.
 +
 +
The SD card image can be downloaded from [https://mirror.dave.eu/desk-mx-l/desk-mx6-l-1.0.0/desk-image-qt5-desk-mx6.sdcard.gz our mirror] cloud service.
  
 
=== runtime installation ===
 
=== runtime installation ===
Line 42: Line 51:
  
 
<pre class="board-terminal">
 
<pre class="board-terminal">
root@desk-mx6:~# mkdir /usr/share/crank
+
root@desk-mx6:~# mkdir -p /usr/share/crank
root@desk-mx6:~# mkdir /usr/share/crank/runtimes
+
root@desk-mx6:~# mkdir -p /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:~# cp -aR /run/media/mmcblk0p1/linux-imx6yocto-armle-opengles_2.0-obj/ /usr/share/crank/runtimes
 
root@desk-mx6:~#
 
root@desk-mx6:~#
 
</pre>
 
</pre>
  
Then, copy a Storyboard exmaple in another directory, for example:
+
Then, copy a Storyboard example in another directory, e.g.:
  
 
<pre class="board-terminal">
 
<pre class="board-terminal">
root@desk-mx6:~# mkdir /usr/share/crank/apps
+
root@desk-mx6:~# mkdir -p /usr/share/crank/apps
 
root@desk-mx6:~# cp -aR /run/media/mmcblk0p1/Launcher2016_FullScreen /usr/share/crank/apps
 
root@desk-mx6:~# cp -aR /run/media/mmcblk0p1/Launcher2016_FullScreen /usr/share/crank/apps
 
root@desk-mx6:~#
 
root@desk-mx6:~#
Line 59: Line 68:
 
Storyboard ''sbengine'' uses <code>mtdev</code> for accessing the touchscreen device. The mtdev library is then required.  
 
Storyboard ''sbengine'' uses <code>mtdev</code> for accessing the touchscreen device. The mtdev library is then required.  
  
For adding the mtdev package it is enough to build it with Yocto following the [[DESK-MX6-L/Development/Building_the_Yocto_BSP#Building_additional_packages | Building_additional_packages]] instructions
+
For adding the mtdev package it is enough to build it with Yocto following the [[DESK-MX6-L/Development/Building_the_Yocto_BSP#Building_additional_packages | Building additional packages]] instructions. Otherwise, you can find the package [http://yocto.dave.eu/desk-mx6-l-1.0.0/cortexa9hf_neon/mtdev-1.1.5-r0.cortexa9hf_neon.rpm here] in our <code>yocto</code> server with pre-built packages.
  
 
Once the package has been built, just install it with <code>rpm</code>
 
Once the package has been built, just install it with <code>rpm</code>
Line 69: Line 78:
  
 
thus enabling the touchscreen device.
 
thus enabling the touchscreen device.
 
You can find the package built [https://mirror.dave.eu/desk-mx-l/packages here] for your convenience.
 
  
 
== Script for automatic application startup==
 
== Script for automatic application startup==
Line 78: Line 85:
  
 
<syntaxhighlight lang="bash">
 
<syntaxhighlight lang="bash">
 +
#!/bin/sh
 +
 
set -e
 
set -e
  
Line 95: Line 104:
 
$ENGINE/bin/sbengine -omtdev,device=/dev/input/event0,points=1 -orender_mgr,multisample=0,scale=aspect $SB_APP
 
$ENGINE/bin/sbengine -omtdev,device=/dev/input/event0,points=1 -orender_mgr,multisample=0,scale=aspect $SB_APP
 
</syntaxhighlight>
 
</syntaxhighlight>
 +
 +
and then set the correct attribute
 +
 +
chmod +x /etc/init.d/storyboard_launcher.sh
  
 
=== systemd service ===
 
=== systemd service ===
Line 126: Line 139:
 
== Results ==
 
== Results ==
 
At the next reboot, the ''service'' will start <code>sbengine</code> with the selected application:
 
At the next reboot, the ''service'' will start <code>sbengine</code> with the selected application:
 
  
 
<pre class="board-terminal">
 
<pre class="board-terminal">

Revision as of 07:52, 20 September 2021

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
1.0.0 May 2021 DESK-MX6-L 1.0.0

Introduction[edit | edit source]

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 ready to run Crank Storyboard engine in its bundled root file system: the following Application Note shows how to integrate the sbengine runtime and then executing the Storyboard application in the target platform.


Crank Software Embedded graphical user interface framework

Installing Crank Storyboard[edit | edit source]

First of all, watch and follow the Getting started with Storyboard page for learning how to install and learn about Crank Software Storyboard.

Installing sbengine in the root file system[edit | edit source]

For installing the right DESK-MX6-L BSP version, create a proper SD card or download the already built version present into our mirror cloud services.

More information on how to install sbengine in the target can be found in the resources Crank Software web site. A simple but detailed description on how to install it is depicted for the Raspberry Pi target.

SD card[edit | edit source]

The proper SD card image should be selected, i.e.: desk-image-qt5-desk-mx6.sdcard.gz and then create the SD card using - for example - Linux or Windows balenaEtcher tool.

This image contains the OpenGL ES 2.0 driver required for running sbengine at the best performance on the framebuffer.

The SD card image can be downloaded from our mirror cloud service.

runtime installation[edit | edit source]

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 /usr/share/crank/runtimes directory

root@desk-mx6:~# mkdir -p /usr/share/crank
root@desk-mx6:~# mkdir -p /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:~#

Then, copy a Storyboard example in another directory, e.g.:

root@desk-mx6:~# mkdir -p /usr/share/crank/apps
root@desk-mx6:~# cp -aR /run/media/mmcblk0p1/Launcher2016_FullScreen /usr/share/crank/apps
root@desk-mx6:~#

touchscreen[edit | edit source]

Storyboard sbengine uses mtdev for accessing the touchscreen device. The mtdev library is then required.

For adding the mtdev package it is enough to build it with Yocto following the Building additional packages instructions. Otherwise, you can find the package here in our yocto server with pre-built packages.

Once the package has been built, just install it with rpm

root@desk-mx6:~# rpm -i mtdev-1.1.5-r0.cortexa9hf_neon.rpm
root@desk-mx6:~#

thus enabling the touchscreen device.

Script for automatic application startup[edit | edit source]

A simple shell script can be used for starting the sbengine runtime and the selected application

  • storyboard_launcher.sh
#!/bin/sh

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

and then set the correct attribute

chmod +x /etc/init.d/storyboard_launcher.sh

systemd service[edit | edit source]

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:

[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

and then start/enable the service:

systemctl enable storyboard.service

Results[edit | edit source]

At the next reboot, the service will start sbengine with the selected application:

...
...
[  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:
Crank Software Storyboard Launcher demo