Skip to content

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.

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:

Terminal window
cp /etc/profile.d/bam-mrsdisp.profile /etc/profile.d/powerpack-mrsdisp.profile

However, if that doesn’t work, or if the file doesn’t exist, do the following:

  1. Create a new executable .profile file and open the text editor:

    Terminal window
    cd /etc/profile.d
    touch powerpack-mrsdisp.profile
    chmod +x powerpack-mrsdisp.profile
    vi powerpack-mrsdisp.profile
  2. Press I to edit, then paste in the following:

    #!/bin/sh
    #
    # Copyright 2020 MRS Electronic GmbH & Co. KG
    #
    ident="0"
    fb="/dev/fb0"
    if [ -f $0 ] ; then
    script=$(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}" in
    1) fb="/dev/fb2" ;;
    0) fb="/dev/fb0" ;;
    *) ;;
    esac
    fi
    [ -f /etc/profile.d/${ident}-tslib.profile ] && . /etc/profile.d/${ident}-tslib.profile
    PATH=$PATH:/opt/bin
    export QT_QPA_EGLFS_FB=${fb}
    export QSG_RENDER_LOOP=basic
    export FB_MULTI_BUFFER=3
    #export QT_QPA_FB_TSLIB=1
    export QT_QPA_PLATFORM=eglfs
    export QT_QPA_EGLFS_INTEGRATION=eglfs_viv
    export 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=abs
    export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=${TSLIB_TSDEVICE}:rotate=180
    export TSLIB_CALIBFILE=/etc/pointercal
    export TSLIB_CONFFILE=/etc/ts.conf
    export TSLIB_PLUGINDIR=/usr/lib/ts
    #export TSLIB_CONSOLEDEVICE=none
    #export TSLIB_FBDEVICE=/dev/fb0
    #export TSLIB_TSEVENTTYPE=INPUT
    export QT_GSTREAMER_CAMERABIN_VIDEOSRC=imxv4l2videosrc
    export QWS_MOUSE_PROTO=tslib:${TSLIB_TSDEVICE}
  3. Press Esc, then type :wq and hit Enter to save and exit.

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:

Terminal window
# sda1 and sdb1 represent the two USB ports. This will tell you which one yours is plugged into.
ls /run/media/sda1/updates/all
ls /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.deb

Run the following command to start the app:

Terminal window
systemctl start startup-app@powerpack