summaryrefslogtreecommitdiff
path: root/os/platforms/v1
diff options
context:
space:
mode:
Diffstat (limited to 'os/platforms/v1')
-rw-r--r--os/platforms/v1/Dockerfile.part3
-rw-r--r--os/platforms/v1/kvmd.yaml5
-rw-r--r--os/platforms/v1/sysctl.conf (renamed from os/platforms/v1/99-pikvm.conf)0
-rw-r--r--os/platforms/v1/udev.rules4
4 files changed, 8 insertions, 4 deletions
diff --git a/os/platforms/v1/Dockerfile.part b/os/platforms/v1/Dockerfile.part
index c525b8e7..566f229c 100644
--- a/os/platforms/v1/Dockerfile.part
+++ b/os/platforms/v1/Dockerfile.part
@@ -4,7 +4,8 @@ RUN pkg-install \
nginx
COPY stages/pikvm/config.txt /boot/
-COPY stages/pikvm/99-pikvm.conf /etc/sysctl.d/
+COPY stages/pikvm/sysctl.conf /etc/sysctl.d/99-pikvm.conf
+COPY stages/pikvm/udev.rules /etc/udev/rules.d/pikvm.rules
COPY stages/pikvm/index.html /srv/http/
COPY stages/pikvm/kvmd.yaml /etc/
COPY stages/pikvm/nginx.conf /etc/nginx/
diff --git a/os/platforms/v1/kvmd.yaml b/os/platforms/v1/kvmd.yaml
index 3f2e8751..52890551 100644
--- a/os/platforms/v1/kvmd.yaml
+++ b/os/platforms/v1/kvmd.yaml
@@ -24,8 +24,7 @@ kvmd:
state_poll: 0.1
msd:
- # FIXME: It's for laptop lol
- bind: "1-2:1.0"
+ device: "/dev/kvmd-msd"
init_delay: 2.0
write_meta: true
chunk_size: 8192
@@ -46,7 +45,7 @@ kvmd:
cmd:
- "/usr/bin/mjpg_streamer"
- "-i"
- - "input_uvc.so -d /dev/video0 -e 2 -y -n -r {width}x{height}"
+ - "input_uvc.so -d /dev/kvmd-streamer -e 2 -y -n -r {width}x{height}"
- "-o"
- "output_http.so -l localhost -p 8082"
diff --git a/os/platforms/v1/99-pikvm.conf b/os/platforms/v1/sysctl.conf
index 71db0efc..71db0efc 100644
--- a/os/platforms/v1/99-pikvm.conf
+++ b/os/platforms/v1/sysctl.conf
diff --git a/os/platforms/v1/udev.rules b/os/platforms/v1/udev.rules
new file mode 100644
index 00000000..99cb0e45
--- /dev/null
+++ b/os/platforms/v1/udev.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.3:1.0", SYMLINK+="kvmd-streamer"
+KERNEL=="sd[a-z]", SUBSYSTEM=="block", KERNELS=="1-1.4:1.0", SYMLINK+="kvmd-msd"