summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-07-26 14:47:49 +0300
committerDevaev Maxim <[email protected]>2020-07-26 14:47:49 +0300
commitae92d3aafbbddec33cf1ea1bce47078b88838dab (patch)
treea6c701f7052c8f0976770d32aa292cef8957700e /configs
parent8cb487014c2db9d8ec71615330c4b4a8a003f10a (diff)
usb dongle support for rpi4
Diffstat (limited to 'configs')
-rw-r--r--configs/kvmd/main/v2-hdmiusb-rpi4.yaml74
-rw-r--r--configs/os/boot-config/v2-hdmiusb-rpi4.txt8
-rw-r--r--configs/os/cmdline/v2-hdmiusb-rpi4.sed0
-rw-r--r--configs/os/modules-load/v2-hdmiusb.conf2
-rw-r--r--configs/os/sudoers/v2-hdmiusb2
-rw-r--r--configs/os/udev/v2-hdmiusb-rpi4.rules5
6 files changed, 91 insertions, 0 deletions
diff --git a/configs/kvmd/main/v2-hdmiusb-rpi4.yaml b/configs/kvmd/main/v2-hdmiusb-rpi4.yaml
new file mode 100644
index 00000000..5927ac70
--- /dev/null
+++ b/configs/kvmd/main/v2-hdmiusb-rpi4.yaml
@@ -0,0 +1,74 @@
+# 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.yaml
+
+logging: !include logging.yaml
+
+kvmd:
+ server:
+ unix: /run/kvmd/kvmd.sock
+
+ auth: !include auth.yaml
+
+ hid:
+ type: otg
+ keyboard:
+ device: /dev/kvmd-hid-keyboard
+ mouse:
+ device: /dev/kvmd-hid-mouse
+
+ atx:
+ type: gpio
+ power_led_pin: 24
+ hdd_led_pin: 22
+ power_switch_pin: 23
+ reset_switch_pin: 27
+
+ msd:
+ type: otg
+
+ streamer:
+ quality: 0
+ resolution: 1920x1080
+ available_resolutions:
+ - 1920x1080
+ - 1600x1200
+ - 1360x768
+ - 1280x1024
+ - 1280x960
+ - 1280x720
+ - 1024x768
+ - 800x600
+ - 720x576
+ - 720x480
+ - 640x480
+ unix: /run/kvmd/ustreamer.sock
+ cmd:
+ - "/usr/bin/ustreamer"
+ - "--device=/dev/kvmd-video"
+ - "--persistent"
+ - "--format=jpeg"
+ - "--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"
+
+ipmi:
+ kvmd:
+ unix: /run/kvmd/kvmd.sock
+
+vnc:
+ kvmd:
+ unix: /run/kvmd/kvmd.sock
+
+ streamer:
+ unix: /run/kvmd/ustreamer.sock
diff --git a/configs/os/boot-config/v2-hdmiusb-rpi4.txt b/configs/os/boot-config/v2-hdmiusb-rpi4.txt
new file mode 100644
index 00000000..b034599c
--- /dev/null
+++ b/configs/os/boot-config/v2-hdmiusb-rpi4.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=dwc2
diff --git a/configs/os/cmdline/v2-hdmiusb-rpi4.sed b/configs/os/cmdline/v2-hdmiusb-rpi4.sed
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/configs/os/cmdline/v2-hdmiusb-rpi4.sed
diff --git a/configs/os/modules-load/v2-hdmiusb.conf b/configs/os/modules-load/v2-hdmiusb.conf
new file mode 100644
index 00000000..9c9626be
--- /dev/null
+++ b/configs/os/modules-load/v2-hdmiusb.conf
@@ -0,0 +1,2 @@
+dwc2
+libcomposite
diff --git a/configs/os/sudoers/v2-hdmiusb b/configs/os/sudoers/v2-hdmiusb
new file mode 100644
index 00000000..cc50dc9f
--- /dev/null
+++ b/configs/os/sudoers/v2-hdmiusb
@@ -0,0 +1,2 @@
+kvmd ALL=(ALL) NOPASSWD: /usr/bin/kvmd-helper-otgmsd-unlock
+kvmd ALL=(ALL) NOPASSWD: /usr/bin/kvmd-helper-otgmsd-remount
diff --git a/configs/os/udev/v2-hdmiusb-rpi4.rules b/configs/os/udev/v2-hdmiusb-rpi4.rules
new file mode 100644
index 00000000..f6710ea8
--- /dev/null
+++ b/configs/os/udev/v2-hdmiusb-rpi4.rules
@@ -0,0 +1,5 @@
+# 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=="1-1.4:1.0", GROUP="kvmd", SYMLINK+="kvmd-video"
+KERNEL=="hidg0", GROUP="kvmd", SYMLINK+="kvmd-hid-keyboard"
+KERNEL=="hidg1", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse"