Index: eglfs.json =================================================================== diff -u --- eglfs.json (revision 0) +++ eglfs.json (revision c95336b6d1137cefa1029cd94385d3dd5f49be01) @@ -0,0 +1,3 @@ +{ + "device": "/dev/dri/card1" +} Index: leahi =================================================================== diff -u Binary files differ Index: leahi.service =================================================================== diff -u --- leahi.service (revision 0) +++ leahi.service (revision c95336b6d1137cefa1029cd94385d3dd5f49be01) @@ -0,0 +1,13 @@ +[Unit] +Description=Leahi application and services +After=network.target + +[Service] +Type=forking +ExecStart=/opt/leahi/manufacturing/run.sh start +ExecStop=/opt/leahi/manufacturing/run.sh stop +StandardOutput=journal +StandardError=journal + +[Install] +WantedBy=multi-user.target Index: run.sh =================================================================== diff -u --- run.sh (revision 0) +++ run.sh (revision c95336b6d1137cefa1029cd94385d3dd5f49be01) @@ -0,0 +1,34 @@ +#!/bin/sh + +export P_CANBUS="can0" +export SSID_NAME="DilaityIoT" +export SSID_PASS="E6ACB9855B948EC3" +export TEMP=/tmp +export WORKSPACE=/opt/leahi +export MANUFACTURING=$WORKSPACE/manufacturing +export LOGFILE=$TEMP/leahi.manufacturing.log +export DATE="date +%Y%m%d%H%M%S" + +# the application needs this variable to be correctly set to susccessfully launch. +# the egls.json file shall also correctly set and put in the pointing location. +export QT_QPA_EGLFS_KMS_CONFIG=$WORKSPACE/eglfs.json + +# TODO: +# 1 - separate the run.sh and the application service ( and even the cloudsync too ) +# 2 - mv LOGNAME post.log +# + +echo "" > $LOGFILE 2>&1 +echo "[$($DATE)] Starting" >> $LOGFILE 2>&1 + +echo "[$($DATE)] Configuring the canbus '$P_CANBUS'" >> $LOGFILE 2>&1 +ip link set $P_CANBUS up type can bitrate 250000 restart-ms 100 >> $LOGFILE 2>&1 +ifconfig $P_CANBUS txqueuelen 4000 >> $LOGFILE 2>&1 + +echo "[$($DATE)] Configuring wifi '$SSID_NAME' connection" >> $LOGFILE 2>&1 +nmcli dev wifi connect "$SSID_NAME" password "$SSID_PASS" >> $LOGFILE 2>&1 + +cd $MANUFACTURING +echo "[$($DATE)] Application starting in '$(pwd)'" >> $LOGFILE 2>&1 +$MANUFACTURING/leahi -E --platform eglfs >> $LOGFILE 2>&1 & +echo "[$($DATE)] Application launched" >> $LOGFILE 2>&1