[3.19] backports/looking-glass: add akms submodule, upgrade to b7 #557

Merged
ayakael merged 2 commits from looking-glass/add-akms-319 into v3.19 2024-07-28 22:53:51 +00:00
5 changed files with 95 additions and 5 deletions

View file

@ -0,0 +1,3 @@
modname=kvmfr
modver=0.0.10
built_modules='kvmfr.ko'

View file

@ -1,9 +1,9 @@
# Contributor: Rogério da Silva Yokomizo <me@ro.ger.io>
# Maintainer: Rogério da Silva Yokomizo <me@ro.ger.io>
pkgname=looking-glass
_pkgver=B6
pkgver=6b
pkgrel=2
_pkgver=B7-rc1
pkgver=7b_rc1
pkgrel=0
pkgdesc="Allows the use of a KVM configured for VGA PCI Pass-through without an attached physical monitor, keyboard or mouse"
url="https://looking-glass.io/"
arch="x86_64"
@ -33,8 +33,10 @@ source="$pkgname-$_pkgver.tar.gz::https://looking-glass.io/artifact/$_pkgver/sou
missing-includes.patch
obs-plugins-lib.patch
werror.patch
module_1124-fix-build-linux610.patch
AKMBUILD
"
subpackages="$pkgname-obs"
subpackages="$pkgname-obs $pkgname-module"
builddir="$srcdir/$pkgname-$_pkgver"
options="!check" # There are no tests nor --version.
@ -58,14 +60,27 @@ package() {
DESTDIR="$pkgdir" cmake --install build-obs
}
module() {
pkgdesc="Looking Glass kernel module (AKMS)"
depends="akms"
install -Dm644 "$srcdir"/AKMBUILD "$subpkgdir"/usr/src/looking-glass/AKMBUILD
install -Dm644 "$builddir"/module/kvmfr* "$subpkgdir"/usr/src/looking-glass/.
install -Dm644 "$builddir"/module/Makefile "$subpkgdir"/usr/src/looking-glass/.
chmod -R u=rwX,go=rX-w "$subpkgdir"/usr/src/looking-glass
mkdir -p "$subpkgdir"/etc/udev/rules.d
echo 'SUBSYSTEM=="kvmfr", OWNER="root", GROUP="kvm", MODE="0660"' > "$subpkgdir"/etc/udev/rules.d/99-kvmfr.rules
}
obs() {
pkgdesc="$pkgdesc (obs plugin)"
amove usr/lib/obs-plugins
}
sha512sums="
558981d6b32098076ef0775a748da349941551352cbef836e37310e43e5cd6072df3dec6fa2418a9abecc7729ef0c1c6869e3168d05a3d76bea46c6eb8c4e82c looking-glass-B6.tar.gz
0eff4e3ac8ce06dbf36273919b5fd4d82d0635f30ce21ab937afb9e60bf1d99b7aa8be7ba9de48ea3b911493c7adb812c506c9bd6e70da9500482012d2f9fe44 looking-glass-B7-rc1.tar.gz
6d2449764a8316dd3c1b5cc0aa552671068f89ed2f95297f3c5256af8529b93e5ec7af8f979bd2e744fd09b11063e8a93f3ed26284f0e49294e467ca10f6e772 missing-includes.patch
33c5463412a16691f47d7833ebf81d7cf20c560a077dca141dcc9f02a5d6dfb676e483835f39a06012b114be9f509dda4614fe253bb1c72a0142e82dc265a5ca obs-plugins-lib.patch
b952d1fd284aed15bcfe7990f160dec3a4565fb5833ce339920f62de6bb46fbc09265a0a79fe80d212eecc6a1813614e1e193a8846c37e2afd18431dc3a89ca4 werror.patch
6e8c2d3bf6fa3ea826b844f73d574e5933763e37ad4eb1442c2dfec4d7ceba46918eaa5ee138cfb6437305b7d7e40e157535fff08e3412f2e05cbd1099c29eba module_1124-fix-build-linux610.patch
9e510d43e2849647ea6ff8ae76872ae2f0aac65119b510c3d1f8b6e4e22263f7be60ab092a853733a3aa22794d0ff0c97619a69e22d79c4936916f99f381d087 AKMBUILD
"

View file

@ -0,0 +1,2 @@
#!/bin/sh
/usr/sbin/akms uninstall kvmfr

View file

@ -0,0 +1,36 @@
From e32b292cc1ba089db6ed28e4d5eb0fc8cc4c2235 Mon Sep 17 00:00:00 2001
From: esi <git@esibun.net>
Date: Fri, 12 May 2023 16:28:01 -0400
Subject: [PATCH] [module] Fix build on Linux 6.4 (fixes #1075)
---
module/dkms.conf | 2 +-
module/kvmfr.c | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/module/dkms.conf b/module/dkms.conf
index a5f86bdd0..9d2a02c0e 100644
--- a/module/dkms.conf
+++ b/module/dkms.conf
@@ -1,5 +1,5 @@
PACKAGE_NAME="kvmfr"
-PACKAGE_VERSION="0.0.8"
+PACKAGE_VERSION="0.0.9"
BUILT_MODULE_NAME[0]="${PACKAGE_NAME}"
MAKE[0]="make KDIR=${kernel_source_dir}"
CLEAN="make KDIR=${kernel_source_dir} clean"
diff --git a/module/kvmfr.c b/module/kvmfr.c
index ca0cca685..c711e000e 100644
--- a/module/kvmfr.c
+++ b/module/kvmfr.c
@@ -539,7 +539,11 @@ static int __init kvmfr_module_init(void)
if (kvmfr->major < 0)
goto out_free;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
kvmfr->pClass = class_create(THIS_MODULE, KVMFR_DEV_NAME);
+#else
+ kvmfr->pClass = class_create(KVMFR_DEV_NAME);
+#endif
if (IS_ERR(kvmfr->pClass))
goto out_unreg;

View file

@ -0,0 +1,34 @@
From 7305ce36af211220419eeab302ff28793d515df2 Mon Sep 17 00:00:00 2001
From: Geoffrey McRae <geoff@hostfission.com>
Date: Fri, 7 Jun 2024 19:01:38 +1000
Subject: [PATCH] [module] fix build on linux 6.10
Fixes #1124 - Thanks @pongo1231
---
module/dkms.conf | 2 +-
module/kvmfr.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/module/dkms.conf b/module/dkms.conf
index 9d2a02c0e..486a61edc 100644
--- a/module/dkms.conf
+++ b/module/dkms.conf
@@ -1,5 +1,5 @@
PACKAGE_NAME="kvmfr"
-PACKAGE_VERSION="0.0.9"
+PACKAGE_VERSION="0.0.10"
BUILT_MODULE_NAME[0]="${PACKAGE_NAME}"
MAKE[0]="make KDIR=${kernel_source_dir}"
CLEAN="make KDIR=${kernel_source_dir} clean"
diff --git a/module/kvmfr.c b/module/kvmfr.c
index b5acd18de..c99a5d79c 100644
--- a/module/kvmfr.c
+++ b/module/kvmfr.c
@@ -30,6 +30,7 @@
#include <linux/highmem.h>
#include <linux/memremap.h>
#include <linux/version.h>
+#include <linux/vmalloc.h>
#include <asm/io.h>