setup cardinal with autorun and default patch

This commit is contained in:
deflax 2024-11-14 00:16:38 +02:00 committed by Daniel Krastev
parent f3d8d16e1a
commit fa1fc3f0b9
4 changed files with 31 additions and 5 deletions

3
.gitignore vendored
View file

@ -1,2 +1 @@
vcpi.img.xz vcpi.img

BIN
patch/native.vcv Normal file

Binary file not shown.

View file

@ -30,16 +30,27 @@ chown 1000:1000 /tmp/rpi-img/home/pi/.ssh/authorized_keys
#provision scripts #provision scripts
cp -v ./src/setup.sh /tmp/rpi-img/root/setup.sh cp -v ./src/setup.sh /tmp/rpi-img/root/setup.sh
#enable systemd-time-wait-sync
ln -v -s /lib/systemd/system/systemd-time-wait-sync.service /tmp/rpi-img/etc/systemd/system/sysinit.target.wants/systemd-time-wait-sync.service
#setup autorun on first boot #setup autorun on first boot
cp -v ./src/firstboot.service /tmp/rpi-img/lib/systemd/system/firstboot.service cp -v ./src/firstboot.service /tmp/rpi-img/lib/systemd/system/firstboot.service
ln -v -s /lib/systemd/system/firstboot.service /tmp/rpi-img/etc/systemd/system/multi-user.target.wants ln -v -s /lib/systemd/system/firstboot.service /tmp/rpi-img/etc/systemd/system/multi-user.target.wants
#enable systemd-time-wait-sync
ln -v -s /lib/systemd/system/systemd-time-wait-sync.service /tmp/rpi-img/etc/systemd/system/sysinit.target.wants/systemd-time-wait-sync.service
# disable built-in audio # disable built-in audio
sed -i 's/^dtparam=audio=on/#&/' /tmp/rpi-img/boot/config.txt sed -i 's/^dtparam=audio=on/#&/' /tmp/rpi-img/boot/config.txt
# setup Cardinal
mkdir -v /tmp/rpi-img/opt/Cardinal
wget https://github.com/DISTRHO/Cardinal/releases/download/24.09/Cardinal-linux-aarch64-24.09.tar.gz -O /tmp/rpi-img/opt/Cardinal/Cardinal-linux-aarch64.tar.gz
tar -xzvf /tmp/rpi-img/opt/Cardinal/Cardinal-linux-aarch64.tar.gz -C /tmp/rpi-img/opt/Cardinal/ CardinalNative
# setup GUI payload
ln -v -s /lib/systemd/system/payload.service /tmp/rpi-img/etc/systemd/system/graphical.target.wants
# deploy native patch
cp -v ./patch/native.vcv /home/pi/Documents/templates/native.vcv
echo "] press enter to write the image" echo "] press enter to write the image"
read read

16
src/payload.service Normal file
View file

@ -0,0 +1,16 @@
[Unit]
Description=Start GUI Payload
[Service]
Environment=DISPLAY=:0
Environment=XAUTHORITY=/home/pi/.Xauthority
User=pi
Group=pi
ExecStart=/opt/Cardinal/CardinalNative
Restart=always
RestartSec=10s
KillMode=process
TimeoutSec=infinity
[Install]
WantedBy=graphical.target