moby: kernel: re-enable build-time improvements and display config (the latter doesnt always work though)
This commit is contained in:
@@ -312,8 +312,7 @@ linux_latest.override {
|
|||||||
# byName."Add-README.md-with-information-and-u-boot-patches"
|
# byName."Add-README.md-with-information-and-u-boot-patches"
|
||||||
# byName."Defconfigs-for-all-my-devices"
|
# byName."Defconfigs-for-all-my-devices"
|
||||||
# byName."Update-defconfigs"
|
# byName."Update-defconfigs"
|
||||||
]) ++
|
]) ++ [
|
||||||
lib.optionals withFullConfig [
|
|
||||||
# {
|
# {
|
||||||
# name = "fix-compilation-specific-to-megi";
|
# name = "fix-compilation-specific-to-megi";
|
||||||
# patch = null;
|
# patch = null;
|
||||||
@@ -331,98 +330,52 @@ linux_latest.override {
|
|||||||
# # SUN8I_DE2_CCU = lib.mkForce module; #< want:y, got:M
|
# # SUN8I_DE2_CCU = lib.mkForce module; #< want:y, got:M
|
||||||
# };
|
# };
|
||||||
# }
|
# }
|
||||||
# {
|
{
|
||||||
# name = "fix-no-display";
|
# this could be enabled for *all* systems, but i'm not sure i really want that.
|
||||||
# patch = null;
|
name = "quality-of-life";
|
||||||
# extraStructuredConfig = with lib.kernel; {
|
patch = null;
|
||||||
# ### RUNTIME FIXES AFTER <https://github.com/NixOS/nixpkgs/pull/298332>
|
extraStructuredConfig = with lib.kernel; {
|
||||||
# # pmOS kernel config is in pmaports repo:
|
# optimize for faster builds (measured 12m00s -> 10m45s)
|
||||||
# # - CONFIG_FB_SIMPLE=y
|
# see <repo:kernel.org/linux:Documentation/admin-guide/quickly-build-trimmed-linux.rst>
|
||||||
# # - CONFIG_DRM_SIMPLEDRM is unset
|
# note that several options can re-enable DEBUG_KERNEL (such as DEBUG_LIST)
|
||||||
# # - CONFIG_SYSFB_SIMPLEFB is not referenced
|
# DEBUG_KERNEL = lib.mkForce no; # option group which seems to just gate the other DEBUG_ opts?
|
||||||
# # these config values are speculative: could probably be made smaller
|
DEBUG_INFO = lib.mkForce no; # for gdb debugging (does it impact kernel stacktraces, too?)
|
||||||
# FB_SIMPLE = lib.mkForce yes;
|
# DEBUG_INFO_NONE = lib.mkForce no;
|
||||||
# DRM_SIMPLEDRM = lib.mkForce no; #< conflicts with FB_SIMPLE
|
DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT = lib.mkForce no;
|
||||||
# # SYSFB_SIMPLEFB = lib.mkForce no;
|
# DEBUG_LIST = lib.mkForce no;
|
||||||
# # downgrade these from "yes" to "module", to match previous config.
|
# DEBUG_MISC = lib.mkForce no;
|
||||||
# DRM = lib.mkForce module;
|
# DEBUG_FS = no;
|
||||||
# };
|
|
||||||
# }
|
|
||||||
# {
|
|
||||||
# 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.
|
|
||||||
# name = "quality-of-life";
|
|
||||||
# patch = null;
|
|
||||||
# extraStructuredConfig = with lib.kernel; {
|
|
||||||
# # optimize for faster builds.
|
|
||||||
# # see <repo:kernel.org/linux:Documentation/admin-guide/quickly-build-trimmed-linux.rst>
|
|
||||||
# # note that several options can re-enable DEBUG_KERNEL (such as DEBUG_LIST)
|
|
||||||
# # DEBUG_KERNEL = lib.mkForce no; # option group which seems to just gate the other DEBUG_ opts?
|
|
||||||
# DEBUG_INFO = lib.mkForce no; # for gdb debugging (does it impact kernel stacktraces, too?)
|
|
||||||
# # DEBUG_INFO_NONE = lib.mkForce no;
|
|
||||||
# DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT = lib.mkForce no;
|
|
||||||
# # DEBUG_LIST = lib.mkForce no;
|
|
||||||
# # DEBUG_MISC = lib.mkForce no;
|
|
||||||
# # DEBUG_FS = no;
|
|
||||||
|
|
||||||
# DEBUG_INFO_BTF = lib.mkForce no; # BPF debug symbols. rec by <https://nixos.wiki/wiki/Linux_kernel#Too_high_ram_usage>
|
DEBUG_INFO_BTF = lib.mkForce no; # BPF debug symbols. rec by <https://nixos.wiki/wiki/Linux_kernel#Too_high_ram_usage>
|
||||||
# # SCHED_DEBUG = lib.mkForce no; # determines /sys/kernel/debug/sched
|
# SCHED_DEBUG = lib.mkForce no; # determines /sys/kernel/debug/sched
|
||||||
# SUNRPC_DEBUG = lib.mkForce no;
|
SUNRPC_DEBUG = lib.mkForce no;
|
||||||
# # shave 500ms off Pinephone boot time (dmesg | grep raid6)
|
# shave 500ms off Pinephone boot time (dmesg | grep raid6)
|
||||||
# # - by default raid6 (on behalf of btrfs) will compute the fastest algorithms at boot.
|
# - by default raid6 (on behalf of btrfs) will compute the fastest algorithms at boot.
|
||||||
# # - AFAICT, this only comes into effect if using raid (i don't).
|
# - AFAICT, this only comes into effect if using raid (i don't).
|
||||||
# # - in any case, on moby, the fastest benchmark happens to be the default anyway.
|
# - in any case, on moby, the fastest benchmark happens to be the default anyway.
|
||||||
# # - on lappy/servo/desko, the default is about 3% slower than the fastest. but they compute this in < 100ms.
|
# - on lappy/servo/desko, the default is about 3% slower than the fastest. but they compute this in < 100ms.
|
||||||
# RAID6_PQ_BENCHMARK = lib.mkForce no;
|
RAID6_PQ_BENCHMARK = lib.mkForce no;
|
||||||
# };
|
};
|
||||||
# }
|
}
|
||||||
|
{
|
||||||
|
name = "fix-no-display";
|
||||||
|
patch = null;
|
||||||
|
extraStructuredConfig = with lib.kernel; {
|
||||||
|
### RUNTIME FIXES AFTER <https://github.com/NixOS/nixpkgs/pull/298332>
|
||||||
|
# pmOS kernel config is in pmaports repo:
|
||||||
|
# - CONFIG_FB_SIMPLE=y
|
||||||
|
# - CONFIG_DRM_SIMPLEDRM is unset
|
||||||
|
# - CONFIG_SYSFB_SIMPLEFB is not referenced
|
||||||
|
# these config values are speculative: could probably be made smaller
|
||||||
|
FB_SIMPLE = lib.mkForce yes;
|
||||||
|
DRM_SIMPLEDRM = lib.mkForce no; #< conflicts with FB_SIMPLE
|
||||||
|
# SYSFB_SIMPLEFB = lib.mkForce no;
|
||||||
|
|
||||||
|
DRM = yes;
|
||||||
|
# downgrade these from "yes" to "module", to match previous config.
|
||||||
|
# DRM = lib.mkForce module;
|
||||||
|
};
|
||||||
|
}
|
||||||
] ++ lib.optionals (withMegousPatches && withModemPower) [
|
] ++ lib.optionals (withMegousPatches && withModemPower) [
|
||||||
{
|
{
|
||||||
name = "enable-megi-modem-power";
|
name = "enable-megi-modem-power";
|
||||||
@@ -553,6 +506,55 @@ linux_latest.override {
|
|||||||
# UDMABUF = yes; #< not needed (nixos default)
|
# UDMABUF = yes; #< not needed (nixos default)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
] ++ lib.optionals (!withFullConfig) [
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
|
Reference in New Issue
Block a user