allow to start the APP headless see #4

main
Links 2022-04-14 14:00:00 +02:00
rodzic c842be0110
commit b1b89339a0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 68FB9F01C0C482FC
2 zmienionych plików z 27 dodań i 0 usunięć

Wyświetl plik

@ -1,4 +1,5 @@
#!/bin/bash
set -e
if [ "$1" == "start" ] ; then
mkdir -p /mnt/x6100
@ -23,6 +24,9 @@ if [ "$1" == "start" ] ; then
mkdir -p /mnt/x6100/tmp/dbus
mount -o bind /var/run/dbus /mnt/x6100/tmp/dbus
touch /root/qtkmsconfig.json
mount -o bind,ro /root/qtkmsconfig.json /mnt/x6100/etc/qtkmsconfig.json
#mount -o bind,ro /usr/lib/arm-linux-gnueabihf/alsa-lib/libasound_module_pcm_pulse.so /mnt/x6100/usr/lib/alsa-lib/libasound_module_pcm_pulse.so
#mount -o bind,ro /root/asound_x6100_app.conf /mnt/x6100/etc/asound.conf

Wyświetl plik

@ -7,5 +7,28 @@ function cleanup()
trap cleanup EXIT
trap cleanup SIGINT
if grep -r "x6100_app_hide=1" /proc/cmdline > /dev/null ; then
cat > /root/qtkmsconfig.json <<EOL
{
"device": "/dev/dri/renderD128",
"headless": "800x480"
}
EOL
else
cat > /root/qtkmsconfig.json <<EOL
{
"device": "/dev/dri/card1",
"hwcursor": false,
"pbuffers": true,
"outputs": [
{
"name": "LCD",
"mode": "800x480"
}
]
}
EOL
fi
echo 1 > /sys/class/gpio/gpio138/value
chroot /mnt/x6100 /bin/bash -c 'source /etc/profile && nice --5 /usr/app_qt/x6100_ui_v100'