Added a kernel module
Added new nix expr Added patch Updated Updated patch Renamed variables, bluetooth works on mt7925 now
This commit is contained in:
parent
1fc6785205
commit
7c221331d6
3 changed files with 59 additions and 11 deletions
11
config/btusb-add-mt7925.patch
Normal file
11
config/btusb-add-mt7925.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/drivers/bluetooth/btusb.c
|
||||
+++ b/drivers/bluetooth/btusb.c
|
||||
@@ -725,6 +725,8 @@ static const struct usb_device_id quirks_table[] = {
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
{ USB_DEVICE(0x13d3, 0x3630), .driver_info = BTUSB_MEDIATEK |
|
||||
BTUSB_WIDEBAND_SPEECH },
|
||||
+ { USB_DEVICE(0x2c7c, 0x7009), .driver_info = BTUSB_MEDIATEK |
|
||||
+ BTUSB_WIDEBAND_SPEECH },
|
||||
|
||||
/* Additional Realtek 8723AE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0930, 0x021d), .driver_info = BTUSB_REALTEK },
|
34
config/btusb.nix
Normal file
34
config/btusb.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ pkgs, lib, kernel ? pkgs.linuxPackages_latest.kernel}:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "btusb-kernel-module";
|
||||
inherit (kernel) src version postPatch nativeBuildInputs;
|
||||
|
||||
kernel_dev = kernel.dev;
|
||||
kernelVersion = kernel.modDirVersion;
|
||||
|
||||
# The key change is here: point to the correct module path for btusb.
|
||||
modulePath = "drivers/bluetooth";
|
||||
|
||||
buildPhase = ''
|
||||
BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build
|
||||
cp $BUILT_KERNEL/Module.symvers .
|
||||
cp $BUILT_KERNEL/.config .
|
||||
cp $kernel_dev/vmlinux .
|
||||
make "-j$NIX_BUILD_CORES" modules_prepare
|
||||
make "-j$NIX_BUILD_CORES" M=$modulePath modules
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
make \
|
||||
INSTALL_MOD_PATH="$out" \
|
||||
XZ="xz -T$NIX_BUILD_CORES" \
|
||||
M="$modulePath" \
|
||||
modules_install
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "btusb kernel module";
|
||||
license = lib.licenses.gpl3;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue