System setup » History » Revision 2
Revision 1 (Alex Seferidis, 07/17/2025 01:00 PM) → Revision 2/4 (Alex Seferidis, 07/17/2025 01:00 PM)
# System setup We must created three services service 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 ```