moby: get WiFi + camera working on linux 6.10.9
note that modem_power is disabled... i can probably enable that here shortly
This commit is contained in:
@@ -40,7 +40,8 @@ in
|
|||||||
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-armbian;
|
# boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux-armbian;
|
||||||
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux-armbian.override {
|
boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux-armbian.override {
|
||||||
usePmosConfig = true;
|
usePmosConfig = true;
|
||||||
# withNixpkgsConfig = false;
|
withNixpkgsConfig = true;
|
||||||
|
withFullConfig = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
# nixpkgs.hostPlatform.linux-kernel becomes stdenv.hostPlatform.linux-kernel
|
# nixpkgs.hostPlatform.linux-kernel becomes stdenv.hostPlatform.linux-kernel
|
||||||
|
@@ -9,6 +9,7 @@
|
|||||||
sane-kernel-tools,
|
sane-kernel-tools,
|
||||||
usePmosConfig ? true,
|
usePmosConfig ? true,
|
||||||
withNixpkgsConfig ? true,
|
withNixpkgsConfig ? true,
|
||||||
|
withFullConfig ? false,
|
||||||
#VVV nixpkgs calls `.override` on the kernel to configure additional things, but we don't care about those things
|
#VVV nixpkgs calls `.override` on the kernel to configure additional things, but we don't care about those things
|
||||||
...
|
...
|
||||||
}@args:
|
}@args:
|
||||||
@@ -23,10 +24,10 @@ linux_latest.override {
|
|||||||
# inherit features randstructSeed structuredExtraConfig;
|
# inherit features randstructSeed structuredExtraConfig;
|
||||||
|
|
||||||
DTB = true; #< XXX: not sure if actually needed
|
DTB = true; #< XXX: not sure if actually needed
|
||||||
autoModules = withNixpkgsConfig;
|
autoModules = withFullConfig;
|
||||||
preferBuiltin = withNixpkgsConfig;
|
preferBuiltin = withFullConfig;
|
||||||
|
|
||||||
enableCommonConfig = withNixpkgsConfig;
|
enableCommonConfig = false; #< common nix config enabled manually below
|
||||||
|
|
||||||
kernelPatches = patches.megous.series ++
|
kernelPatches = patches.megous.series ++
|
||||||
# with patches.megous; [
|
# with patches.megous; [
|
||||||
@@ -302,6 +303,54 @@ linux_latest.override {
|
|||||||
# DRM = lib.mkForce module;
|
# DRM = lib.mkForce module;
|
||||||
# };
|
# };
|
||||||
# }
|
# }
|
||||||
|
{
|
||||||
|
name = "enable-rtw88-wifi-drivers";
|
||||||
|
patch = null;
|
||||||
|
extraStructuredConfig = with lib.kernel; {
|
||||||
|
# default nixpkgs/pmos config enables RTW88, but not RTW88_8723CS.
|
||||||
|
# but the pinephone uses a 8723BS/8723CS chipset, so enable these
|
||||||
|
# and anything else that could possibly be needed, since these things are tangled.
|
||||||
|
# TODO: reduce this, this is surely more than i actually need
|
||||||
|
# RTL8187_LEDS=y
|
||||||
|
# RTLWIFI_DEBUG=y
|
||||||
|
RTL8180 = module;
|
||||||
|
RTL8187 = module;
|
||||||
|
RTL8188EE = module;
|
||||||
|
RTL8192CE = module;
|
||||||
|
RTL8192CU = module;
|
||||||
|
RTL8192C_COMMON = module;
|
||||||
|
RTL8192DE = module;
|
||||||
|
RTL8192D_COMMON = module;
|
||||||
|
RTL8192EE = module;
|
||||||
|
RTL8192SE = module;
|
||||||
|
RTL8723AE = module;
|
||||||
|
RTL8723BE = module;
|
||||||
|
RTL8723_COMMON = module;
|
||||||
|
RTL8821AE = module;
|
||||||
|
RTL8XXXU = module;
|
||||||
|
RTLBTCOEXIST = module;
|
||||||
|
RTLWIFI = module;
|
||||||
|
RTLWIFI_PCI = module;
|
||||||
|
RTLWIFI_USB = module;
|
||||||
|
RTW88_8703B = module;
|
||||||
|
RTW88_8723CS = module;
|
||||||
|
RTW88_8723D = module;
|
||||||
|
RTW88_8723DE = module;
|
||||||
|
RTW88_8723DS = module;
|
||||||
|
RTW88_8723DU = module;
|
||||||
|
RTW88_8723X = module;
|
||||||
|
RTW88_8821C = module;
|
||||||
|
RTW88_8821CE = module;
|
||||||
|
RTW88_8821CS = module;
|
||||||
|
RTW88_8821CU = module;
|
||||||
|
RTW88_8822BS = module;
|
||||||
|
RTW88_8822BU = module;
|
||||||
|
RTW88_8822CS = module;
|
||||||
|
RTW88_8822CU = module;
|
||||||
|
RTW88_SDIO = module;
|
||||||
|
RTW88_USB = module;
|
||||||
|
};
|
||||||
|
}
|
||||||
{
|
{
|
||||||
# this could be enabled for *all* systems, but i'm not sure i really want that.
|
# this could be enabled for *all* systems, but i'm not sure i really want that.
|
||||||
name = "quality-of-life";
|
name = "quality-of-life";
|
||||||
@@ -329,6 +378,12 @@ linux_latest.override {
|
|||||||
RAID6_PQ_BENCHMARK = no;
|
RAID6_PQ_BENCHMARK = no;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
] ++ lib.optionals withNixpkgsConfig [
|
||||||
|
{
|
||||||
|
name = "nixpkgs-config";
|
||||||
|
patch = null;
|
||||||
|
extraStructuredConfig = linux_latest.commonStructuredConfig;
|
||||||
|
}
|
||||||
] ++ lib.optionals usePmosConfig [
|
] ++ lib.optionals usePmosConfig [
|
||||||
{
|
{
|
||||||
name = "postmarketos-config";
|
name = "postmarketos-config";
|
||||||
@@ -366,25 +421,27 @@ linux_latest.override {
|
|||||||
"NLS_DEFAULT" #< nixpkgs:m, pmos:y
|
"NLS_DEFAULT" #< nixpkgs:m, pmos:y
|
||||||
"NLS_ISO8859_1" #< nixpkgs:m, pmos:y
|
"NLS_ISO8859_1" #< nixpkgs:m, pmos:y
|
||||||
"NR_CPUS"
|
"NR_CPUS"
|
||||||
|
|
||||||
# "PREEMPT" #< nixpkgs:(n), pmos:y
|
# "PREEMPT" #< nixpkgs:(n), pmos:y
|
||||||
# "STANDALONE"
|
# "STANDALONE"
|
||||||
# "TRANSPARENT_HUGEPAGE_ALWAYS"
|
# "TRANSPARENT_HUGEPAGE_ALWAYS"
|
||||||
# "UEVENT_HELPER"
|
# "UEVENT_HELPER"
|
||||||
# "USB_SERIAL"
|
# "USB_SERIAL"
|
||||||
# "ZSMALLOC"
|
# "ZSMALLOC"
|
||||||
"DRM_LIMA"
|
|
||||||
"DRM_PANFROST"
|
|
||||||
|
|
||||||
"BLK_DEV_DM"
|
# "DRM_LIMA"
|
||||||
"VFIO"
|
# "DRM_PANFROST"
|
||||||
|
|
||||||
# these options don't break build, but are nonsensical
|
# these options don't break build, but are nonsensical
|
||||||
"BASE_SMALL"
|
"BASE_SMALL"
|
||||||
"BASE_FULL"
|
"BASE_FULL"
|
||||||
"CC_VERSION_TEXT"
|
"CC_VERSION_TEXT"
|
||||||
"GCC_VERSION"
|
"GCC_VERSION"
|
||||||
])
|
] ++ lib.optionals (withNixpkgsConfig && withFullConfig) [
|
||||||
;
|
"BLK_DEV_DM" #< want:y, actual:m
|
||||||
|
"VFIO" #< want:y, actual:m
|
||||||
|
]
|
||||||
|
);
|
||||||
}
|
}
|
||||||
] ++ lib.optionals (withNixpkgsConfig || !usePmosConfig) [
|
] ++ lib.optionals (withNixpkgsConfig || !usePmosConfig) [
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user