summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-07-26 20:12:44 +0300
committerDevaev Maxim <[email protected]>2020-07-26 20:12:44 +0300
commit409ec74a75d94c7f28adf356b762d5b0aa9047d6 (patch)
tree1d2103c0b7d16f43a0a371ffc3b2df4602d7c140
parentcebd94a9335c25373ab521b8477212a745735956 (diff)
hdmiusb for rpi2 and rpi3
-rw-r--r--PKGBUILD23
-rw-r--r--configs/kvmd/main/v0-hdmiusb-rpi2.yaml72
-rw-r--r--configs/kvmd/main/v0-hdmiusb-rpi3.yaml72
-rw-r--r--configs/os/boot-config/v0-hdmiusb-rpi2.txt6
-rw-r--r--configs/os/boot-config/v0-hdmiusb-rpi3.txt7
-rw-r--r--configs/os/cmdline/v0-hdmiusb-rpi2.sed2
-rw-r--r--configs/os/cmdline/v0-hdmiusb-rpi3.sed2
-rw-r--r--configs/os/udev/v0-hdmiusb-rpi2.rules4
-rw-r--r--configs/os/udev/v0-hdmiusb-rpi3.rules4
9 files changed, 186 insertions, 6 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 6370ecec..6a62f0e6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,12 +2,23 @@
# Author: Maxim Devaev <[email protected]>
-_variants=(v2-hdmi:rpi4 v2-hdmi:zerow v2-hdmiusb:rpi4)
-for _platform in v0-vga v0-hdmi v1-vga v1-hdmi; do
- for _board in rpi2 rpi3; do
- _variants+=($_platform:$_board)
- done
-done
+_variants=(
+ v0-vga:rpi2
+ v0-vga:rpi3
+ v0-hdmi:rpi2
+ v0-hdmi:rpi3
+ v0-hdmiusb:rpi2
+ v0-hdmiusb:rpi3
+
+ v1-vga:rpi2
+ v1-vga:rpi3
+ v1-hdmi-rpi2
+ v1-hdmi-rpi3
+
+ v2-hdmi:zerow
+ v2-hdmi:rpi4
+ v2-hdmiusb:rpi4
+)
pkgname=(kvmd)
diff --git a/configs/kvmd/main/v0-hdmiusb-rpi2.yaml b/configs/kvmd/main/v0-hdmiusb-rpi2.yaml
new file mode 100644
index 00000000..879d304d
--- /dev/null
+++ b/configs/kvmd/main/v0-hdmiusb-rpi2.yaml
@@ -0,0 +1,72 @@
+# 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: serial
+ reset_pin: 4
+ device: /dev/kvmd-hid
+
+ atx:
+ type: gpio
+ power_led_pin: 24
+ hdd_led_pin: 22
+ power_switch_pin: 23
+ reset_switch_pin: 27
+
+ msd:
+ type: disabled
+
+ 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/kvmd/main/v0-hdmiusb-rpi3.yaml b/configs/kvmd/main/v0-hdmiusb-rpi3.yaml
new file mode 100644
index 00000000..879d304d
--- /dev/null
+++ b/configs/kvmd/main/v0-hdmiusb-rpi3.yaml
@@ -0,0 +1,72 @@
+# 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: serial
+ reset_pin: 4
+ device: /dev/kvmd-hid
+
+ atx:
+ type: gpio
+ power_led_pin: 24
+ hdd_led_pin: 22
+ power_switch_pin: 23
+ reset_switch_pin: 27
+
+ msd:
+ type: disabled
+
+ 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/v0-hdmiusb-rpi2.txt b/configs/os/boot-config/v0-hdmiusb-rpi2.txt
new file mode 100644
index 00000000..d78de4ae
--- /dev/null
+++ b/configs/os/boot-config/v0-hdmiusb-rpi2.txt
@@ -0,0 +1,6 @@
+# See /boot/overlays/README for all available options
+initramfs initramfs-linux.img followkernel
+
+hdmi_force_hotplug=1
+gpu_mem=16
+enable_uart=1
diff --git a/configs/os/boot-config/v0-hdmiusb-rpi3.txt b/configs/os/boot-config/v0-hdmiusb-rpi3.txt
new file mode 100644
index 00000000..5d41ab3c
--- /dev/null
+++ b/configs/os/boot-config/v0-hdmiusb-rpi3.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=disable-bt
diff --git a/configs/os/cmdline/v0-hdmiusb-rpi2.sed b/configs/os/cmdline/v0-hdmiusb-rpi2.sed
new file mode 100644
index 00000000..57f42700
--- /dev/null
+++ b/configs/os/cmdline/v0-hdmiusb-rpi2.sed
@@ -0,0 +1,2 @@
+s/console=ttyAMA0\,115200//g
+s/kgdboc=ttyAMA0\,115200//g
diff --git a/configs/os/cmdline/v0-hdmiusb-rpi3.sed b/configs/os/cmdline/v0-hdmiusb-rpi3.sed
new file mode 100644
index 00000000..57f42700
--- /dev/null
+++ b/configs/os/cmdline/v0-hdmiusb-rpi3.sed
@@ -0,0 +1,2 @@
+s/console=ttyAMA0\,115200//g
+s/kgdboc=ttyAMA0\,115200//g
diff --git a/configs/os/udev/v0-hdmiusb-rpi2.rules b/configs/os/udev/v0-hdmiusb-rpi2.rules
new file mode 100644
index 00000000..dcbae9b8
--- /dev/null
+++ b/configs/os/udev/v0-hdmiusb-rpi2.rules
@@ -0,0 +1,4 @@
+# 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.5:1.0", GROUP="kvmd", SYMLINK+="kvmd-video"
+KERNEL=="ttyAMA0", SYMLINK+="kvmd-hid"
diff --git a/configs/os/udev/v0-hdmiusb-rpi3.rules b/configs/os/udev/v0-hdmiusb-rpi3.rules
new file mode 100644
index 00000000..dee441ff
--- /dev/null
+++ b/configs/os/udev/v0-hdmiusb-rpi3.rules
@@ -0,0 +1,4 @@
+# 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.2:1.0", GROUP="kvmd", SYMLINK+="kvmd-video"
+KERNEL=="ttyAMA0", SYMLINK+="kvmd-hid"