mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
feat: update fanatecff
This commit is contained in:
42
: w
Normal file
42
: w
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
kernel,
|
||||||
|
fetchFromGitHub,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "hid-fanatecff";
|
||||||
|
version = "0.1.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "gotzl";
|
||||||
|
repo = "hid-fanatecff";
|
||||||
|
rev = "ce894fb7bcae486978f8165e9f521e480120f98a";
|
||||||
|
hash = "sha256-/106K52Zi4/6aWh2EwojRm370poaBHyX3Ke2j52ytdo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
|
makeFlags =
|
||||||
|
kernel.makeFlags
|
||||||
|
++ [
|
||||||
|
"KVERSION=${kernel.modDirVersion}"
|
||||||
|
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
];
|
||||||
|
|
||||||
|
installFlags = [
|
||||||
|
"-C"
|
||||||
|
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
"M=${src}"
|
||||||
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
||||||
|
];
|
||||||
|
installTargets = ["modules_install"];
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Linux kernel driver that aims to add support for FANATEC devices";
|
||||||
|
homepage = "https://github.com/gotzl/hid-fanatecff";
|
||||||
|
license = licenses.gpl2Only;
|
||||||
|
platforms = platforms.linux;
|
||||||
|
broken = stdenv.isAarch64;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -15,8 +15,9 @@ in {
|
|||||||
default = false;
|
default = false;
|
||||||
description = lib.mkDoc ''
|
description = lib.mkDoc ''
|
||||||
Enables the Linux module drivers for Fanatec wheel bases.
|
Enables the Linux module drivers for Fanatec wheel bases.
|
||||||
Works with the CSL Elite, and has experimental support
|
Works with the CSL Elite and CSL/ClubSport DD/DD Pro,
|
||||||
for the ClubSport V2/V2.5, Podium DD1/DD2, CSR Elite and the CSL DD.
|
and has experimental support for the ClubSport V2/V2.5,
|
||||||
|
Podium DD1/DD2 and CSR Elite.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
From 83e8196515ed420bbbb619e015a49a504c56d6bf Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= <dev@theaninova.de>
|
|
||||||
Date: Mon, 18 Sep 2023 17:18:35 +0200
|
|
||||||
Subject: [PATCH 1/1] workaround: led compile error
|
|
||||||
|
|
||||||
---
|
|
||||||
hid-ftec.h | 3 +++
|
|
||||||
1 file changed, 3 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/hid-ftec.h b/hid-ftec.h
|
|
||||||
index afce2c3..3ddd514 100644
|
|
||||||
--- a/hid-ftec.h
|
|
||||||
+++ b/hid-ftec.h
|
|
||||||
@@ -1,6 +1,9 @@
|
|
||||||
#ifndef __HID_FTEC_H
|
|
||||||
#define __HID_FTEC_H
|
|
||||||
|
|
||||||
+// TODO: remove
|
|
||||||
+#define CONFIG_LEDS_CLASS
|
|
||||||
+
|
|
||||||
#define FANATEC_VENDOR_ID 0x0eb7
|
|
||||||
|
|
||||||
#define CLUBSPORT_V2_WHEELBASE_DEVICE_ID 0x0001
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
From 4a1395857cc00fd287926bc281ecd36fde9f45fc Mon Sep 17 00:00:00 2001
|
|
||||||
From: =?UTF-8?q?Thea=20Sch=C3=B6bl?= <dev@theaninova.de>
|
|
||||||
Date: Mon, 18 Sep 2023 17:30:11 +0200
|
|
||||||
Subject: [PATCH 1/1] fix: nix makefile adjustments
|
|
||||||
|
|
||||||
---
|
|
||||||
Makefile | 7 ++-----
|
|
||||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/Makefile b/Makefile
|
|
||||||
index 0165e72..74b113c 100644
|
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
|
||||||
@@ -1,6 +1,5 @@
|
|
||||||
KVERSION ?= `uname -r`
|
|
||||||
KDIR ?= /lib/modules/${KVERSION}/build
|
|
||||||
-MODULEDIR ?= /lib/modules/${KVERSION}/kernel/drivers/hid
|
|
||||||
|
|
||||||
default:
|
|
||||||
@echo -e "\n::\033[32m Compiling Fanatec kernel module\033[0m"
|
|
||||||
@@ -12,12 +11,10 @@ clean:
|
|
||||||
@echo "========================================"
|
|
||||||
$(MAKE) -C $(KDIR) M=$$PWD clean
|
|
||||||
|
|
||||||
-install:
|
|
||||||
+install: default
|
|
||||||
@echo -e "\n::\033[34m Installing Fanatec kernel module/udev rule\033[0m"
|
|
||||||
@echo "====================================================="
|
|
||||||
- @cp -v hid-fanatec.ko ${MODULEDIR}
|
|
||||||
- @cp -v fanatec.rules /etc/udev/rules.d/99-fanatec.rules
|
|
||||||
- depmod
|
|
||||||
+ $(MAKE) -C $(KDIR) M=$$PWD INSTALL_MOD_PATH=$$out modules_install
|
|
||||||
|
|
||||||
uninstall:
|
|
||||||
@echo -e "\n::\033[34m Uninstalling Fanatec kernel module/udev rule\033[0m"
|
|
||||||
--
|
|
||||||
2.41.0
|
|
||||||
|
|
||||||
@@ -11,21 +11,26 @@ stdenv.mkDerivation rec {
|
|||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "gotzl";
|
owner = "gotzl";
|
||||||
repo = "hid-fanatecff";
|
repo = "hid-fanatecff";
|
||||||
rev = "9c186b51ab7c6da9abef15c73b1d9eababc302a5";
|
rev = "ce894fb7bcae486978f8165e9f521e480120f98a";
|
||||||
sha256 = "14rsj4qx8vim0hx8b7a823gqbmzfginq6kpkxjfay0n1693p2895";
|
hash = "sha256-/106K52Zi4/6aWh2EwojRm370poaBHyX3Ke2j52ytdo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = kernel.moduleBuildDependencies;
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags =
|
||||||
|
kernel.makeFlags
|
||||||
|
++ [
|
||||||
"KVERSION=${kernel.modDirVersion}"
|
"KVERSION=${kernel.modDirVersion}"
|
||||||
"KDIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
"KERNEL_SRC=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
];
|
];
|
||||||
|
|
||||||
patches = [
|
installFlags = [
|
||||||
./hid-fanatec-fix.patch
|
"-C"
|
||||||
./hid-fanatec-makefile.patch
|
"${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
"M=${src}"
|
||||||
|
"INSTALL_MOD_PATH=${placeholder "out"}"
|
||||||
];
|
];
|
||||||
|
installTargets = ["modules_install"];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Linux kernel driver that aims to add support for FANATEC devices";
|
description = "Linux kernel driver that aims to add support for FANATEC devices";
|
||||||
|
|||||||
Reference in New Issue
Block a user