summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PKGBUILD10
-rw-r--r--configs/kvmd/edid/v1-hdmi.hex16
-rw-r--r--configs/kvmd/main/v1-hdmi-rpi2.yaml47
-rw-r--r--configs/kvmd/main/v1-hdmi-rpi3.yaml63
-rw-r--r--configs/kvmd/main/v1-hdmi-zero2w.yaml63
-rw-r--r--configs/kvmd/main/v1-hdmiusb-rpi2.yaml59
-rw-r--r--configs/kvmd/main/v1-hdmiusb-rpi3.yaml67
-rw-r--r--configs/kvmd/main/v1-hdmiusb-zero2w.yaml67
-rw-r--r--configs/os/boot-config/v1-hdmi-rpi2.txt8
-rw-r--r--configs/os/boot-config/v1-hdmi-rpi3.txt9
-rw-r--r--configs/os/boot-config/v1-hdmi-zero2w.txt9
-rw-r--r--configs/os/boot-config/v1-hdmiusb-rpi2.txt7
-rw-r--r--configs/os/boot-config/v1-hdmiusb-rpi3.txt8
-rw-r--r--configs/os/boot-config/v1-hdmiusb-zero2w.txt8
-rw-r--r--configs/os/cmdline/v1-hdmi-rpi2.sed1
-rw-r--r--configs/os/cmdline/v1-hdmi-rpi3.sed1
-rw-r--r--configs/os/cmdline/v1-hdmi-zero2w.sed1
-rw-r--r--configs/os/cmdline/v1-hdmiusb-rpi2.sed0
-rw-r--r--configs/os/cmdline/v1-hdmiusb-rpi3.sed0
-rw-r--r--configs/os/cmdline/v1-hdmiusb-zero2w.sed0
-rw-r--r--configs/os/modules-load/v1-hdmi.conf1
-rw-r--r--configs/os/sudoers/v1-hdmi1
-rw-r--r--configs/os/sudoers/v1-hdmiusb1
-rw-r--r--configs/os/udev/v1-hdmi-rpi2.rules3
-rw-r--r--configs/os/udev/v1-hdmi-rpi3.rules3
-rw-r--r--configs/os/udev/v1-hdmi-zero2w.rules3
-rw-r--r--configs/os/udev/v1-hdmiusb-rpi2.rules3
-rw-r--r--configs/os/udev/v1-hdmiusb-rpi3.rules3
-rw-r--r--configs/os/udev/v1-hdmiusb-zero2w.rules3
29 files changed, 464 insertions, 1 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 869c5f94..be0dd922 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,6 +11,14 @@ _variants=(
v0-hdmiusb:rpi2
v0-hdmiusb:rpi3
+ v1-hdmi:zero2w
+ v1-hdmi:rpi2
+ v1-hdmi:rpi3
+
+ v1-hdmiusb:zero2w
+ v1-hdmiusb:rpi2
+ v1-hdmiusb:rpi3
+
v2-hdmi:zero2w
v2-hdmi:rpi3
v2-hdmi:rpi4
@@ -147,7 +155,7 @@ package_kvmd() {
install -Dm755 -t "$pkgdir/usr/bin" scripts/kvmd-{bootconfig,gencert,certbot}
- install -Dm644 -t "$pkgdir/usr/lib/systemd/system" configs/os/services/*
+ install -Dm644 -t "$pkgdir/usr/lib/systemd/system" configs/os/services/*.service
install -DTm644 configs/os/sysusers.conf "$pkgdir/usr/lib/sysusers.d/kvmd.conf"
install -DTm644 configs/os/tmpfiles.conf "$pkgdir/usr/lib/tmpfiles.d/kvmd.conf"
diff --git a/configs/kvmd/edid/v1-hdmi.hex b/configs/kvmd/edid/v1-hdmi.hex
new file mode 100644
index 00000000..d870783e
--- /dev/null
+++ b/configs/kvmd/edid/v1-hdmi.hex
@@ -0,0 +1,16 @@
+00FFFFFFFFFFFF0031D8888800888888
+1C150103800000780AEE91A3544C9926
+0F50543FCD0001000101010101010101
+010101010101011D007251D01E206E28
+5500C48E2100001E8C0AD08A20E02D10
+103E9600138E2100001E000000FC0050
+694B564D0A20202020202020000000FD
+003B3D0F2E0F1E0A202020202020013C
+02031D034E041303021211012021A23C
+3D3E1F66030C00300080E2007F8C0AD0
+8A20E02D10103E9600C48E210000188C
+0AD08A20E02D10103E9600138E210000
+189729A0D051842230509816009A0111
+00001800000000000000000000000000
+00000000000000000000000000000000
+0000000000000000000000000000006E
diff --git a/configs/kvmd/main/v1-hdmi-rpi2.yaml b/configs/kvmd/main/v1-hdmi-rpi2.yaml
new file mode 100644
index 00000000..c4d75748
--- /dev/null
+++ b/configs/kvmd/main/v1-hdmi-rpi2.yaml
@@ -0,0 +1,47 @@
+# Don't touch this file otherwise your device may stop working.
+# Use override.yaml to modify required settings.
+# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
+
+override: !include [override.d, override.yaml]
+
+logging: !include logging.yaml
+
+kvmd:
+ auth: !include auth.yaml
+
+ hid:
+ type: spi
+ chip: 0
+ bus: 0
+ sw_cs_pin: 7
+ sw_cs_per_byte: true
+ reset_pin: 25
+ reset_inverted: true
+ reset_self: true
+
+ atx:
+ type: gpio
+
+ msd:
+ type: disabled
+
+ streamer:
+ cmd:
+ - "/usr/bin/ustreamer"
+ - "--device=/dev/kvmd-video"
+ - "--persistent"
+ - "--dv-timings"
+ - "--format=uyvy"
+ - "--encoder=omx"
+ - "--workers=3"
+ - "--quality={quality}"
+ - "--desired-fps={desired_fps}"
+ - "--drop-same-frames=30"
+ - "--last-as-blank=0"
+ - "--unix={unix}"
+ - "--unix-rm"
+ - "--unix-mode=0660"
+ - "--exit-on-parent-death"
+ - "--process-name-prefix={process_name_prefix}"
+ - "--notify-parent"
+ - "--no-log-colors"
diff --git a/configs/kvmd/main/v1-hdmi-rpi3.yaml b/configs/kvmd/main/v1-hdmi-rpi3.yaml
new file mode 100644
index 00000000..e5421544
--- /dev/null
+++ b/configs/kvmd/main/v1-hdmi-rpi3.yaml
@@ -0,0 +1,63 @@
+# Don't touch this file otherwise your device may stop working.
+# Use override.yaml to modify required settings.
+# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
+
+override: !include [override.d, override.yaml]
+
+logging: !include logging.yaml
+
+kvmd:
+ auth: !include auth.yaml
+
+ hid:
+ type: spi
+ chip: 0
+ bus: 0
+ sw_cs_pin: 7
+ sw_cs_per_byte: true
+ reset_pin: 25
+ reset_inverted: true
+ reset_self: true
+
+ atx:
+ type: gpio
+
+ msd:
+ type: disabled
+
+ streamer:
+ h264_bitrate:
+ default: 5000
+ cmd:
+ - "/usr/bin/ustreamer"
+ - "--device=/dev/kvmd-video"
+ - "--persistent"
+ - "--dv-timings"
+ - "--format=uyvy"
+ - "--encoder=omx"
+ - "--workers=3"
+ - "--quality={quality}"
+ - "--desired-fps={desired_fps}"
+ - "--drop-same-frames=30"
+ - "--last-as-blank=0"
+ - "--unix={unix}"
+ - "--unix-rm"
+ - "--unix-mode=0660"
+ - "--exit-on-parent-death"
+ - "--process-name-prefix={process_name_prefix}"
+ - "--notify-parent"
+ - "--no-log-colors"
+ - "--sink=kvmd::ustreamer::jpeg"
+ - "--sink-mode=0660"
+ - "--h264-sink=kvmd::ustreamer::h264"
+ - "--h264-sink-mode=0660"
+ - "--h264-bitrate={h264_bitrate}"
+ - "--h264-gop={h264_gop}"
+
+
+vnc:
+ memsink:
+ jpeg:
+ sink: "kvmd::ustreamer::jpeg"
+ h264:
+ sink: "kvmd::ustreamer::h264"
diff --git a/configs/kvmd/main/v1-hdmi-zero2w.yaml b/configs/kvmd/main/v1-hdmi-zero2w.yaml
new file mode 100644
index 00000000..e5421544
--- /dev/null
+++ b/configs/kvmd/main/v1-hdmi-zero2w.yaml
@@ -0,0 +1,63 @@
+# Don't touch this file otherwise your device may stop working.
+# Use override.yaml to modify required settings.
+# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
+
+override: !include [override.d, override.yaml]
+
+logging: !include logging.yaml
+
+kvmd:
+ auth: !include auth.yaml
+
+ hid:
+ type: spi
+ chip: 0
+ bus: 0
+ sw_cs_pin: 7
+ sw_cs_per_byte: true
+ reset_pin: 25
+ reset_inverted: true
+ reset_self: true
+
+ atx:
+ type: gpio
+
+ msd:
+ type: disabled
+
+ streamer:
+ h264_bitrate:
+ default: 5000
+ cmd:
+ - "/usr/bin/ustreamer"
+ - "--device=/dev/kvmd-video"
+ - "--persistent"
+ - "--dv-timings"
+ - "--format=uyvy"
+ - "--encoder=omx"
+ - "--workers=3"
+ - "--quality={quality}"
+ - "--desired-fps={desired_fps}"
+ - "--drop-same-frames=30"
+ - "--last-as-blank=0"
+ - "--unix={unix}"
+ - "--unix-rm"
+ - "--unix-mode=0660"
+ - "--exit-on-parent-death"
+ - "--process-name-prefix={process_name_prefix}"
+ - "--notify-parent"
+ - "--no-log-colors"
+ - "--sink=kvmd::ustreamer::jpeg"
+ - "--sink-mode=0660"
+ - "--h264-sink=kvmd::ustreamer::h264"
+ - "--h264-sink-mode=0660"
+ - "--h264-bitrate={h264_bitrate}"
+ - "--h264-gop={h264_gop}"
+
+
+vnc:
+ memsink:
+ jpeg:
+ sink: "kvmd::ustreamer::jpeg"
+ h264:
+ sink: "kvmd::ustreamer::h264"
diff --git a/configs/kvmd/main/v1-hdmiusb-rpi2.yaml b/configs/kvmd/main/v1-hdmiusb-rpi2.yaml
new file mode 100644
index 00000000..d2c6be4b
--- /dev/null
+++ b/configs/kvmd/main/v1-hdmiusb-rpi2.yaml
@@ -0,0 +1,59 @@
+# Don't touch this file otherwise your device may stop working.
+# Use override.yaml to modify required settings.
+# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
+
+override: !include [override.d, override.yaml]
+
+logging: !include logging.yaml
+
+kvmd:
+ auth: !include auth.yaml
+
+ hid:
+ type: spi
+ chip: 0
+ bus: 0
+ sw_cs_pin: 7
+ sw_cs_per_byte: true
+ reset_pin: 25
+ reset_inverted: true
+ reset_self: true
+
+ atx:
+ type: gpio
+
+ msd:
+ type: disabled
+
+ streamer:
+ quality: 0
+ resolution:
+ default: 1920x1080
+ available:
+ - 1920x1080
+ - 1600x1200
+ - 1360x768
+ - 1280x1024
+ - 1280x960
+ - 1280x720
+ - 1024x768
+ - 800x600
+ - 720x576
+ - 720x480
+ - 640x480
+ cmd:
+ - "/usr/bin/ustreamer"
+ - "--device=/dev/kvmd-video"
+ - "--persistent"
+ - "--format=mjpeg"
+ - "--resolution={resolution}"
+ - "--desired-fps={desired_fps}"
+ - "--drop-same-frames=30"
+ - "--last-as-blank=0"
+ - "--unix={unix}"
+ - "--unix-rm"
+ - "--unix-mode=0660"
+ - "--exit-on-parent-death"
+ - "--process-name-prefix={process_name_prefix}"
+ - "--notify-parent"
+ - "--no-log-colors"
diff --git a/configs/kvmd/main/v1-hdmiusb-rpi3.yaml b/configs/kvmd/main/v1-hdmiusb-rpi3.yaml
new file mode 100644
index 00000000..ec3fbe21
--- /dev/null
+++ b/configs/kvmd/main/v1-hdmiusb-rpi3.yaml
@@ -0,0 +1,67 @@
+# Don't touch this file otherwise your device may stop working.
+# Use override.yaml to modify required settings.
+# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
+
+override: !include [override.d, override.yaml]
+
+logging: !include logging.yaml
+
+kvmd:
+ auth: !include auth.yaml
+
+ hid:
+ type: spi
+ chip: 0
+ bus: 0
+ sw_cs_pin: 7
+ sw_cs_per_byte: true
+ reset_pin: 25
+ reset_inverted: true
+ reset_self: true
+
+ atx:
+ type: gpio
+
+ msd:
+ type: disabled
+
+ streamer:
+ quality: 0
+ resolution:
+ default: 1920x1080
+ available:
+ - 1920x1080
+ - 1600x1200
+ - 1360x768
+ - 1280x1024
+ - 1280x960
+ - 1280x720
+ - 1024x768
+ - 800x600
+ - 720x576
+ - 720x480
+ - 640x480
+ cmd:
+ - "/usr/bin/ustreamer"
+ - "--device=/dev/kvmd-video"
+ - "--persistent"
+ - "--format=mjpeg"
+ - "--resolution={resolution}"
+ - "--desired-fps={desired_fps}"
+ - "--drop-same-frames=30"
+ - "--last-as-blank=0"
+ - "--unix={unix}"
+ - "--unix-rm"
+ - "--unix-mode=0660"
+ - "--exit-on-parent-death"
+ - "--process-name-prefix={process_name_prefix}"
+ - "--notify-parent"
+ - "--no-log-colors"
+ - "--sink=kvmd::ustreamer::jpeg"
+ - "--sink-mode=0660"
+
+
+vnc:
+ memsink:
+ jpeg:
+ sink: "kvmd::ustreamer::jpeg"
diff --git a/configs/kvmd/main/v1-hdmiusb-zero2w.yaml b/configs/kvmd/main/v1-hdmiusb-zero2w.yaml
new file mode 100644
index 00000000..ec3fbe21
--- /dev/null
+++ b/configs/kvmd/main/v1-hdmiusb-zero2w.yaml
@@ -0,0 +1,67 @@
+# Don't touch this file otherwise your device may stop working.
+# Use override.yaml to modify required settings.
+# You can find a working configuration in /usr/share/kvmd/configs.default/kvmd.
+
+override: !include [override.d, override.yaml]
+
+logging: !include logging.yaml
+
+kvmd:
+ auth: !include auth.yaml
+
+ hid:
+ type: spi
+ chip: 0
+ bus: 0
+ sw_cs_pin: 7
+ sw_cs_per_byte: true
+ reset_pin: 25
+ reset_inverted: true
+ reset_self: true
+
+ atx:
+ type: gpio
+
+ msd:
+ type: disabled
+
+ streamer:
+ quality: 0
+ resolution:
+ default: 1920x1080
+ available:
+ - 1920x1080
+ - 1600x1200
+ - 1360x768
+ - 1280x1024
+ - 1280x960
+ - 1280x720
+ - 1024x768
+ - 800x600
+ - 720x576
+ - 720x480
+ - 640x480
+ cmd:
+ - "/usr/bin/ustreamer"
+ - "--device=/dev/kvmd-video"
+ - "--persistent"
+ - "--format=mjpeg"
+ - "--resolution={resolution}"
+ - "--desired-fps={desired_fps}"
+ - "--drop-same-frames=30"
+ - "--last-as-blank=0"
+ - "--unix={unix}"
+ - "--unix-rm"
+ - "--unix-mode=0660"
+ - "--exit-on-parent-death"
+ - "--process-name-prefix={process_name_prefix}"
+ - "--notify-parent"
+ - "--no-log-colors"
+ - "--sink=kvmd::ustreamer::jpeg"
+ - "--sink-mode=0660"
+
+
+vnc:
+ memsink:
+ jpeg:
+ sink: "kvmd::ustreamer::jpeg"
diff --git a/configs/os/boot-config/v1-hdmi-rpi2.txt b/configs/os/boot-config/v1-hdmi-rpi2.txt
new file mode 100644
index 00000000..e94b342d
--- /dev/null
+++ b/configs/os/boot-config/v1-hdmi-rpi2.txt
@@ -0,0 +1,8 @@
+# See /boot/overlays/README for all available options
+initramfs initramfs-linux.img followkernel
+
+hdmi_force_hotplug=1
+gpu_mem=128
+enable_uart=1
+dtoverlay=tc358743,i2c_pins_28_29=1
+dtoverlay=spi0-1cs
diff --git a/configs/os/boot-config/v1-hdmi-rpi3.txt b/configs/os/boot-config/v1-hdmi-rpi3.txt
new file mode 100644
index 00000000..ad44d95c
--- /dev/null
+++ b/configs/os/boot-config/v1-hdmi-rpi3.txt
@@ -0,0 +1,9 @@
+# See /boot/overlays/README for all available options
+initramfs initramfs-linux.img followkernel
+
+hdmi_force_hotplug=1
+gpu_mem=128
+enable_uart=1
+dtoverlay=tc358743
+dtoverlay=disable-bt
+dtoverlay=spi0-1cs
diff --git a/configs/os/boot-config/v1-hdmi-zero2w.txt b/configs/os/boot-config/v1-hdmi-zero2w.txt
new file mode 100644
index 00000000..0a1e9009
--- /dev/null
+++ b/configs/os/boot-config/v1-hdmi-zero2w.txt
@@ -0,0 +1,9 @@
+# See /boot/overlays/README for all available options
+initramfs initramfs-linux.img followkernel
+
+hdmi_force_hotplug=1
+gpu_mem=96
+enable_uart=1
+dtoverlay=tc358743,i2c_pins_28_29=1
+dtoverlay=disable-bt
+dtoverlay=spi0-1cs
diff --git a/configs/os/boot-config/v1-hdmiusb-rpi2.txt b/configs/os/boot-config/v1-hdmiusb-rpi2.txt
new file mode 100644
index 00000000..9957f1a4
--- /dev/null
+++ b/configs/os/boot-config/v1-hdmiusb-rpi2.txt
@@ -0,0 +1,7 @@
+# See /boot/overlays/README for all available options
+initramfs initramfs-linux.img followkernel
+
+hdmi_force_hotplug=1
+gpu_mem=16
+enable_uart=1
+dtoverlay=spi0-1cs
diff --git a/configs/os/boot-config/v1-hdmiusb-rpi3.txt b/configs/os/boot-config/v1-hdmiusb-rpi3.txt
new file mode 100644
index 00000000..fe4ce032
--- /dev/null
+++ b/configs/os/boot-config/v1-hdmiusb-rpi3.txt
@@ -0,0 +1,8 @@
+# See /boot/overlays/README for all available options
+initramfs initramfs-linux.img followkernel
+
+hdmi_force_hotplug=1
+gpu_mem=16
+enable_uart=1
+dtoverlay=disable-bt
+dtoverlay=spi0-1cs
diff --git a/configs/os/boot-config/v1-hdmiusb-zero2w.txt b/configs/os/boot-config/v1-hdmiusb-zero2w.txt
new file mode 100644
index 00000000..fe4ce032
--- /dev/null
+++ b/configs/os/boot-config/v1-hdmiusb-zero2w.txt
@@ -0,0 +1,8 @@
+# See /boot/overlays/README for all available options
+initramfs initramfs-linux.img followkernel
+
+hdmi_force_hotplug=1
+gpu_mem=16
+enable_uart=1
+dtoverlay=disable-bt
+dtoverlay=spi0-1cs
diff --git a/configs/os/cmdline/v1-hdmi-rpi2.sed b/configs/os/cmdline/v1-hdmi-rpi2.sed
new file mode 100644
index 00000000..803b9b03
--- /dev/null
+++ b/configs/os/cmdline/v1-hdmi-rpi2.sed
@@ -0,0 +1 @@
+s/rootwait/cma=128M rootwait/g
diff --git a/configs/os/cmdline/v1-hdmi-rpi3.sed b/configs/os/cmdline/v1-hdmi-rpi3.sed
new file mode 100644
index 00000000..803b9b03
--- /dev/null
+++ b/configs/os/cmdline/v1-hdmi-rpi3.sed
@@ -0,0 +1 @@
+s/rootwait/cma=128M rootwait/g
diff --git a/configs/os/cmdline/v1-hdmi-zero2w.sed b/configs/os/cmdline/v1-hdmi-zero2w.sed
new file mode 100644
index 00000000..f350c89c
--- /dev/null
+++ b/configs/os/cmdline/v1-hdmi-zero2w.sed
@@ -0,0 +1 @@
+s/rootwait/cma=96M rootwait/g
diff --git a/configs/os/cmdline/v1-hdmiusb-rpi2.sed b/configs/os/cmdline/v1-hdmiusb-rpi2.sed
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/configs/os/cmdline/v1-hdmiusb-rpi2.sed
diff --git a/configs/os/cmdline/v1-hdmiusb-rpi3.sed b/configs/os/cmdline/v1-hdmiusb-rpi3.sed
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/configs/os/cmdline/v1-hdmiusb-rpi3.sed
diff --git a/configs/os/cmdline/v1-hdmiusb-zero2w.sed b/configs/os/cmdline/v1-hdmiusb-zero2w.sed
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/configs/os/cmdline/v1-hdmiusb-zero2w.sed
diff --git a/configs/os/modules-load/v1-hdmi.conf b/configs/os/modules-load/v1-hdmi.conf
new file mode 100644
index 00000000..5be25408
--- /dev/null
+++ b/configs/os/modules-load/v1-hdmi.conf
@@ -0,0 +1 @@
+tc358743
diff --git a/configs/os/sudoers/v1-hdmi b/configs/os/sudoers/v1-hdmi
new file mode 100644
index 00000000..bb549dc8
--- /dev/null
+++ b/configs/os/sudoers/v1-hdmi
@@ -0,0 +1 @@
+kvmd-pst ALL=(ALL) NOPASSWD: /usr/bin/kvmd-helper-pst-remount
diff --git a/configs/os/sudoers/v1-hdmiusb b/configs/os/sudoers/v1-hdmiusb
new file mode 100644
index 00000000..bb549dc8
--- /dev/null
+++ b/configs/os/sudoers/v1-hdmiusb
@@ -0,0 +1 @@
+kvmd-pst ALL=(ALL) NOPASSWD: /usr/bin/kvmd-helper-pst-remount
diff --git a/configs/os/udev/v1-hdmi-rpi2.rules b/configs/os/udev/v1-hdmi-rpi2.rules
new file mode 100644
index 00000000..49ca9ce0
--- /dev/null
+++ b/configs/os/udev/v1-hdmi-rpi2.rules
@@ -0,0 +1,3 @@
+# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
+# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
+KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="3f801000.csi|3f801000.csi1", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"
diff --git a/configs/os/udev/v1-hdmi-rpi3.rules b/configs/os/udev/v1-hdmi-rpi3.rules
new file mode 100644
index 00000000..49ca9ce0
--- /dev/null
+++ b/configs/os/udev/v1-hdmi-rpi3.rules
@@ -0,0 +1,3 @@
+# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
+# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
+KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="3f801000.csi|3f801000.csi1", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"
diff --git a/configs/os/udev/v1-hdmi-zero2w.rules b/configs/os/udev/v1-hdmi-zero2w.rules
new file mode 100644
index 00000000..49ca9ce0
--- /dev/null
+++ b/configs/os/udev/v1-hdmi-zero2w.rules
@@ -0,0 +1,3 @@
+# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
+# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
+KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", KERNELS=="3f801000.csi|3f801000.csi1", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"
diff --git a/configs/os/udev/v1-hdmiusb-rpi2.rules b/configs/os/udev/v1-hdmiusb-rpi2.rules
new file mode 100644
index 00000000..eafd8ef8
--- /dev/null
+++ b/configs/os/udev/v1-hdmiusb-rpi2.rules
@@ -0,0 +1,3 @@
+# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
+# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
+KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", PROGRAM="/usr/bin/kvmd-udev-hdmiusb-check rpi2 %b", ATTR{index}=="0", GROUP="kvmd", SYMLINK+="kvmd-video"
diff --git a/configs/os/udev/v1-hdmiusb-rpi3.rules b/configs/os/udev/v1-hdmiusb-rpi3.rules
new file mode 100644
index 00000000..f28bdfae
--- /dev/null
+++ b/configs/os/udev/v1-hdmiusb-rpi3.rules
@@ -0,0 +1,3 @@
+# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
+# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
+KERNEL=="video[0-9]*", SUBSYSTEM=="video4linux", PROGRAM="/usr/bin/kvmd-udev-hdmiusb-check rpi3 %b", ATTR{index}=="0", GROUP="kvmd", SYMLINK+="kvmd-video"
diff --git a/configs/os/udev/v1-hdmiusb-zero2w.rules b/configs/os/udev/v1-hdmiusb-zero2w.rules
new file mode 100644
index 00000000..1a2a6f7d
--- /dev/null
+++ b/configs/os/udev/v1-hdmiusb-zero2w.rules
@@ -0,0 +1,3 @@
+# https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
+# https://wiki.archlinux.org/index.php/Udev#Setting_static_device_names
+KERNEL=="video0", SUBSYSTEM=="video4linux", GROUP="kvmd", SYMLINK+="kvmd-video"