Skip to content

Commit

Permalink
feat: add kvmfr akmod
Browse files Browse the repository at this point in the history
For use with looking-glass when doing GPU passthrough in virtual machines.
The shm file used currently in bazzite is deprecated.
  • Loading branch information
HikariKnight committed Apr 10, 2024
1 parent 2b7cc5b commit dbfb3b4
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions Containerfile.common
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ RUN if grep -qv "surface" <<< "${KERNEL_FLAVOR}"; then \
/tmp/build-kmod-bmi260.sh && \
/tmp/build-kmod-bmi323.sh && \
/tmp/build-kmod-gcadapter_oc.sh && \
/tmp/build-kmod-kvmfr.sh && \
/tmp/build-kmod-nct6687d.sh && \
/tmp/build-kmod-openrazer.sh && \
/tmp/build-kmod-ryzen-smu.sh && \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Feel free to PR more kmod build scripts into this repo!
- [bmi323](https://github.com/hhd-dev/bmi260) - kernel module driver for the Bosch BMI323 IMU (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [evdi](www.displaylink.com) - kernel module required for use of displaylink (akmod from [negativo17 multimedia repo](https://negativo17.org/multimedia/)
- [gcadapter_oc](https://github.com/hannesmann/gcadapter-oc-kmod) - kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [kvmfr](https://github.com/gnif/looking-glass) - KVM framebuffer relay kernel module for use with Looking Glass (akmod from [hikariknight/looking-glass-kvmfr-akmod copr](https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/))
- [nct6687d](https://github.com/Fred78290/nct6687d) - Linux kernel module for Nuvoton NCT6687-R found on AMD B550 chipset motherboards (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
- [nvidia](https://rpmfusion.org/Howto/NVIDIA) - nvidia GPU drivers built from rpmfusion
- [openrazer](https://openrazer.github.io/) - kernel module adding additional features to Razer hardware (akmod from [ublue-os/akmods copr](https://copr.fedorainfracloud.org/coprs/ublue-os/akmods/))
Expand Down
24 changes: 24 additions & 0 deletions build-kmod-kvmfr.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

set -oeux pipefail

ARCH="$(rpm -E '%_arch')"
KERNEL="$(rpm -q "${KERNEL_NAME}" --queryformat '%{VERSION}-%{RELEASE}.%{ARCH}')"
RELEASE="$(rpm -E '%fedora')"

if [[ "${RELEASE}" -ge 41 ]]; then
COPR_RELEASE="rawhide"
else
COPR_RELEASE="${RELEASE}"
fi

wget "https://copr.fedorainfracloud.org/coprs/hikariknight/looking-glass-kvmfr/repo/fedora-${COPR_RELEASE}/hikariknight-looking-glass-kvmfr-fedora-${COPR_RELEASE}.repo" -O /etc/yum.repos.d/_copr_hikariknight-looking-glass-kvmfr.repo

### BUILD kvmfr (succeed or fail-fast with debug output)
rpm-ostree install \
"akmod-kvmfr-*.fc${RELEASE}.${ARCH}"
akmods --force --kernels "${KERNEL}" --kmod kvmfr
modinfo "/usr/lib/modules/${KERNEL}/extra/kvmfr/kvmfr.ko.xz" > /dev/null \
|| (find /var/cache/akmods/kvmfr/ -name \*.log -print -exec cat {} \; && exit 1)

rm -f /etc/yum.repos.d/_copr_hikariknight-looking-glass-kvmfr.repo

0 comments on commit dbfb3b4

Please sign in to comment.