mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-05 17:27:50 +00:00
[Boot] Add optional patch to remove Linux kernel DRM (EXPORT_SYMBOL_GPL)
This commit is contained in:
parent
94aaf0b08b
commit
2be5863af8
2 changed files with 21 additions and 0 deletions
9
boot.nix
9
boot.nix
|
|
@ -22,6 +22,12 @@ let
|
|||
ENERGY_MODEL y
|
||||
'';
|
||||
};
|
||||
removeKernelDRM = {
|
||||
name = "remove-kernel-drm";
|
||||
patch = ./remove-kernel-drm.patch;
|
||||
};
|
||||
|
||||
|
||||
amdClusterId = {
|
||||
name = "cluster-id-amd";
|
||||
patch = pkgs.fetchpatch {
|
||||
|
|
@ -180,6 +186,8 @@ in {
|
|||
type = types.listOf types.string;
|
||||
example = [ "-fipa-pta" ];
|
||||
};
|
||||
|
||||
removeKernelDRM = mkEnableOption "convert all EXPORT_SYMBOL_GPL to EXPORT_SYMBOL. Warning: might be illegal in your region.";
|
||||
};
|
||||
|
||||
config = mkMerge [
|
||||
|
|
@ -252,6 +260,7 @@ in {
|
|||
++ optional (cfg.patches.amdClusterId.enable && kernelVersionOlder "6.4") customKernelPatches.amdClusterId
|
||||
++ optional (cfg.patches.zenLLCIdle.enable && kernelVersionOlder "6.5") customKernelPatches.backports.zenLLCIdle
|
||||
++ optional (isXanmod cfg.kernel && config.aviallon.optimizations.enable) (customKernelPatches.optimizeForCPUArch config.aviallon.general.cpu.arch)
|
||||
++ optional cfg.removeKernelDRM customKernelPatches.removeKernelDRM
|
||||
;
|
||||
|
||||
|
||||
|
|
|
|||
12
remove-kernel-drm.patch
Normal file
12
remove-kernel-drm.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff --git a/include/linux/export.h b/include/linux/export.h
|
||||
index 3f31ced0d977..dacee5534926 100644
|
||||
--- a/include/linux/export.h
|
||||
+++ b/include/linux/export.h
|
||||
@@ -150,5 +150,5 @@ struct kernel_symbol {
|
||||
#define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
|
||||
-#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "_gpl")
|
||||
+#define EXPORT_SYMBOL_GPL(sym) _EXPORT_SYMBOL(sym, "")
|
||||
#define EXPORT_SYMBOL_NS(sym, ns) __EXPORT_SYMBOL(sym, "", __stringify(ns))
|
||||
-#define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL(sym, "_gpl", __stringify(ns))
|
||||
+#define EXPORT_SYMBOL_NS_GPL(sym, ns) __EXPORT_SYMBOL(sym, "", __stringify(ns))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue