Storyboard has the ability to scale from very small resource constrained devices to much larger feature rich platforms. The common theme on all of these systems is getting the best graphics performance both in terms of quality and resource costs like CPU and memory.
On Linux, the current defacto environment for desktop development involves using an X server to run an X11 based user interface. Storyboard, when running on x86 desktop systems, can render UI content using the X11 interface. This is the environment that the Storyboard Designer simulator runs the Storyboard Engine.
For embedded Linux systems where keeping resource consumption to a minimum is important then you want to consider removing every piece of software not essential to the operation of your product. Storyboard, when running on embedded ARM platforms, renders directly to the hardware allowing the removal of the X11 graphics interface and dependencies to create a smaller system image.
Typically embedded target platforms are shipped with a Yocto Linux board support package (BSP). By default, if the BSP supports graphics, some form of X11 windowing system is enabled by default.
To save space and resources the first thing we do when setting up Storyboard is to kill the windowing system process(es).
The issue here is that when we try to run our OpenGL runtime on the target, we get the following possible errors ...
DIAG [0.024]:Unable to load plugin: /home/root/linux-imx6yocto-armle-opengles_2.0-obj/plugins/librender-plugin-opengles_2.0.so Error: /home/root/linux-imx6yocto-armle-opengles_2.0-obj/plugins//librender-plugin-opengles_2.0.so: undefined symbol: fbDestroyWindow ... DIAG [0.012]:Unable to load plugin: /crank/linux-fsl-armle-opengles_2.0-obj/plugins/libgre-plugin-circle.so Error: libgsl-fsl.so.1: cannot open shared object file: No such file or directory ... DIAG [0.018]:Unable to load plugin: /crank/linux-fsl-armle-opengles_2.0-obj/plugins/libgre-plugin-effects-3d.so Error: libgsl-fsl.so.1: cannot open shared object file: No such file or directory DIAG [0.036]:Unable to load plugin: /crank/linux-fsl-armle-opengles_2.0-obj/plugins/libgre-plugin-model3d.so Error: libX11-xcb.so.1: cannot open shared object file: No such file or directory ... DIAG [0.039]:Unable to load plugin: /crank/linux-fsl-armle-opengles_2.0-obj/plugins/librender-plugin-opengles_2.0.so Error: libgsl-fsl.so.1: cannot open shared object file: No such file or directory ... DIAG [0.053]:Unable to load plugin: /crank/linux-fsl-armle-opengles_2.0-obj/plugins/libgre-plugin-screen-3d.so Error: libX11-xcb.so.1: cannot open shared object file: No such file or directory ... DIAG [0.049]:Manager: action_mgr Internal: 0x76f15ca8 DIAG [0.049]:Manager: render_mgr FUNC:gr_rendermgr_create ERROR [0.049]:Unable to load a renderer >DIAG [0.049]:Finalize IO Manager
The reason for those errors is because the Storyboard for Yocto Linux runtime is built using the fbdev (Framebuffer) driver backend for OpenGL ES 2.0 and the BSP likely does not have this support and may be using an X11 or Wayland backend. The BSP will need to be rebuilt to remove the other backends and add support for fbdev.
The following is a sample local.conf file used with iMX6 BSPs to provide the needed libs to run the OpenGL ES 2.0 sbengine runtime correctly.
MACHINE ??= '??' DISTRO ?= 'fsl-imx-fb' PACKAGE_CLASSES ?= "package_rpm" EXTRA_IMAGE_FEATURES = "debug-tweaks" USER_CLASSES ?= "buildstats image-mklibs" PATCHRESOLVE = "noop" BB_DISKMON_DIRS = "\ STOPTASKS,${TMPDIR},1G,100K \ STOPTASKS,${DL_DIR},1G,100K \ STOPTASKS,${SSTATE_DIR},1G,100K \ STOPTASKS,/tmp,100M,100K \ ABORT,${TMPDIR},100M,1K \ ABORT,${DL_DIR},100M,1K \ ABORT,${SSTATE_DIR},100M,1K \ ABORT,/tmp,10M,1K" PACKAGECONFIG_append_pn-qemu-native = " sdl" PACKAGECONFIG_append_pn-nativesdk-qemu = " sdl" ASSUME_PROVIDED += "libsdl-native" CONF_VERSION = "1" DL_DIR ?= "${BSPDIR}/downloads/" ACCEPT_FSL_EULA = "1" CORE_IMAGE_EXTRA_INSTALL = "kernel-module-imx-gpu-viv fsl-gpu-sdk packagegroup-fsl-tools-gpu libinput imx-gpu-viv mtdev tslib dropbear gdb imx-gst1.0-plugin gstreamer gstreamer1.0 gstreamer1.0-meta-base gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gst-plugins-base imx-gst1.0-plugin"
Please note that if a particular DISTRO has X11 or Wayland included, it will need to be removed by modifying DISTRO_FEATURES. To rebuild the yocto image with framebuffer driver back-end (not X11 or Wayland), the following line needs to be present in <yocto_build_dir>/conf/local.conf
DISTRO_FEATURES_remove = " x11 wayland "
We offer the linux-x86-opengles_2.0-x11-obj runtime which enables you to run your Storyboard application within the X11 windowing system. To do so is just a matter of setting up a couple of environmental variables and running a command line. Follow these simple steps …
Open up a command terminal on your x86 Linux system and type the following:
**assuming everything is located under /crank
export SB_PLUGINS=/crank/linux-x86-opengles_2.0-x11-obj/plugins export LD_LIBRARY_PATH=/crank/linux-x86-opengles_2.0-x11-obj/lib:$LD_LIBRARY_PATH /crank/linux-x86-opengles_2.0-x11-obj/bin/sbengine -vv /crank/your_app/your_app.gapp
One thing to note is that Storyboard Engine (sbengine) is a 32 bit binary and you might run into some issues when trying to run on the latest 64 bit desktop environments like Ubuntu 16.04. When you go to execute sbengine you might get the following error …
bash: ./sbengine: No such file or directory
What is happening is that the renderer can't be loaded because it can't find the 32 bit version of libGL.so.1. To resolve the issue you simply need to install them using the following command ...
sudo apt-get install libgl1-mesa-glx:i386
There you have it. Your Storyboard application will now be running in a window just like the other applications on your Linux system.
Some customers choose to use a readily available desktop Linux but do not necessarily want to use the X11 windowing system. They want their Storyboard application to use the complete screen real estate. The customer can use the linux-x86-fbdev-obj runtime to do so.
The setup is essentially the same, with regards to setting the environmental variables, but we first have to slay off the X11 windowing process(es). Use the following command to boot Ubuntu to the console:
**the following is specific to Ubuntu 16.04 LTS however it should be successful on most recent Debian based embedded distributions such as Raspbian for the Raspberry Pi.
sudo systemctl set-default multi-user.target
After executing the above command line, reboot Ubuntu and login.
Execute the following:
**assuming everything is located under /crank
export SB_PLUGINS=/crank/linux-x86-fbdev-obj/plugins export LD_LIBRARY_PATH=/crank/linux-x86-fbdev-obj/lib:$LD_LIBRARY_PATH /crank/linux-x86-fbdev-obj/bin/sbengine -vv /crank/your_app/your_app.gapp
Your Storyboard application will now be running on your Ubuntu system. In the event you decide to go back to the X11 windowing system and use the linux-x86-opengles_2.0-x11-obj runtime you can by executing the following command:
sudo systemctl set-default graphical.target
Crank’s community forum is a great place to interact with other Storyboard users to ask questions and get configuration assistance: https://support.cranksoftware.com/
Storyboard support is also readily available by contacting support@cranksoftware.com.