This commit is contained in:
Maxim Devaev 2022-11-23 21:27:34 +03:00
parent 41c8c41e4d
commit 0c25e89f46
20 changed files with 332 additions and 1 deletions

View File

@ -19,6 +19,9 @@ _variants=(
v2-hdmiusb:generic v2-hdmiusb:generic
v3-hdmi:rpi4 v3-hdmi:rpi4
v4mini-hdmi:rpi4
v4plus-hdmi:rpi4
) )
@ -229,7 +232,7 @@ for _variant in "${_variants[@]}"; do
if [[ $_platform =~ ^.*-hdmi$ ]]; then if [[ $_platform =~ ^.*-hdmi$ ]]; then
backup=(\"\${backup[@]}\" etc/kvmd/tc358743-edid.hex) backup=(\"\${backup[@]}\" etc/kvmd/tc358743-edid.hex)
install -DTm444 configs/kvmd/tc358743-edid.hex \"\$pkgdir/etc/kvmd/tc358743-edid.hex\" install -DTm444 configs/kvmd/edid/$_platform.hex \"\$pkgdir/etc/kvmd/tc358743-edid.hex\"
fi fi
}" }"
done done

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

View File

@ -0,0 +1,16 @@
00FFFFFFFFFFFF0031D8888800888888
1C150103800000780AEE91A3544C9926
0F50543FCF0001010101010101010101
010101010101011D007251D01E206E28
5500C48E2100001E8C0AD08A20E02D10
103E9600138E2100001E000000FC0050
694B564D0A20202020202020000000FD
003B3D0F2E0F1E0A2020202020200139
02031E044F841303021211012021223C
3D3E101F66030C00300080E2007F8C0A
D08A20E02D10103E9600C48E21000018
8C0AD08A20E02D10103E9600138E2100
00188C0AA01451F01600267C4300138E
21000098000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000094

View File

@ -0,0 +1,16 @@
00FFFFFFFFFFFF0031D8888800888888
1C150103800000780AEE91A3544C9926
0F50543FCF0001010101010101010101
010101010101011D007251D01E206E28
5500C48E2100001E8C0AD08A20E02D10
103E9600138E2100001E000000FC0050
694B564D0A20202020202020000000FD
003B3D0F2E0F1E0A2020202020200139
02031E044F841303021211012021223C
3D3E101F66030C00300080E2007F8C0A
D08A20E02D10103E9600C48E21000018
8C0AD08A20E02D10103E9600138E2100
00188C0AA01451F01600267C4300138E
21000098000000000000000000000000
00000000000000000000000000000000
00000000000000000000000000000094

View File

@ -0,0 +1,8 @@
[server]
unix = /run/kvmd/fan.sock
unix_rm = 1
unix_mode = 666
[main]
pwm_pin = 13
hall_pin = 16

View File

@ -0,0 +1,8 @@
[server]
unix = /run/kvmd/fan.sock
unix_rm = 1
unix_mode = 666
[main]
pwm_pin = 13
hall_pin = 16

View File

@ -0,0 +1,90 @@
# 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
info:
fan:
unix: /run/kvmd/fan.sock
hid:
type: otg
mouse_alt:
device: /dev/kvmd-hid-mouse-alt
atx:
type: gpio
power_led_pin: 4
hdd_led_pin: 5
power_switch_pin: 23
reset_switch_pin: 27
msd:
type: otg
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}"
gpio:
drivers:
__v4_locator__:
type: locator
scheme:
__v3_usb_breaker__:
pin: 22
mode: output
initial: true
pulse:
delay: 0
__v4_locator__:
driver: __v4_locator__
pin: 12
mode: output
pulse:
delay: 0
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"
otg:
remote_wakeup: true

View File

@ -0,0 +1,90 @@
# 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
info:
fan:
unix: /run/kvmd/fan.sock
hid:
type: otg
mouse_alt:
device: /dev/kvmd-hid-mouse-alt
atx:
type: gpio
power_led_pin: 4
hdd_led_pin: 5
power_switch_pin: 23
reset_switch_pin: 27
msd:
type: otg
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}"
gpio:
drivers:
__v4_locator__:
type: locator
scheme:
__v3_usb_breaker__:
pin: 22
mode: output
initial: true
pulse:
delay: 0
__v4_locator__:
driver: __v4_locator__
pin: 12
mode: output
pulse:
delay: 0
vnc:
memsink:
jpeg:
sink: "kvmd::ustreamer::jpeg"
h264:
sink: "kvmd::ustreamer::h264"
otg:
remote_wakeup: true

View File

@ -0,0 +1,21 @@
# PiKVM
# See /boot/overlays/README for all available options
initramfs initramfs-linux.img followkernel
hdmi_force_hotplug=1
gpu_mem=128
enable_uart=1
dtoverlay=disable-bt
# USB emulation
dtoverlay=dwc2,dr_mode=peripheral
# Video and audio
dtoverlay=tc358743,4lane=1
dtoverlay=tc358743-audio
# I2C (display)
dtparam=i2c_arm=on
# Clock
dtoverlay=i2c-rtc,pcf8563

View File

@ -0,0 +1,21 @@
# PiKVM
# See /boot/overlays/README for all available options
initramfs initramfs-linux.img followkernel
hdmi_force_hotplug=1
gpu_mem=128
enable_uart=1
dtoverlay=disable-bt
# USB emulation
dtoverlay=dwc2,dr_mode=peripheral
# Video and audio
dtoverlay=tc358743,4lane=1
dtoverlay=tc358743-audio
# I2C (display)
dtparam=i2c_arm=on
# Clock
dtoverlay=i2c-rtc,pcf8563

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,4 @@
dwc2
libcomposite
tc358743
i2c-dev

View File

@ -0,0 +1,4 @@
dwc2
libcomposite
tc358743
i2c-dev

View File

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

View File

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

View File

@ -0,0 +1,6 @@
# 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=="fe801000.csi|fe801000.csi1", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"
KERNEL=="hidg0", GROUP="kvmd", SYMLINK+="kvmd-hid-keyboard"
KERNEL=="hidg1", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse"
KERNEL=="hidg2", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse-alt"

View File

@ -0,0 +1,6 @@
# 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=="fe801000.csi|fe801000.csi1", ATTR{name}=="unicam-image", GROUP="kvmd", SYMLINK+="kvmd-video", TAG+="systemd"
KERNEL=="hidg0", GROUP="kvmd", SYMLINK+="kvmd-hid-keyboard"
KERNEL=="hidg1", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse"
KERNEL=="hidg2", GROUP="kvmd", SYMLINK+="kvmd-hid-mouse-alt"