This commit is contained in:
Maxim Devaev 2023-08-04 00:37:41 +03:00
parent c96057772c
commit 318724e3ae
29 changed files with 464 additions and 1 deletions

View File

@ -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"

View File

@ -0,0 +1,16 @@
00FFFFFFFFFFFF0031D8888800888888
1C150103800000780AEE91A3544C9926
0F50543FCD0001000101010101010101
010101010101011D007251D01E206E28
5500C48E2100001E8C0AD08A20E02D10
103E9600138E2100001E000000FC0050
694B564D0A20202020202020000000FD
003B3D0F2E0F1E0A202020202020013C
02031D034E041303021211012021A23C
3D3E1F66030C00300080E2007F8C0AD0
8A20E02D10103E9600C48E210000188C
0AD08A20E02D10103E9600138E210000
189729A0D051842230509816009A0111
00001800000000000000000000000000
00000000000000000000000000000000
0000000000000000000000000000006E

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1 @@
s/rootwait/cma=128M rootwait/g

View File

@ -0,0 +1 @@
s/rootwait/cma=128M rootwait/g

View File

@ -0,0 +1 @@
s/rootwait/cma=96M rootwait/g

View File

View File

View File

View File

@ -0,0 +1 @@
tc358743

View File

@ -0,0 +1 @@
kvmd-pst ALL=(ALL) NOPASSWD: /usr/bin/kvmd-helper-pst-remount

View File

@ -0,0 +1 @@
kvmd-pst ALL=(ALL) NOPASSWD: /usr/bin/kvmd-helper-pst-remount

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"