mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 02:09:26 +08:00
Merge branch 'edge' into rocm
This commit is contained in:
@@ -34,7 +34,7 @@ inputs:
|
||||
];
|
||||
nixpkgs = { march = "znver5"; rocm = true; };
|
||||
sysctl.laptop-mode = 5;
|
||||
kernel.variant = "cachyos";
|
||||
kernel = { variant = "cachyos"; patches = [ "btusb" ]; };
|
||||
};
|
||||
hardware = { gpu.type = "amd"; asus = {};};
|
||||
services =
|
||||
@@ -99,5 +99,6 @@ inputs:
|
||||
# 解决有时蓝牙不能使用的问题
|
||||
boot.kernelParams = [ "mt7925e.disable_aspm=1" ];
|
||||
specialisation.niri.configuration.nixos.system.gui.implementation = "niri";
|
||||
nixos.services.xray.client.xray.serverName = "xserver2.vps4.chn.moe";
|
||||
};
|
||||
}
|
||||
|
||||
8
flake.lock
generated
8
flake.lock
generated
@@ -629,11 +629,11 @@
|
||||
"misskey": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1747793528,
|
||||
"narHash": "sha256-TGEbAssYLZUy4wTv7ygEjMv5Uvo7v1u3OVtnLTPfeno=",
|
||||
"lastModified": 1759240641,
|
||||
"narHash": "sha256-9gsZ9BpG2vtRf0+PhaoqfZIVfiyvW7zos27M35NE/vc=",
|
||||
"ref": "refs/heads/chn-mod",
|
||||
"rev": "25e9730a919717f1f7cc4f83b1fdbcc2b03a40bf",
|
||||
"revCount": 27234,
|
||||
"rev": "f066982b356c17f11aacf996b4dbf224f8115924",
|
||||
"revCount": 27846,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/CHN-beta/misskey"
|
||||
|
||||
@@ -37,11 +37,10 @@ inputs:
|
||||
in
|
||||
''
|
||||
# wait for device to be available
|
||||
while ! lsmod | grep -q btrfs; do sleep 1; done
|
||||
${waitDevice}
|
||||
|
||||
# mount device
|
||||
mount ${device} /mnt -m -o noatime,compress-force=zstd
|
||||
mount ${device} /mnt -m -o noatime
|
||||
|
||||
# move old rootfs, create new one
|
||||
if [ -f /mnt/nix/rootfs/current/.timestamp ]
|
||||
@@ -52,7 +51,6 @@ inputs:
|
||||
btrfs property set -ts /mnt/nix/rootfs/$timestamp-$subvolid ro true
|
||||
fi
|
||||
[ -d /mnt/nix/rootfs/current ] || btrfs subvolume create /mnt/nix/rootfs/current
|
||||
chattr +C /mnt/nix/rootfs/current
|
||||
echo $(date '+%Y%m%d%H%M%S') > /mnt/nix/rootfs/current/.timestamp
|
||||
|
||||
# make systemd happy
|
||||
|
||||
74
modules/system/kernel/btusb.patch
Normal file
74
modules/system/kernel/btusb.patch
Normal file
@@ -0,0 +1,74 @@
|
||||
Message-Id: <20250606-btusb-mt7925-add-v1-1-9b64bfa86ea4@hexchain.org>
|
||||
Date: Fri, 06 Jun 2025 23:33:03 +0800
|
||||
From: Haochen Tong via B4 Relay <devnull+i.hexchain.org@...nel.org>
|
||||
To: Marcel Holtmann <marcel@...tmann.org>,
|
||||
Luiz Augusto von Dentz <luiz.dentz@...il.com>
|
||||
Cc: linux-bluetooth@...r.kernel.org, linux-kernel@...r.kernel.org
|
||||
Subject: [PATCH] Bluetooth: btusb: Add a new VID/PID 2c7c/7009 for MT7925
|
||||
|
||||
From: Haochen Tong <i@...chain.org>
|
||||
|
||||
Adds a new entry with VID 2c7c and PID 7009 for MediaTek MT7925
|
||||
Bluetooth chip.
|
||||
|
||||
The device information from /sys/kernel/debug/usb/devices is provided
|
||||
below.
|
||||
|
||||
T: Bus=03 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#= 3 Spd=480 MxCh= 0
|
||||
D: Ver= 2.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1
|
||||
P: Vendor=2c7c ProdID=7009 Rev= 1.00
|
||||
S: Manufacturer=MediaTek Inc.
|
||||
S: Product=Wireless_Device
|
||||
S: SerialNumber=000000000
|
||||
C:* #Ifs= 3 Cfg#= 1 Atr=e0 MxPwr=100mA
|
||||
A: FirstIf#= 0 IfCount= 3 Cls=e0(wlcon) Sub=01 Prot=01
|
||||
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=125us
|
||||
E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
|
||||
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
|
||||
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
|
||||
E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
|
||||
I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
|
||||
E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
|
||||
I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
|
||||
E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
|
||||
I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
|
||||
E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
|
||||
I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
|
||||
E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
|
||||
I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms
|
||||
E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
|
||||
I: If#= 1 Alt= 6 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
|
||||
E: Ad=83(I) Atr=01(Isoc) MxPS= 63 Ivl=1ms
|
||||
E: Ad=03(O) Atr=01(Isoc) MxPS= 63 Ivl=1ms
|
||||
I:* If#= 2 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
|
||||
E: Ad=8a(I) Atr=03(Int.) MxPS= 64 Ivl=125us
|
||||
E: Ad=0a(O) Atr=03(Int.) MxPS= 64 Ivl=125us
|
||||
I: If#= 2 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=(none)
|
||||
E: Ad=8a(I) Atr=03(Int.) MxPS= 512 Ivl=125us
|
||||
E: Ad=0a(O) Atr=03(Int.) MxPS= 512 Ivl=125us
|
||||
|
||||
Signed-off-by: Haochen Tong <i@...chain.org>
|
||||
---
|
||||
drivers/bluetooth/btusb.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
|
||||
index 9ab661d2d1e69028061fa3accd5106f481094100..e4a45596762f8c7d8ba10b4107d6e6f2203188e2 100644
|
||||
--- 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 },
|
||||
@@ -76,6 +76,7 @@ inputs:
|
||||
};
|
||||
structuredExtraConfig.BTRFS_EXPERIMENTAL = inputs.lib.kernel.yes;
|
||||
}];
|
||||
btusb = [{ name = "btusb"; patch = ./btusb.patch; }];
|
||||
};
|
||||
in builtins.concatLists (builtins.map (name: patches.${name}) kernel.patches);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user