Index: .vscode/settings.json =================================================================== diff -u --- .vscode/settings.json (revision 0) +++ .vscode/settings.json (revision 52b3e9d9bd12992d47d4875c0f7529f3c1f0a24f) @@ -0,0 +1,14 @@ +{ + "python.autoComplete.extraPaths": [ + "${workspaceFolder}/sources/poky/bitbake/lib", + "${workspaceFolder}/sources/poky/meta/lib" + ], + "python.analysis.extraPaths": [ + "${workspaceFolder}/sources/poky/bitbake/lib", + "${workspaceFolder}/sources/poky/meta/lib" + ], + "files.associations": { + "*.conf": "bitbake", + "*.inc": "bitbake" + } +} \ No newline at end of file Index: recipes-bsp/manufacturing/files/eglfs.json =================================================================== diff -u --- recipes-bsp/manufacturing/files/eglfs.json (revision 0) +++ recipes-bsp/manufacturing/files/eglfs.json (revision 52b3e9d9bd12992d47d4875c0f7529f3c1f0a24f) @@ -0,0 +1,3 @@ +{ + "device": "/dev/dri/card1" +} Index: recipes-bsp/manufacturing/files/leahi =================================================================== diff -u Binary files differ Index: recipes-bsp/manufacturing/files/leahi.service =================================================================== diff -u --- recipes-bsp/manufacturing/files/leahi.service (revision 0) +++ recipes-bsp/manufacturing/files/leahi.service (revision 52b3e9d9bd12992d47d4875c0f7529f3c1f0a24f) @@ -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: recipes-bsp/manufacturing/files/run.sh =================================================================== diff -u --- recipes-bsp/manufacturing/files/run.sh (revision 0) +++ recipes-bsp/manufacturing/files/run.sh (revision 52b3e9d9bd12992d47d4875c0f7529f3c1f0a24f) @@ -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 Index: recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb =================================================================== diff -u --- recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb (revision 0) +++ recipes-bsp/manufacturing/leahi-manufacturing_1.0.bb (revision 52b3e9d9bd12992d47d4875c0f7529f3c1f0a24f) @@ -0,0 +1,44 @@ +DESCRIPTION = "Leahi manufacturing application" +LICENSE = "CLOSED" + +SRC_URI += " \ + file://eglfs.json \ + file://run.sh \ + file://leahi \ + file://leahi.service \ +" + +# define the leahi service +inherit systemd +SYSTEMD_SERVICE:${PN} = "leahi.service" + +# TODO +# 1 - get files from git repository +do_install() { + bbplain " ---------- Leahi: Install manufacturing" + # build the required folders + install -d ${D}/opt/leahi/manufacturing/ + + # installing the required files + install -m 0644 ${WORKDIR}/leahi ${D}/opt/leahi/manufacturing/ + install -m 0644 ${WORKDIR}/run.sh ${D}/opt/leahi/manufacturing/ + install -m 0644 ${WORKDIR}/eglfs.json ${D}/opt/leahi/eglfs.json + + # give the execution permission to owner + chmod 755 ${D}/opt/leahi/manufacturing/leahi + chmod 755 ${D}/opt/leahi/manufacturing/run.sh + + # setting up the leahi service + install -d ${D}${systemd_system_unitdir} + install -m 644 ${WORKDIR}/leahi.service ${D}${systemd_system_unitdir} +} + +FILES:${PN} += "/opt/leahi/*" + +RDEPENDS:${PN} += " \ + qtbase \ + qtconnectivity \ + qtserialbus \ + qtdeclarative \ + qtquickcontrols \ +" Index: recipes-core/images/ely-image-qt.bb =================================================================== diff -u -rb522375558f7298c30d1e8bdc4782e3600b0ba52 -r52b3e9d9bd12992d47d4875c0f7529f3c1f0a24f --- recipes-core/images/ely-image-qt.bb (.../ely-image-qt.bb) (revision b522375558f7298c30d1e8bdc4782e3600b0ba52) +++ recipes-core/images/ely-image-qt.bb (.../ely-image-qt.bb) (revision 52b3e9d9bd12992d47d4875c0f7529f3c1f0a24f) @@ -9,6 +9,7 @@ # Remove the windows managers DISTRO_FEATURES:remove = "x11 wayland vulcan weston" +IMAGE_FEATURES:remove = "dey-qt" # Add extra tools SOC_PACKAGES = " \ @@ -19,7 +20,7 @@ htop \ can-utils \ leahi-fonts \ - util-linux \ + util-linux-sfdisk \ " SOC_PACKAGES:ccimx6 = "imx-gpu-viv-demos imx-gpu-viv-tools" @@ -74,4 +75,5 @@ qtconnectivity \ qtquickcontrols2 \ qtvirtualkeyboard \ + qtgraphicaleffects \ "