Power Pack Configuration
Version 2.0.0 of the power-pack app implements Yocto compatability from the app side. However, there are a few things that need to be done on the display itself to prepare it, because they’re initially set up to run the display-app.
Copy environment variables
Section titled “Copy environment variables”The Yocto displays are set up so that each app has a profile file. This file contains all the environment variables needed for running the app.
You should be able to copy the one from the display-app by running the following:
cp /etc/profile.d/bam-mrsdisp.profile /etc/profile.d/powerpack-mrsdisp.profileHowever, if that doesn’t work, or if the file doesn’t exist, do the following:
-
Create a new executable
.profilefile and open the text editor:Terminal window cd /etc/profile.dtouch powerpack-mrsdisp.profilechmod +x powerpack-mrsdisp.profilevi powerpack-mrsdisp.profile -
Press
Ito edit, then paste in the following:#!/bin/sh## Copyright 2020 MRS Electronic GmbH & Co. KG#ident="0"fb="/dev/fb0"if [ -f $0 ] ; thenscript=$(basename $(readlink -f ${BASH_SOURCE[0]}))caller=$(basename ${BASH_SOURCE[0]})[ "${script}" == "${caller}" ] && ident="0" || ident=$(basename $(echo ${caller} | awk -F "-" '{print $1}'))[ "${script}" == "${caller}" ] && fb="/dev/fb0" || fb=""case "${ident}" in1) fb="/dev/fb2" ;;0) fb="/dev/fb0" ;;*) ;;esacfi[ -f /etc/profile.d/${ident}-tslib.profile ] && . /etc/profile.d/${ident}-tslib.profilePATH=$PATH:/opt/binexport QT_QPA_EGLFS_FB=${fb}export QSG_RENDER_LOOP=basicexport FB_MULTI_BUFFER=3#export QT_QPA_FB_TSLIB=1export QT_QPA_PLATFORM=eglfsexport QT_QPA_EGLFS_INTEGRATION=eglfs_vivexport QT_QPA_EGLFS_KMS_CONFIG=/etc/display.json#export QT_QPA_EGLFS_DISABLE_INPUT=1#export QT_QPA_EGLFS_HIDECURSOR=1#export QT_QPA_EVDEV_MOUSE_PARAMETERS=absexport QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=${TSLIB_TSDEVICE}:rotate=180export TSLIB_CALIBFILE=/etc/pointercalexport TSLIB_CONFFILE=/etc/ts.confexport TSLIB_PLUGINDIR=/usr/lib/ts#export TSLIB_CONSOLEDEVICE=none#export TSLIB_FBDEVICE=/dev/fb0#export TSLIB_TSEVENTTYPE=INPUTexport QT_GSTREAMER_CAMERABIN_VIDEOSRC=imxv4l2videosrcexport QWS_MOUSE_PROTO=tslib:${TSLIB_TSDEVICE} -
Press
Esc, then type:wqand hitEnterto save and exit.
Initial package install
Section titled “Initial package install”You will need to manually install the powerpack_2_0_0.deb package the first time, since the display-app won’t recognize it. Plug in the USB containing the release then do the following:
# sda1 and sdb1 represent the two USB ports. This will tell you which one yours is plugged into.ls /run/media/sda1/updates/allls /run/media/sdb1/updates/all
# Make filesystem read-write.mount -o remount,rw /
# Use sda1 or sdb1 for usb-folder, whichever has your drive.dpkg --install /run/media/<usb-folder>/updates/all/powerpack_2_0_0.debRun the app
Section titled “Run the app”Run the following command to start the app:
systemctl start startup-app@powerpack