diff --git a/.gitignore b/.gitignore index 40fd14c..0e8144e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -vcpi.img.xz - +vcpi.img diff --git a/patch/native.vcv b/patch/native.vcv new file mode 100644 index 0000000..68d09d2 Binary files /dev/null and b/patch/native.vcv differ diff --git a/prepare-image.sh b/prepare-image.sh index 271974c..5b5c29e 100755 --- a/prepare-image.sh +++ b/prepare-image.sh @@ -30,16 +30,27 @@ chown 1000:1000 /tmp/rpi-img/home/pi/.ssh/authorized_keys #provision scripts 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 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 -#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 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" read diff --git a/src/payload.service b/src/payload.service new file mode 100644 index 0000000..65eb450 --- /dev/null +++ b/src/payload.service @@ -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