Project

General

Profile

Actions

System setup » History » Revision 3

« Previous | Revision 3/4 (diff) | Next »
Alex Seferidis, 07/21/2025 09:28 AM


System setup

We must create three services on the device

init_system service

Create file /etc/systemd/system/init_system.service

[Unit]
Description=Init python script
After=network.target

[Service]
WorkingDirectory=/data/firmware/htdocs/python
ExecStart=/usr/bin/python3 /data/firmware/htdocs/python/init.py

[Install]
WantedBy=multi-user.target

lemcoplayer service

Create file /etc/systemd/system/lemcoplayer.service

[Unit]
Description=Application startup script
After=network.target

StartLimitIntervalSec=60
StartLimitBurst=5

[Service]
Type=simple
Restart=always
RestartSec=7
ExecStartPre=/bin/sleep 1
ExecStartPre=systemctl stop externalplayer
ExecStartPre=/bin/sleep 1
ExecStartPre=-modetest -M rockchip -w 57:zpos:1
ExecStartPre=-modetest -M rockchip -w 73:zpos:0
ExecStartPre=echo 0 >/sys/class/graphics/fb0/blank
ExecStartPre=-/data/firmware/htdocs/python/init.sh
#ExecStartPre=echo 0 > /sys/bus/usb/devices/3-1/authorized
#ExecStartPre=echo 1 > /sys/bus/usb/devices/3-1/authorized
Environment="GST_MPP_DEC_DEFAULT_IGNORE_ERROR=0"
Environment="QT_QPA_PLATFORM=eglfs"
Environment="QT_QPA_EGLFS_KMS_CONFIG=/home/root/eglfs.conf"
#Environment="QTWEBENGINE_REMOTE_DEBUGGING=192.168.1.215:2345"
Environment="QML_XHR_ALLOW_FILE_READ=1"
Environment="GST_VIDEO_FLIP_USE_RGA=1"
Environment="GST_VIDEO_CONVERT_USE_RGA=1"
Environment="QT_QPA_EVDEV_KEYBOARD_PARAMETERS=keymap=/home/root/extra.qmap"
ExecStart=/data/firmware/lemcoplayer --no-sandbox --enable-gpu-rasterization --ignore-gpu-blocklist --enable-accelerated-video-decode --disable-web-security --autoplay-policy=no-user-gesture-required --allow-running-insecure-content


[Install]
WantedBy=multi-user.target

externalplayer service

[Unit]
Description=Application external player script
After=network.target

StartLimitIntervalSec=60
StartLimitBurst=0

[Service]
Type=simple
Restart=always
RestartSec=7
Environment="GST_MPP_DEC_DEFAULT_IGNORE_ERROR=0"
Environment="GST_VIDEO_FLIP_USE_RGA=1"
Environment="GST_VIDEO_CONVERT_USE_RGA=1"
ExecStart=/data/firmware/externalplayer

[Install]
WantedBy=multi-user.target

Then execute:

systemctl daemon-reload
systemctl enable init_system
systemctl enable lemcoplayer
systemctl enable externalplayer

Updated by Alex Seferidis 5 months ago · 3 revisions