Bringing up your Raspberry PI 5
We gave it a run to the new Raspberry Pi 5. In this tutorial we show how to run your Crank Storyboard application on your new PI in a couple of simple steps.
HW: Hardware specs can be found here Buy a Raspberry Pi 5 – Raspberry Pi
OS: We went for Raspberry Pi OS (previously called Raspbian).
To flash the image in your SD Card you can use Raspberry Imager:
Raspberry Pi OS – Raspberry Pi
There is some great documentation from Raspberry that you can follow under this link
Getting started - Raspberry Pi Documentation
Set up:
- Raspberry Pi 5, 4GB RAM, Active Cooler Kit
- SanDisk Extreme micro SDHC A1 UHS-I U3 memory card + adapter 32GB
- Micro HDMI adapter cable D-plug - A-socket
- HDMI cable
- Gechic Touch Monitor 15.6 Inch T151A Embedded Touchscreen Monitor with HDMI/USB Type-C
- Ethernet connection to a Router
- Keyboard and mouse
Steps:
- Unbox and connect your PI as shown in Getting started - Raspberry Pi Documentation
- Flash the OS, using Raspberry Pi Imager Raspberry Pi OS – Raspberry Pi *
For our tests we have use the following image:Raspberry PI OS (64-bit). A port of Debian Bookworm with the Raspberry Pi Desktop (recommended). Release 2024-03-15
*note: We want to connect to the Raspberry Pi remotely over the network, when configuring the image you must enable SSH.
- After your PI is up and running, you should see your Desktop environment. If you are familiar with Crank Storyboard, you probably know that deploying an app to your target device is all about:
►Exporting a Storyboard application from Storyboard Designer for your system,
►Selecting and deploying the right Storyboard Runtime Engine, and
►Setting up your environment to run Storyboard.
- Exporting a Storyboard application from Storyboard Designer for your system
►This video covers this point and some parts of the second and third points, but we will talk more about that next. VIDEO: Preparing your embedded GUI for Linux deployment – Crank Software,
►If you want to test more advance demos you can connect and grab one from our repository GitHub - crank-software/storyboard-demos: Storyboard Demonstration Projects
- Selecting and deploying the right Storyboard Runtime Engine
►your PI has an ideoCore VII GPU, supporting OpenGL ES 3.1, Vulkan 1.2. So, you can choose to leverage it by using Crank’s runtime for OpenGL support (recommended):
linux-raspberry-aarch64-opengles_2.0-drm-obj
alternatively, you can run the one that supports software rendering only:
linux-raspberry-aarch64-swrender-obj
note: For Bookworm, Raspberry is using a compositor called Wayfire. This uses a standard Wayland library called wlroots, which is used by several modern Wayland compositors. Crank has a Runtime for Wayland based on Weston compositor, so, at the moment of writing this article the Crank does not have Wayland runtime that would run out of the fox for the PI5.
- Setting up your environment to run Storyboard
►If you, as recommended, have chosen the DRM runtime to leverage the GPU, you must install the DRM support to the filesystem. For that run the following commands on the Command line:pi@raspberrypi5:~ $ sudo apt install libdrm-dev libgbm-dev libegl-dev libgl-dev
pi@raspberrypi5:~ $ sync
pi@raspberrypi5:~ $ reboot*You can check afterwards if the driver were properly installed here /dev/dri/
►Connect via Ethernet using SSH and create your directories. One directory for apps, one for runtimes and a couple of launching scripts.
/home/pi/crank/
►Deploy your SB App to the apps directory as explained step 4:
/home/pi/crank/apps/
►Deploy your Runtimes in the runtimes directory as explained in step 4:
/home/pi/crank/runtime/
*be sure the files inside the bin folder have executable rights.
►Write your script. Here is the one used for this example:
crank_dir=/home/pi/crank
RUNTIME=$crank_dir/runtimes/linux-raspberry-aarch64-opengles_2.0-drm-obj
APP=$crank_dir/apps/VitalsHD/1280x720.gapp
export SBENGINE=$RUNTIME/bin/sbengine
export SB_PLUGINS=$RUNTIME/plugins
export LD_LIBRARY_PATH=$RUNTIME/lib:$SB_PLUGINS
export XDG_RUNTIME_DIR=/run/user/0
export OPTIONS='-vvvv -omtdev,device=/dev/input/event5 -orender_mgr,fullscreen,scale'
killall sbengine
$SBENGINE $OPTIONS $APP
►Last but not least, before you run your UI, you need to indicate the system, that Crank is your GUI now, for that you can use the following command:
pi@raspberrypi5:~ $ sudo systemctl set-default multi-user.target
► After rebooting you should enter in console mode, and you can go ahead and launch your app by running your scriptpi@raspberrypi5:~/Crank $ ./storyboard_launcher_drm.sh
Related articles:
Prototyping With Storyboard on Raspbian Stretch - Raspberry PI 3B – Crank Software
How to configure keyboard and mouse input for a Raspberry Pi 4 – Crank Software
How to configure an auto-boot launcher script for Raspberry Pi4 – Crank Software
Comments
Please sign in to leave a comment.